Godot-Share
Godot-Share copied to clipboard
Android build issue (androidx.core.v4.content does not exist)
When I try compiling for android getting an error for a library does not exists. Could it be a version error? maybe something i need to make sure i have enabled? I honestly not sure if you need more infotmation to know what is going on so let me know
Here is the error i get
./gradlew build
Configure project : WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
Task :compileDebugJavaWithJavac FAILED /Users/cesar.amaro/Documents/godot-3.1/modules/share/android/GodotShare.java:9: error: package androidx.core.v4.content does not exist import androidx.core.v4.content.FileProvider; ^ /Users/cesar.amaro/Documents/godot-3.1/modules/share/android/GodotShare.java:52: error: cannot find symbol uri = FileProvider.getUriForFile(activity, activity.getPackageName(), f); ^ symbol: variable FileProvider location: class GodotShare Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. 2 errors
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':compileDebugJavaWithJavac'.
Compilation failed; see the compiler error output for details.
-
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
-
Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 2s
Did you do this (from readme file)?
open (Project)/android/build/gradle.properties file and add the following line
android.useAndroidX=true
android.enableJetifier=true
I missed that but then did and got a different error
Task :compileDebugJavaWithJavac FAILED /Users/cesar.amaro/Documents/godot-3.1/platform/android/java/src/org/godotengine/godot/Godot.java:65: error: package android.support.v4.content does not exist import android.support.v4.content.ContextCompat;
so first it was androidx and now android.support
maybe i need to enable something else?
What Godot version are you compiling?
3.1
I don't use this module anymore, I've migrate to the plugin system in 3.2. I can't say if 3.1 is compatible with Android X. One thing you can try is to use a version of this module before the Android X support was added. You can checkout this commit 266e07086b965aea80ca1d6f059490c62dc945fd
thx ill try