Android Studio library error: mixing versions can lead to runtime crashes and @android:style/ missing resources name
I hope this will work for you.
For first issue:
This issue occur because you setting somewhere 26.1.0
as library version and compileSdkVersion 26
.
If you are using 28.0.0
as your library version then use this library version where it applicable.
Check once in every gradle file that your project have and make compileSdkVersion 28
and targetSdkVersion 28
For second issue:
change minSdkVersion 17
to minSdkVersion 21
.
--core-library error with build tools android (Eclipse)[solved with android studio]
So finally , I moved to android studio as no luck building it with eclipse.
And it runs great.
How can I resolve the error The minCompileSdk (31) specified in a dependency's AAR metadata in native Java or Kotlin?
I have found the solution. Enter this line of code above package in the app Gradle file.
For Kotlin developers:
configurations.all {
resolutionStrategy { force 'androidx.core:core-ktx:1.6.0' }
}
For Java developers
configurations.all {
resolutionStrategy { force 'androidx.core:core:1.6.0' }
}
Android Studio 4.0.0 Java 8 library desugaring in D8 and R8 Build Error
I encountered the same issue after I upgraded the coreLibraryDesugaring
in build.gradle
to com.android.tools:desugar_jdk_libs:1.0.6
. My app was building fine until I did that dependency update. A suggestion popped up two hours ago when I passed by build.gradle
and I just followed suit.
dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.6'
}
I reverted the dependency back to com.android.tools:desugar_jdk_libs:1.0.5
and the issue magically disappeared.
dependencies {
//noinspection GradleDependency
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.5'
}
From this, I think that it is likely a bug with the compatibility of the new version of the dependency with the IDE (maybe an IDE update may follow up to resolve the issue, I don't know). Maybe we need to report it as an issue to Google, I have not tried that yet. :D
Actually, I created this Stack Overflow account just now to share this after I saw your post when I searched for a solution to my problem. :)
Update
As mentioned by @sgjesse from the R8 team, the changes from 1.0.5
to 1.0.6
are already reverted in the release of 1.0.7
to fix this issue, so 1.0.5
and 1.0.7
are just the same. See @sgjesse's answer for more details.
dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.7'
}
I moved to 1.0.7
to remove the warning on outdated dependency version. :)
P.S. I can't comment because I don't have 50 reputation yet. Thanks, @sgjesse! :)
Related Topics
How to Fix "Fail to Connect to Camera Service" Exception in Android Emulator
Data Directory Has No Read/Write Permission in Android
Okhttp Library - Networkonmainthreadexception on Simple Post
Android: Onsaveinstancestate Not Being Called from Activity
How to Close the Status Bar/Notification Panel After Notification Button Click
How to Search for a Value in Firebase Android
Android Sdk Tools Revision 22 Issue
How to Add a Hint in Spinner in Xml
What Happens If a Android Service Is Started Multiple Times
Could Not Find Com.Android.Tools.Lint:Lint-Gradle Android Studio 3
Pop the Fragment Backstack Without Playing the Pop-Animation
In Espresso, How to Avoid Ambiguousviewmatcherexception When Multiple Views Match