package android.support.v4.content does not exist

702 views
Skip to first unread message

brian...@gmail.com

unread,
Nov 6, 2014, 6:42:41 PM11/6/14
to codenameone...@googlegroups.com
I'm sending an Android build which is failing with this error:  package android.support.v4.content does not exist
I'm extending WakefulBroadcastReceiver in native code. This used to work. Any ideas what could be causing this?

Thanks


Shai Almog

unread,
Nov 7, 2014, 12:34:58 AM11/7/14
to codenameone...@googlegroups.com, brian...@gmail.com
Did you add any build arguments? Did you change any of them?
Dd it use to work in that project or in a previous project?

brian...@gmail.com

unread,
Nov 7, 2014, 10:19:59 AM11/7/14
to codenameone...@googlegroups.com, brian...@gmail.com
Yes it used to work in this project. I think it was just last week.

The class originally extended WakefulBroadcastReceiver and the build server had no problems with it. I changed it to BroadcastReceiver and of course it still worked with the build server. Yesterday I switched it back to WakefulBroadcastReceiver and it won't build on the build server anymore.


-compile:
    [javac] Compiling 413 source files to /tmp/build2890612364503078256xxx/CarrierApp/bin/classes
    [javac] /tmp/build2890612364503078256xxx/CarrierApp/src/com/websmithing/gpstracker/GpsTrackerAlarmReceiver.java:5: error: package android.support.v4.content does not exist
    [javac] import android.support.v4.content.WakefulBroadcastReceiver;
    [javac]  

android.xapplication=<receiver android:name="com.websmithing.gpstracker.GpsTrackerAlarmReceiver"> </receiver> <service android:name="com.websmithing.gpstracker.LocationService"> </service>

android.xpermission=<uses-permission android:name="android.permission.WAKE_LOCK" /><uses-permission android:name="android.permission.INTERNET" /><uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /><uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

android.enableProguard=false
android.includeGPlayServices=true
build.incSources=1

Shai Almog

unread,
Nov 7, 2014, 11:07:57 AM11/7/14
to codenameone...@googlegroups.com, brian...@gmail.com
This might relate to the change we did for IAP 3.0 which was a bit extensive. Maybe Chen knows the answer here.

Chen Fishbein

unread,
Nov 7, 2014, 2:59:07 PM11/7/14
to codenameone...@googlegroups.com, brian...@gmail.com
Hi,
The android-support-v4.jar is not included in your build, therefore you see this error, not sure why it worked for you before, did you used push? push will cause the v4 jar to be added.
We need to add a build hint to include this, but you can also just take that jar and put it under you native/android directory.

Shai Almog

unread,
Nov 7, 2014, 11:56:54 PM11/7/14
to codenameone...@googlegroups.com, brian...@gmail.com
I think it worked because he used android.includeGPlayServices=true
Is it possible this broke?

Chen Fishbein

unread,
Nov 9, 2014, 3:49:30 AM11/9/14
to codenameone...@googlegroups.com, brian...@gmail.com
It doesn't seems to be the case here, I will add a build hint to include it: android.supportV4=(true or false).

Gareth Murfin

unread,
Dec 2, 2014, 4:17:21 AM12/2/14
to codenameone...@googlegroups.com, brian...@gmail.com
I also need one for android.supportV7=true
I had the V4 error your build hint fixed it, then I got the same one but with V7!.. 

Shai Almog

unread,
Dec 2, 2014, 1:16:30 PM12/2/14
to codenameone...@googlegroups.com, brian...@gmail.com
Its a separate issue we had this morning trying to workaround an issue.

Gareth Murfin

unread,
Dec 2, 2014, 1:22:05 PM12/2/14
to codenameone...@googlegroups.com
Yes I think all is ok now, I managed to get the fullscreen admob adverts going with that lib too, video ones, damn impressive!..

On 3 December 2014 at 02:16, Shai Almog <shai....@gmail.com> wrote:
Its a separate issue we had this morning trying to workaround an issue.

--
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/O-JaFK1m7ro/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/261a82e9-f932-42ce-89b3-182bf74fce7c%40googlegroups.com.

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



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

Reply all
Reply to author
Forward
0 new messages