I know it could look like This Question but I could not fix it with the solution proposed and I could not comment on it too. The Error is :
Program type alre
you can correct it by adding these to your gradle.properties
android.useAndroidX=true
android.enableJetifier=true
but in some cases it wont be correct like libGDX games to work correctly in libGDX games you should change these codes in build.gradle:
configurations.natives.files.each { jar ->
def outputDir = null
if(jar.name.endsWith("natives-arm64-v8a.jar")) outputDir = file("libs/arm64-v8a")
if(jar.name.endsWith("natives-armeabi-v7a.jar")) outputDir = file("libs/armeabi-v7a")
if(jar.name.endsWith("natives-armeabi.jar")) outputDir = file("libs/armeabi")
if(jar.name.endsWith("natives-x86_64.jar")) outputDir = file("libs/x86_64")
if(jar.name.endsWith("natives-x86.jar")) outputDir = file("libs/x86")
if(outputDir != null) {
copy {
from zipTree(jar)
into outputDir
include "*.so"
}
}
}
to this:
configurations.getByName("natives").copy().files.each { jar ->
def outputDir = null
if (jar.name.endsWith("natives-armeabi-v7a.jar")) outputDir = file("libs/armeabi-v7a")
if (jar.name.endsWith("natives-armeabi.jar")) outputDir = file("libs/armeabi")
if (jar.name.endsWith("natives-arm64-v8a.jar")) outputDir = file("libs/arm64-v8a")
if (jar.name.endsWith("natives-x86.jar")) outputDir = file("libs/x86")
if (jar.name.endsWith("natives-x86_64.jar")) outputDir = file("libs/x86_64")
if (outputDir != null) {
copy {
from zipTree(jar)
into outputDir
include "*.so"
}
}
}
it will work correctly.
This happened to me when I tried to migrate to Android X.The reason behind is that not all libraries have been migrated to Android X.
or
or alternatively(manual way)
android.useAndroidX=true
android.enableJetifier=true
This makes Android Studio to migrate all dependencies. For more info please check here
in my case just change your firebase version from
implementation 'com.google.firebase:firebase-auth:19.1.0'
to implementation 'com.google.firebase:firebase-auth:16.1.0'
I have a similar problem. In my case, it was because I am using Glide library and androidx. This solution works for me:
true
source
In Android Studio menu Navigate --> Class --> All (check that "Include in all places" checkbox is on) type your Class (INotificationSideChannel) and you will see more than one package of dependencies - just remove one of it from your gradle.build! It often problem when you use both android and androidx dependencies in one project.