Cannot install new build on older Android device

59 views
Skip to first unread message

mcw

unread,
Jun 19, 2016, 3:02:54 PM6/19/16
to CodenameOne Discussions
If you are experiencing an issue please mention the full platform your issue applies to:

Device
Samsung Galaxy Player 4.0 running Android 2.3.5

Just ran a new Android build. Had no trouble installing it on a variety of devices running Android 4 thru 6.

Tried to install it on Android 2.3.5 device, the install gives an error:"Problem parsing package". I always test my apps on this device and have never had a problem before.

Rebuilt app with build hint android.min_sdk_version=7, made no difference.

Tried downloading the app and copying it via USB, made no difference.

Tried deleting existing app and reinstalling, made no difference.

Do you still support Android 2.3.5?

Thanks

mcw

unread,
Jun 19, 2016, 5:48:29 PM6/19/16
to CodenameOne Discussions
I went back through previous versions of CodenameOne version by version. When I got back to version 3.1 I was able to install the build on my Android 2.3.5 device.

Unfortunately along the way I had to comment out a new CodenameOne API calls I was using, so this is not really a solution for me.

Something changed between 3.1 and 3.2 that prevents installing an app on Android 2.3.5.

Thanks

Shai Almog

unread,
Jun 19, 2016, 11:40:32 PM6/19/16
to CodenameOne Discussions
Google effectively dropped support for these phones with Google play and gradle. There are workarounds I highlighted here: http://stackoverflow.com/a/34281264/756809

mcw

unread,
Jun 20, 2016, 7:18:30 AM6/20/16
to CodenameOne Discussions
The referenced article says:

We transitioned the Google Play Services support to be on by default as that is the common use case and makes API's like the location API far more usable.

As a result 2.3.1 became the minimum OS version as imposed by Google.
This device is running 2.3.5 so it should be supported.

Also the original poster said using a min sdk version of 7 got the build to install. That did not work for me.

I am already excluding Google Play from the build because of an earlier issue

This situation does seem different.

mcw

unread,
Jun 20, 2016, 8:02:13 AM6/20/16
to CodenameOne Discussions
Another suggestion in the referenced article was to build with android gradle=false but that generated a build error.

I built with android.grade=false and android.includeGPlayServices=false

-compile:
    [javac] Compiling 536 source files to /tmp/build7034578418479870721xxx/AWMain/bin/classes
    [javac] /tmp/build7034578418479870721xxx/AWMain/src/com/codename1/location/CodenameOneBackgroundLocationActivity.java:41: error: cannot find symbol
    [javac]                 l.locationUpdated(AndroidLocationPlayServiceManager.convert(location));
    [javac]                                   ^
    [javac]   symbol:   variable AndroidLocationPlayServiceManager
    [javac]   location: class CodenameOneBackgroundLocationActivity
    [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] 1 error

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


On Sunday, June 19, 2016 at 8:40:32 PM UTC-7, Shai Almog wrote:

mcw

unread,
Jun 20, 2016, 12:03:47 PM6/20/16
to CodenameOne Discussions
Submitted another build, this time with just android.gradle=false and that generated a file that would install on this device.

The reason I was excluding Google Play Services was because I don't display ads and checked that option when submitting my app last time. Google displayed a warning that I was including an ad library even though I said I did not display ads. The app was accepted though.

I don't understand why location services could not be found when excluding Google play services as I am not using them. Is it possible CodenameOne has code that references them?

Also I still think it should have worked with the Gradle build as the device seems to be supported.

This at least lets me submit a new version of my app.

Thanks


On Sunday, June 19, 2016 at 8:40:32 PM UTC-7, Shai Almog wrote:

Shai Almog

unread,
Jun 21, 2016, 12:02:36 AM6/21/16
to CodenameOne Discussions
We have a fix for that build error which will be a part of the next update.

Notice that with the new Google play support you can include only location support without including the ads support which is exactly why we deprecated the global sweeping build switch.

See https://www.codenameone.com/manual/advanced-topics.html specifically android.playService.location=true should probably work best for your case with the gradle build.
Reply all
Reply to author
Forward
0 new messages