codenameone / CodenameOne

Cross-platform framework for building truly native mobile apps with Java or Kotlin. Write Once Run Anywhere support for iOS, Android, Desktop & Web.
https://www.codenameone.com/
Other
1.71k stars 408 forks source link

Gradle build will not install on older Android device #2015

Open mwarnett opened 7 years ago

mwarnett commented 7 years ago

Device information: Samsung Model Number YP-G1 Firmware version 2.3.5 Kernel version 2.6.35.7-G1UEKI8-CL562400 Build number GINGERBREAD.UEKI8

I am building my Android app with the following build hints: android.debug=true android.min_sdk_version=9 android.playService.ads=false android.release=true android.xpermissions=android.permission.INTERNET,android.permission.WRITE_EXTERNAL_STOR

The build is successful and it installs on most Android devices. However when I try and install it on the above mentioned device I get: PARSING ERROR - Problem parsing package.

If I add the android.gradle=false build hint the build works and now it installs on all devices including the above mentioned device. However the app now requires phone access because the android.playService.ads=false build hint is ignored in the ant build.

I was going to attach the two build files but GitHub won't accept apk files. If you want them let me know how to send them to you.

So how do I get the gradle build to generate a build that will work on this device?

codenameone commented 7 years ago

To use that old target try android.includeGPlayServices=false.

I don't think keeping the gradle build working for these devices is viable long term. Google has already announced intentions to stop supporting anything below 4.1.

mwarnett commented 7 years ago

android.includeGPlayServices=false didn't help but I think that is really because Issue 1945 is still a problem.

Maybe I have to give up on older devices but my apps still run fine on them. I was concerned that by turn Gradle builds off I would be losing things moving forward.

codenameone commented 7 years ago

That's odd, I'm not sure why that will happen but we haven't tested the ant pipeline in quite a while.