package android.support.v4.app does not exist

1,006 views
Skip to first unread message

Gareth Murfin

unread,
Dec 2, 2014, 3:56:26 AM12/2/14
to codenameone...@googlegroups.com
How do I get around this ? Im trying out this library here btw, https://code.google.com/p/admobfullscreen-codenameone/


Compiling 412 source files to /tmp/build9159322119904213262xxx/Razzler/bin/classes
    [javac] /tmp/build9159322119904213262xxx/Razzler/src/com/codename1/impl/android/AndroidImplementation.java:101: error: package android.support.v4.app does not exist
    [javac] import android.support.v4.app.ActivityCompat;
    [javac]                              ^
    [javac] /tmp/build9159322119904213262xxx/Razzler/src/com/codename1/impl/android/AndroidImplementation.java:423: error: cannot find symbol
    [javac]             ActivityCompat.invalidateOptionsMenu(activity);
    [javac]             ^
    [javac]   symbol:   variable ActivityCompat
    [javac]   location: class AndroidImplementation
    [javac] /tmp/build9159322119904213262xxx/Razzler/src/com/codename1/impl/android/AndroidImplementation.java:501: error: cannot find symbol
    [javac]                 ActivityCompat.invalidateOptionsMenu(activity);
    [javac]                 ^
    [javac]   symbol:   variable ActivityCompat
    [javac]   location: class InvalidateOptionsMenuImpl
    [javac] /tmp/build9159322119904213262xxx/Razzler/src/com/codename1/impl/android/AndroidImplementation.java:1695: error: cannot find symbol
    [javac]             ActivityCompat.invalidateOptionsMenu(activity);
    [javac]             ^
    [javac]   symbol:   variable ActivityCompat
    [javac]   location: class NotifyActionBar
    [javac] /tmp/build9159322119904213262xxx/Razzler/src/com/codename1/impl/android/AndroidImplementation.java:1697: error: package android.support.v7.app does not exist
    [javac]                 ((android.support.v7.app.ActionBarActivity)activity).getSupportActionBar().show();
    [javac]                                         ^
    [javac] /tmp/build9159322119904213262xxx/Razzler/src/com/codename1/impl/android/AndroidImplementation.java:1699: error: package android.support.v7.app does not exist
    [javac]                 ((android.support.v7.app.ActionBarActivity)activity).getSupportActionBar().hide();
    [javac]                                         ^
    [javac] /tmp/build9159322119904213262xxx/Razzler/src/com/codename1/impl/android/AndroidImplementation.java:5153: error: package android.support.v7.app does not exist
    [javac]             android.support.v7.app.ActionBar ab = ((android.support.v7.app.ActionBarActivity)activity).getSupportActionBar();
    [javac]                                   ^
    [javac] /tmp/build9159322119904213262xxx/Razzler/src/com/codename1/impl/android/AndroidImplementation.java:5153: error: package android.support.v7.app does not exist
    [javac]             android.support.v7.app.ActionBar ab = ((android.support.v7.app.ActionBarActivity)activity).getSupportActionBar();
    [javac]                                                                           ^
    [javac] /tmp/build9159322119904213262xxx/Razzler/src/com/codename1/impl/android/CodenameOneActivity.java:266: error: cannot find symbol
    [javac]             getSupportActionBar().hide();
    [javac]             ^
    [javac]   symbol:   method getSupportActionBar()
    [javac]   location: class CodenameOneActivity
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 9 errors

Gareth Murfin

unread,
Dec 2, 2014, 4:30:22 AM12/2/14
to codenameone...@googlegroups.com
So first fix is, android.supportV4=true

unfortunately the same fix wont work for v7.. So I copied android-support-v7-appcompat.jar from adt-bundle-windows-x86_64-20130729\sdk\extras\android\support\v7\appcompat\libs into native\android

This got rid of all errors apart from: 


-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [aapt] Generating resource IDs...
     [echo] ----------
     [echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.

-pre-compile:

-compile:
    [javac] Compiling 412 source files to /tmp/build1149124419272157282xxx/Razzler/bin/classes
    [javac] /tmp/build1149124419272157282xxx/Razzler/src/com/codename1/impl/android/AndroidImplementation.java:425: error: cannot find symbol
    [javac]                 activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
    [javac]                                                                         ^
    [javac]   symbol:   variable FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS
    [javac]   location: class LayoutParams
    [javac] /tmp/build1149124419272157282xxx/Razzler/src/com/codename1/impl/android/CodenameOneActivity.java:266: error: cannot find symbol
    [javac]             getSupportActionBar().hide();
    [javac]             ^
    [javac]   symbol:   method getSupportActionBar()
    [javac]   location: class CodenameOneActivity
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 2 errors

BUILD FAILED
/home/ec2-user/android-sdk/tools/ant/build.xml:720: The following error occurred while executing this line:
/home/ec2-user/android-sdk/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.

Total time: 15 seconds

Gareth Murfin

unread,
Dec 2, 2014, 4:46:01 AM12/2/14
to codenameone...@googlegroups.com
I am trying to use the fullscreen video adverts from here: https://developers.google.com/mobile-ads-sdk/docs/admob/android/interstitial

If anyone has done this successfully please let me know, this library should do it, if I can get around the compile issues on server side:

On my simulator I simply see a codenameone logo, and I cannot get it to build the Android one on the server as described above!

Thanks,
Gaz.

Gareth Murfin

unread,
Dec 2, 2014, 4:56:11 AM12/2/14
to codenameone...@googlegroups.com
Actually I am assuming the server is undergoing some sort of upgrade, because even a clean fresh project returns errors for me right now.  I hope this is the case anyway because every build I send fails, even a fresh project, with the following errors:



-compile:
    [javac] Compiling 409 source files to /tmp/build7484740840141052657xxx/MyApplication/bin/classes
    [javac] /tmp/build7484740840141052657xxx/MyApplication/src/com/codename1/impl/android/AndroidImplementation.java:101: error: package android.support.v4.app does not exist
    [javac] import android.support.v4.app.ActivityCompat;
    [javac]                              ^
    [javac] /tmp/build7484740840141052657xxx/MyApplication/src/com/codename1/impl/android/AndroidImplementation.java:423: error: cannot find symbol
    [javac]             ActivityCompat.invalidateOptionsMenu(activity);
    [javac]             ^
    [javac]   symbol:   variable ActivityCompat
    [javac]   location: class AndroidImplementation
    [javac] /tmp/build7484740840141052657xxx/MyApplication/src/com/codename1/impl/android/AndroidImplementation.java:501: error: cannot find symbol
    [javac]                 ActivityCompat.invalidateOptionsMenu(activity);
    [javac]                 ^
    [javac]   symbol:   variable ActivityCompat
    [javac]   location: class InvalidateOptionsMenuImpl
    [javac] /tmp/build7484740840141052657xxx/MyApplication/src/com/codename1/impl/android/AndroidImplementation.java:1695: error: cannot find symbol
    [javac]             ActivityCompat.invalidateOptionsMenu(activity);
    [javac]             ^
    [javac]   symbol:   variable ActivityCompat
    [javac]   location: class NotifyActionBar
    [javac] /tmp/build7484740840141052657xxx/MyApplication/src/com/codename1/impl/android/AndroidImplementation.java:1697: error: package android.support.v7.app does not exist
    [javac]                 ((android.support.v7.app.ActionBarActivity)activity).getSupportActionBar().show();
    [javac]                                         ^
    [javac] /tmp/build7484740840141052657xxx/MyApplication/src/com/codename1/impl/android/AndroidImplementation.java:1699: error: package android.support.v7.app does not exist
    [javac]                 ((android.support.v7.app.ActionBarActivity)activity).getSupportActionBar().hide();
    [javac]                                         ^
    [javac] /tmp/build7484740840141052657xxx/MyApplication/src/com/codename1/impl/android/AndroidImplementation.java:5153: error: package android.support.v7.app does not exist
    [javac]             android.support.v7.app.ActionBar ab = ((android.support.v7.app.ActionBarActivity)activity).getSupportActionBar();
    [javac]                                   ^
    [javac] /tmp/build7484740840141052657xxx/MyApplication/src/com/codename1/impl/android/AndroidImplementation.java:5153: error: package android.support.v7.app does not exist
    [javac]             android.support.v7.app.ActionBar ab = ((android.support.v7.app.ActionBarActivity)activity).getSupportActionBar();
    [javac]                                                                           ^
    [javac] /tmp/build7484740840141052657xxx/MyApplication/src/com/codename1/impl/android/CodenameOneActivity.java:266: error: cannot find symbol

Melo90_...@hotmail.it

unread,
Dec 2, 2014, 6:35:41 AM12/2/14
to codenameone...@googlegroups.com
I have the same problem 

Gareth Murfin

unread,
Dec 2, 2014, 10:10:29 AM12/2/14
to codenameone...@googlegroups.com, Melo90_...@hotmail.it

Thanks guys, appears to be fixed now, 

Shai Almog

unread,
Dec 2, 2014, 1:24:44 PM12/2/14
to codenameone...@googlegroups.com, Melo90_...@hotmail.it
We had a bit of an issue trying to workaround some issues with our update to support lollipop. We ended up restoring the problematic functionality, hopefully we will be able to resolve the issues in the next couple of days.

Gareth Murfin

unread,
Dec 2, 2014, 2:12:52 PM12/2/14
to codenameone...@googlegroups.com, Melo90_...@hotmail.it
Ah yeh, all that compatibility stuff with Android is very annoying, I trust you guys know far too much about it now :) Me too unfortunately.

On 3 December 2014 at 02:24, Shai Almog <shai....@gmail.com> wrote:
We had a bit of an issue trying to workaround some issues with our update to support lollipop. We ended up restoring the problematic functionality, hopefully we will be able to resolve the issues in the next couple of days.

--
You received this message because you are subscribed to a topic in the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codenameone-discussions/ZV9UVaTCrg8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codenameone-discu...@googlegroups.com.
Visit this group at http://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/3e24b7b8-9341-4a38-b998-6f87be44ab58%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Gareth Murfin
(Android Freelancer - www.garethmurfin.co.uk)

tamu...@gmail.com

unread,
Jun 26, 2017, 5:02:15 PM6/26/17
to CodenameOne Discussions
Bug fixes and several improvements.
Reply all
Reply to author
Forward
0 new messages