Google just changed the rule so that since the start of August so that your app must be API 29 or greater. Solar2D just added compatibility with that – that all seems to be great.
However, since updating from build 3600, I cannot get my game to build on my android device.
The first error I got was:
/private/var/folders/2q/6xnd00dn6jb9sqnykyrqk7pc0000gn/T/CLtmpMOEMyC/template/app/src/main/AndroidManifest.xml Error:
uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library [com.google.android.gms:play-services-ads:19.3.0] /Users/briann/.gradle/caches/transforms-2/files-2.1/66469a18cab037909539f040355bc192/jetified-play-services-ads-19.3.0/AndroidManifest.xml as the library might be using APIs not available in 15
Suggestion: use a compatible library with a minSdk of at most 15,
or increase this project's minSdk version to at least 16,
or use tools:overrideLibrary="com.google.android.gms.ads.impl" to force usage (may lead to runtime failures)
I could fix this by editing build.settings:
android {
minSdkVersion = "16",
}
Now I can build the app, but when I start it on the device, I get a Runtime error:
HTCONE: ERROR: Runtime error
Aug 02 19:43:26.259 HTCONE: java.lang.NoClassDefFoundError: com.google.android.gms.common.GoogleApiAvailability
HTCONE: Java Stack Trace:
HTCONE: shared.google.play.services.base.GooglePlayServicesAvailabilityHandler.handleGooglePlayServicesAvailability(GooglePlayServicesAvailabilityHandler.java:281)
HTCONE: shared.google.play.services.base.LuaLoader$HandleGooglePlayServicesAvailabilityWrapper.invoke(LuaLoader.java:159)
HTCONE: com.ansca.corona.JavaToNativeShim.nativeResize(Native Method)
HTCONE: com.ansca.corona.JavaToNativeShim.resize(JavaToNativeShim.java:403)
HTCONE: com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onSurfaceChanged(CoronaGLSurfaceView.java:391)
HTCONE: com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1614)
HTCONE: com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1380)
H
Aug 02 19:43:26.260 TCONE: stack traceback:
HTCONE: [C]: in function 'handleGooglePlayServicesAvailability'
HTCONE: ?: in main chunk
HTCONE: This application failed to load and execute main.lua
It seems like a brand new issue due to Google Play’s requiring API 29, so I assume other people will hit the same problem soon.
I don’t really know what’s going on here, even if it’s a Solar2D issue, or if my device is too old now, so any advice is appreciated!