I have the app and in Android 6, 7 everything is ok, but when I can't open an app on android 5. The problem in LOG is:
android.content.res.Resources$NotFoundException: File
res/drawable-v21/ic_apps_selector.xml from drawable resource ID
0x7f08006a
Please help me with this
In gradle i have one warning but i dont know how to fix it:
All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0, 27.1.0. Examples include com.android.support:animated-vector-drawable:28.0.0 and com.android.support:exifinterface:27.1.0 less... (Ctrl+F1)
Inspection info:There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion). Issue id: GradleCompatible
Try adding vectorDrawables.useSupportLibrary = true in your gradle and
static {
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
}
to your activity.
See Resources$NotFoundException
Related
When I implement google Admob this line is underlined as wrong:
implementation 'com.android.support:appcompat-v7:27.1.1'
Info: All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 27.1.1, 26.1.0. Examples include com.android.support:animated-vector-drawable:27.1.1 and com.android.support:customtabs:26.1.0
All works fine when gradle is without Admob. When I add Admob problem appears:
com.google.android.gms:play-services-ads:17.1.1
I tried to change the same versions of appcompat and customtabs but its not works..
Recent versions of Google Play Services (GMS) libraries are compiled with SDK 28 and depend on support library 28.0.0.
You should raise your compile SDK to 28 and all your support libraries should use version 28.0.0. These are the rules:
Support library major version needs to match compile SDK version.
All suppport libraries must use the same version.
After you make sure your app works in this setup consider migrating to AndroidX. AndroidX replaces support library.
I Know there are many question like this, but didn't find any one with Admob ads dependency, i just want to use Admob ads in my app, and i added the ads-dependency from official website implementation 'com.google.android.gms:play-services-ads:15.0.0'.
But shows me this warning:
All gms/firebase libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 15.0.1, 15.0.0. Examples include com.google.android.gms:play-services-ads-identifier:15.0.1 and com.google.android.gms:play-services-ads:15.0.0 less... (Ctrl+F1)
There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion.)
I only want to use ads dependency only without the firebase.
check your app-gradle file, you have a conflict in dependencies. Update the following
com.google.android.gms:play-services-ads:15.0.1
Recently I wanted to update my app's dependencies, as I saw new version of com.android.support:appcompat-v7 library came up (27.0.0). After incrementing this lib version, Android Studio underlines this library and shows a popup with error message:
All com.android.support libraries must use the exact same version
specification (mixing versions can lead to runtime crashes). Found
versions 27.0.0, 25.2.0. Examples include
com.android.support:animated-vector-drawable:27.0.0 and
com.android.support:support-v13:25.2.0
I've run gradlew app:dependencies command and saw other dependency which uses android support lib but it's older version - 25.2.0. My question is: what should I do? I assume I have to downgrade android support lib version as otherwise I may see No Method Found or No Class Found errors, am I right? Is it possible to include both of these versions somehow, that the library causing conflicts will be still able to use older version?
Thanks for help!
As you wrote already, one way is to downgrade to the lowest version. But I think that as long as you are not using that specific methods that the library with older dependency is using, you should be fine. But for the sake of safety, you should have all the dependecies of the same version
I am getting below error
All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 26.0.0-alpha1, 25.2.0. Examples include com.android.support:animated-vector-drawable:26.0.0-alpha1 and com.android.support:mediarouter-v7:25.2.0 less... (Ctrl+F1)
There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion.)
for line 27, I am novice in android & trying to use google play service and map
I have updated manifest file with but after I move to build.gradle it is showing this error
I have tried replicating your case and found that
compile 'com.google.android.gms:play-services:11.0.4'
internally uses android appcompat version 25.2.0
and hence to remove this error, just change your code from:
compile 'com.android.support:appcompat-v7:26.+'
TO
compile 'com.android.support:appcompat-v7:25.2.0'
Also, if your compileSdkVersion is 26, it will give warning so just change it to 25 and all your errors/warnings will be resolved(No red lines in build.gradle)
Hope it helps!
If your targetSdkVersion is 26 means
The appcompat library should be like below
compile 'com.android.support:appcompat-v7:26.1.0'
All com.android.support libraries must use the exact same version
specification (mixing versions can lead to runtime crashes). Found
versions 25.3.0, 25.1.1, 23.4.0. Examples include
com.android.support:animated-vector-drawable:25.3.0 and
com.android.support:cardview-v7:25.1.1 less... (Ctrl+F1) There are
some combinations of libraries, or tools and libraries, that are
incompatible, or can lead to bugs. One such incompatibility is
compiling with a version of the Android support libraries that is not
the latest version (or in particular, a version lower than your
targetSdkVersion.)
Go to all the gradle files and make version identical.
It should be having same version across all modules as tagetVersionSDK.
Hopefully This should solve your problem.