Ok, let’s start by looking at your extensions:
- RichText - No native code - not a problem
- defold-cjson - Native code - nothing platform specific - not a problem
- Monarch - No native code - not a problem
- Ludobits - No native code - not a problem
- IAP 3.0.1 - Native code - latest version - nothing AndroidX/Support library specific - maybe a problem
- Push 3.0.2 - Native code - latest version - AndroidX - potential problem
- Facebook 6.2.0 - Native code - latest version - AndroidX - potential problem
I’m now starting Defold 1.2.180 and creating a new empty project:
Adding the three extensions with Android specific code:
Bundling:
And I get an error:
Caused by: com.android.builder.errors.EvalIssueException: This project uses AndroidX dependencies, but the 'android.useAndroidX' property is not enabled. Set this property to true in the gradle.properties file and retry.
The following AndroidX dependencies are detected: androidx.appcompat:appcompat:1.1.0, androidx.core:core:1.1.0, androidx.slidingpanelayout:slidingpanelayout:1.0.0, androidx.versionedparcelable:versionedparcelable:1.1.0, androidx.fragment:fragment:1.1.0, androidx.customview:customview:1.0.0, androidx.swiperefreshlayout:swiperefreshlayout:1.0.0, androidx.interpolator:interpolator:1.0.0, androidx.loader:loader:1.0.0, androidx.drawerlayout:drawerlayout:1.0.0, androidx.activity:activity:1.0.0, androidx.collection:collection:1.1.0, androidx.viewpager:viewpager:1.0.0, androidx.cardview:cardview:1.0.0, androidx.localbroadcastmanager:localbroadcastmanager:1.0.0, androidx.arch.core:core-common:2.1.0, androidx.savedstate:savedstate:1.0.0, androidx.annotation:annotation:1.1.0, androidx.lifecycle:lifecycle-common:2.1.0, androidx.appcompat:appcompat-resources:1.1.0, androidx.lifecycle:lifecycle-livedata:2.0.0, androidx.legacy:legacy-support-core-ui:1.0.0, androidx.lifecycle:lifecycle-viewmodel:2.1.0, androidx.lifecycle:lifecycle-livedata-core:2.0.0, androidx.browser:browser:1.0.0, androidx.arch.core:core-runtime:2.0.0, androidx.legacy:legacy-support-v4:1.0.0, androidx.media:media:1.0.0, androidx.legacy:legacy-support-core-utils:1.0.0, androidx.documentfile:documentfile:1.0.0, androidx.cursoradapter:cursoradapter:1.0.0, androidx.vectordrawable:vectordrawable-animated:1.1.0, androidx.lifecycle:lifecycle-runtime:2.1.0, androidx.coordinatorlayout:coordinatorlayout:1.0.0, androidx.asynclayoutinflater:asynclayoutinflater:1.0.0, androidx.vectordrawable:vectordrawable:1.1.0, androidx.print:print:1.0.0
at com.android.builder.errors.IssueReporter.reportError(IssueReporter.kt:105)
at com.android.builder.errors.IssueReporter.reportError$default(IssueReporter.kt:101)
at com.android.build.gradle.internal.dependency.AndroidXDependencyCheck.execute(AndroidXDependencyCheck.kt:60)
at ...
Ok, so I have a project which uses AndroidX. Got it. I need to use an app manifest where I specify that I want to use AndroidX:
Let’s try again. Voila!
What does this tell us? We know this works:
- Defold 1.2.180
- Build server build.defold.com
- Empty project with three native extensions
- Using an app manifest to enable AndroidX (we will add this as a checkbox in game.project at some point)
- Using default AndroidManfest.xml from builtins
- Using no bundle resources
- Using default settings in the Android section of game.project
So we need to ask ourselves what is different in your project? Please confirm these:
- Are you using the default AndroidManifest or do you have a custom manifest?
- Are you bundling any Android specific resources?
- Have you specified any Android icons or made other changes to the Android section of game.project?
- Are you using any native extensions in your project that are not added as dependencies?
- Are you using 1.2.180 with build.defold.com?