Check your dependencies for uses of +
in the versions. Some dependency could be using com.android.support:appcompat-v7:+
. This leads to problems when a new version gets released and could break features.
The solution for this would be to either use com.android.support:appcompat-v7:{compileSdkVersion}.+
or don’t use +
at all and use the full version (ex. com.android.support:appcompat-v7:26.1.0
).
If you cannot see a line in your build.gradle files for this, run in android studio terminal to give an overview of what each dependency uses
gradlew -q dependencies app:dependencies --configuration debugAndroidTestCompileClasspath
(include androidtest dependencies)
OR
gradlew -q dependencies app:dependencies --configuration debugCompileClasspath
(regular dependencies for debug)
which results in something that looks close to this
------------------------------------------------------------
Project :app
------------------------------------------------------------
debugCompileClasspath - Resolved configuration for compilation for variant: debug
...
+--- com.android.support:appcompat-v7:26.1.0
| +--- com.android.support:support-annotations:26.1.0
| +--- com.android.support:support-v4:26.1.0 (*)
| +--- com.android.support:support-vector-drawable:26.1.0
| | +--- com.android.support:support-annotations:26.1.0
| | --- com.android.support:support-compat:26.1.0 (*)
| --- com.android.support:animated-vector-drawable:26.1.0
| +--- com.android.support:support-vector-drawable:26.1.0 (*)
| --- com.android.support:support-core-ui:26.1.0 (*)
+--- com.android.support:design:26.1.0
| +--- com.android.support:support-v4:26.1.0 (*)
| +--- com.android.support:appcompat-v7:26.1.0 (*)
| +--- com.android.support:recyclerview-v7:26.1.0
| | +--- com.android.support:support-annotations:26.1.0
| | +--- com.android.support:support-compat:26.1.0 (*)
| | --- com.android.support:support-core-ui:26.1.0 (*)
| --- com.android.support:transition:26.1.0
| +--- com.android.support:support-annotations:26.1.0
| --- com.android.support:support-v4:26.1.0 (*)
+--- com.android.support.constraint:constraint-layout:1.0.2
| --- com.android.support.constraint:constraint-layout-solver:1.0.2
(*) - dependencies omitted (listed previously)
If you have no control over changing the version, Try forcing it to use a specific version.
configurations.all {
resolutionStrategy {
force "com.android.support:appcompat-v7:26.1.0"
force "com.android.support:support-v4:26.1.0"
}
}
The force dependency may need to be different depending on what is being set to 28.0.0
Issue Description
Get error like the following when run npm run android
[ENTER DESCRIPTION HERE]
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:react-native-navigation:processReactNative51DebugAndroidTestResources’.
Android resource linking failed
Output: PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/intermediates/incremental/mergeReactNative51DebugAndroidTestResources/merged.dir/values-v28/values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/intermediates/incremental/mergeReactNative51DebugAndroidTestResources/merged.dir/values-v28/values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/intermediates/incremental/mergeReactNative51DebugAndroidTestResources/merged.dir/values/values.xml:1047: error: resource android:attr/fontVariationSettings not found.
PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/intermediates/incremental/mergeReactNative51DebugAndroidTestResources/merged.dir/values/values.xml:1048: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: user/java/gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-osx.jar/01679366724b6cc8d75f761ec8d23958/aapt2-3.2.1-4818971-osx/aapt2 link -I
user/Library/Android/sdk/platforms/android-26/android.jar
—manifest
PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/intermediates/merged_manifests/reactNative51DebugAndroidTest/processReactNative51DebugAndroidTestManifest/merged/AndroidManifest.xml
-o
PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/intermediates/processed_res/reactNative51DebugAndroidTest/processReactNative51DebugAndroidTestResources/out/resources-reactNative51DebugAndroidTest.ap_
-R
@PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/intermediates/incremental/processReactNative51DebugAndroidTestResources/resources-list-for-resources-reactNative51DebugAndroidTest.ap_.txt
—auto-add-overlay
—java
PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/generated/not_namespaced_r_class_sources/reactNative51DebugAndroidTest/processReactNative51DebugAndroidTestResources/r
-0
apk
—output-text-symbols
PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/intermediates/symbols/androidTest/reactNative51/debug/R.txt
—no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-osx Daemon #0
Output: user/Documents/java/gradle/caches/transforms-1/files-1.1/appcompat-v7-28.0.0.aar/788639be9df739a4d85280dd2698b112/res/values-v28/values-v28.xml:9:5-12:13: AAPT: error: resource android:attr/dialogCornerRadius not found.
PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/intermediates/incremental/mergeReactNative51DebugAndroidTestResources/merged.dir/values-v28/values-v28.xml:11: AAPT: error: resource android:attr/dialogCornerRadius not found.
user/Documents/java/gradle/caches/transforms-1/files-1.1/design-26.1.0.aar/b2741e663f525b0147aac8cf2e40d225/res/values/values.xml:159:5-202: AAPT: error: resource android:attr/fontVariationSettings not found.
user/Documents/java/gradle/caches/transforms-1/files-1.1/design-26.1.0.aar/b2741e663f525b0147aac8cf2e40d225/res/values/values.xml:159:5-202: AAPT: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: userjava/gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-osx.jar/01679366724b6cc8d75f761ec8d23958/aapt2-3.2.1-4818971-osx/aapt2 link -I
user/Library/Android/sdk/platforms/android-26/android.jar
—manifest
PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/intermediates/merged_manifests/reactNative51DebugAndroidTest/processReactNative51DebugAndroidTestManifest/merged/AndroidManifest.xml
-o
PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/intermediates/processed_res/reactNative51DebugAndroidTest/processReactNative51DebugAndroidTestResources/out/resources-reactNative51DebugAndroidTest.ap_
-R
@PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/intermediates/incremental/processReactNative51DebugAndroidTestResources/resources-list-for-resources-reactNative51DebugAndroidTest.ap_.txt
—auto-add-overlay
—java
PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/generated/not_namespaced_r_class_sources/reactNative51DebugAndroidTest/processReactNative51DebugAndroidTestResources/r
-0
apk
—output-text-symbols
PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/intermediates/symbols/androidTest/reactNative51/debug/R.txt
—no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-osx Daemon #0
Steps to Reproduce / Code Snippets / Screenshots
config : «android»: «cd ./android && ./gradlew app:assembleDebug && ./gradlew installDebug»
https://wix.github.io/react-native-navigation/#/docs/Installing?id=android
npm run android
Environment
- React Native Navigation version: 2.8
- React Native version: 0.58
- Platform(s) (iOS, Android, or both?): Android
This error is actually more annoying than common. One of the major reasons it is so annoying is because of the fact that it does not actually point to the exact line or file that caused the error. It leaves it up to you to figure it out.
Cause
We still have not been able to point out what exactly triggers this error but it seems to have something to do with a mismatch in your Gradle dependencies.
There are different ways to fix this issue. Not all of them will work for you.
- Check your build.gradle file to make sure your compileSdkVersion matches the version of your support libraries.
compileSdkVersion 27
implementation ‘com.android.support:appcompat-v7:26.1.0’
implementation ‘com.android.support:design:26.1.0’
The above code will possibly throw this error because the support library version does not match the compileSdkVersion. So to fix this, upgrade your support library version.
- Migrate your entire project to AndroidX. To migrate your project, follow these instructions:
- Click on the Refractor menu item in Android Studio
- Click on “Migrate to AndroidX”.
- Follow screen instructions
The second solution could be problematic in large and complex projects. You might be required to manually migrate some of your libraries. However, this solution is guaranteed to solve this error as long as the migration is successfully completed.
Note
It is recommended that you backup your entire project before attempting to migrate to AndroidX. This way, if something goes wrong, you can easily revert to a working version.
That’s all for now.
If you have any questions or contributions, feel free to post them in the comment box below :).
Related posts:
Why not Relax and let us bring your App to life. Click here to begin
Ошибка: (9, 5) ошибка: ресурс android: attr / dialogCornerRadius не найден
Итак, я установил android studio 3.0.1, и как только он открыл Gradle, построил и показал следующие ошибки. Я пытался добавить такие зависимости, как дизайн и поддержка, но тщетно. Кто-нибудь может мне помочь? Заранее спасибо.
Он показывает, что некоторые атрибуты, такие как dialogCornerRadius и fontVariation Settings, не найдены.
Ответы:
Эта ошибка возникает из-за несоответствия compileSdkVersion
версии библиотеки.
например:
compileSdkVersion 27
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
а также избегайте использования знака + с библиотекой, как показано ниже:
implementation 'com.android.support:appcompat-v7:26.+'
используйте точную версию библиотеки, подобную этой
implementation 'com.android.support:appcompat-v7:26.1.0'
Использование знака + с библиотекой затрудняет сбор точной версии, которая требуется, в процессе сборки, что делает систему нестабильной, поэтому не рекомендуется.
Если вы переходите на AndroidX и получаете эту ошибку, вам необходимо установить SDK компиляции на Android 9.0 (уровень API 28) или выше.
У меня была такая же проблема. Следующая ветка помогла мне решить эту проблему. Просто установите версию Compile SDK для Android P.
https://stackoverflow.com/a/49172361/1542720
Я исправил эту проблему, выбрав:
API 27+: Android API 27, предварительная версия P (предварительная версия)
в настройках структуры проекта. на следующем изображении показаны мои настройки. 13 ошибок, которые возникали при создании приложения, исчезли.
Проверьте свои зависимости на предмет использования +
в версиях. Некоторая зависимость могла быть использована com.android.support:appcompat-v7:+
. Это приводит к проблемам при выпуске новой версии и может нарушить функции.
Решением для этого было бы либо использовать, com.android.support:appcompat-v7:{compileSdkVersion}.+
либо не использовать +
вообще, а использовать полную версию (например com.android.support:appcompat-v7:26.1.0
).
Если вы не видите строку в своих файлах build.gradle для этого, запустите в терминале студии Android, чтобы получить обзор того, что использует каждая зависимость.
gradlew -q dependencies app:dependencies --configuration debugAndroidTestCompileClasspath
(включая зависимости androidtest)
ИЛИ
gradlew -q dependencies app:dependencies --configuration debugCompileClasspath
(обычные зависимости для отладки)
что приводит к чему-то похожему на это
------------------------------------------------------------
Project :app
------------------------------------------------------------
debugCompileClasspath - Resolved configuration for compilation for variant: debug
...
+--- com.android.support:appcompat-v7:26.1.0
| +--- com.android.support:support-annotations:26.1.0
| +--- com.android.support:support-v4:26.1.0 (*)
| +--- com.android.support:support-vector-drawable:26.1.0
| | +--- com.android.support:support-annotations:26.1.0
| | --- com.android.support:support-compat:26.1.0 (*)
| --- com.android.support:animated-vector-drawable:26.1.0
| +--- com.android.support:support-vector-drawable:26.1.0 (*)
| --- com.android.support:support-core-ui:26.1.0 (*)
+--- com.android.support:design:26.1.0
| +--- com.android.support:support-v4:26.1.0 (*)
| +--- com.android.support:appcompat-v7:26.1.0 (*)
| +--- com.android.support:recyclerview-v7:26.1.0
| | +--- com.android.support:support-annotations:26.1.0
| | +--- com.android.support:support-compat:26.1.0 (*)
| | --- com.android.support:support-core-ui:26.1.0 (*)
| --- com.android.support:transition:26.1.0
| +--- com.android.support:support-annotations:26.1.0
| --- com.android.support:support-v4:26.1.0 (*)
+--- com.android.support.constraint:constraint-layout:1.0.2
| --- com.android.support.constraint:constraint-layout-solver:1.0.2
(*) - dependencies omitted (listed previously)
Если вы не можете изменить версию, попробуйте заставить ее использовать определенную версию.
configurations.all {
resolutionStrategy {
force "com.android.support:appcompat-v7:26.1.0"
force "com.android.support:support-v4:26.1.0"
}
}
Зависимость силы может быть различной в зависимости от того, что установлено на 28.0.0.
попробуйте изменить compileSdkVersion на: compileSdkVersion 28
У меня была такая же проблема при добавлении API навигации mapbox, и я решил эту проблему, перейдя в: файл> Структура проекта, а затем установив версию компиляции sdk и версию инструмента сборки на последнюю. А вот скриншот:
Надеюсь, поможет.
Это потому, что реализации compileSdkVersion, buildToolsVersion и Dependecies не совпадают. Вы должны сделать это так, у меня есть 28 библиотек, тогда
compileSdkVersion 28
targetSdkVersion 28
buildToolsVersion 28.0.3
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
Если вы используете Any, где меньше 28, эта ошибка должна возникнуть, поэтому попробуйте сопоставить библиотеку во всех.
Возникла такая же проблема при работе над приложением с несколькими модулями, проверьте, увеличивая ли значения compileSdkVersion
и targetSdkVersion
до 28+ в модуле, вы также делаете это для других.
Модуль работал, compileSdkVersion 29
а targetSdkVersion 29
второй модуль приложения работал на compileSdkVersion 27
и targetSdkVersion 27
.
Изменение второго модуля для компиляции и целевой версии SDK 29 решило мою проблему. Надеюсь, это кому-то поможет.
Может, уже поздно, но я нашел решение:
Вы должны отредактировать build.gradle
либо compileSdkVersion
->, чтобы последний (сейчас 28). Как это:
android {
compileSdkVersion 28
defaultConfig {
applicationId "NAME_OF_YOUR_PROJECT_DIRECTORY"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
или вы можете изменить версию реализации:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
api 'com.android.support:design:27.+'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
Нашел отличный плагин для решения этой проблемы: cordova-android-support-gradle-release
плагин cordova добавить cordova-android-support-gradle-release —variable ANDROID_SUPPORT_VERSION = 27. + —save
Чтобы решить эту проблему, необходимо применить зависимости, как показано ниже:
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.android.support:support-v4:27.1.0'
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:recyclerview-v7:27.1.0'
}
Пожалуйста, не используйте версию:
v7: 28.0.0-альфа1
Я столкнулся с той же проблемой, но я успешно решил проблему, изменив версию compileSdkVersion на самую последнюю, которая составляет 29, и изменил версию targetSdkVersion на последнюю, которая составляет 29.
Перейдите в файл gradile.build и измените compilesdkversion и targetdkversion.
в моем случае я попробовал попробовать File
> Invalidate Cache/Restart
и это работает для меня.
В моем случае эта ошибка возникла, когда я использовал
implementation 'com.android.support:appcompat-v7:+'
implementation 'com.android.support:design:+'
библиотеки вместе с гуглами
implementation 'com.google.android.material:material-components:+'
библиотека. Если это так в вашем проекте, я настоятельно рекомендую полностью удалить библиотеку компонентов материалов Google из вашего проекта.
buildscript {
project.ext {
supportLibVersion = '27.1.1'
compileVersion = 28
minSupportedVersion = 22
}
}
и установите зависимости:
implementation "com.android.support:appcompat-v7:$project.supportLibVersion"
So I installed android studio 3.0.1 and as soon as it opened the gradle built and showed the following errors. I tried adding dependencies such as design and support but in vain. Could someone help me?
Thank you in advance.
It shows that some attributes such as dialogCornerRadius and fontVariation Settings not found.
17 Answers
This error occurs because of mismatched compileSdkVersion
and
library version.
for example:
compileSdkVersion 27
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
and also avoid to use + sign with library as in the following:
implementation 'com.android.support:appcompat-v7:26.+'
use exact library version like this
implementation 'com.android.support:appcompat-v7:26.1.0'
Using + sign with the library makes it difficult for the building process to gather the exact version that is required, making system unstable, hence should be discouraged.
If you are migrated for AndroidX and getting this error, you need to set the compile SDK to Android 9.0 (API level 28) or higher
I had the exact same issue. The following thread helped me solve it. Just set your Compile SDK version to Android P.
https://stackoverflow.com/a/49172361/1542720
I fixed this issue by selecting:
API 27+: Android API 27, P preview (Preview)
in the project structure settings. the following image shows my
settings. The 13 errors that were coming while building the app, have
disappeared.
Check your dependencies for uses of +
in the versions. Some dependency could be using com.android.support:appcompat-v7:+
. This leads to problems when a new version gets released and could break features.
The solution for this would be to either use com.android.support:appcompat-v7:{compileSdkVersion}.+
or don’t use +
at all and use the full version (ex. com.android.support:appcompat-v7:26.1.0
).
If you cannot see a line in your build.gradle files for this, run in android studio terminal to give an overview of what each dependency uses
gradlew -q dependencies app:dependencies --configuration debugAndroidTestCompileClasspath
(include androidtest dependencies)
OR
gradlew -q dependencies app:dependencies --configuration debugCompileClasspath
(regular dependencies for debug)
which results in something that looks close to this
------------------------------------------------------------
Project :app
------------------------------------------------------------
debugCompileClasspath - Resolved configuration for compilation for variant: debug
...
+--- com.android.support:appcompat-v7:26.1.0
| +--- com.android.support:support-annotations:26.1.0
| +--- com.android.support:support-v4:26.1.0 (*)
| +--- com.android.support:support-vector-drawable:26.1.0
| | +--- com.android.support:support-annotations:26.1.0
| | --- com.android.support:support-compat:26.1.0 (*)
| --- com.android.support:animated-vector-drawable:26.1.0
| +--- com.android.support:support-vector-drawable:26.1.0 (*)
| --- com.android.support:support-core-ui:26.1.0 (*)
+--- com.android.support:design:26.1.0
| +--- com.android.support:support-v4:26.1.0 (*)
| +--- com.android.support:appcompat-v7:26.1.0 (*)
| +--- com.android.support:recyclerview-v7:26.1.0
| | +--- com.android.support:support-annotations:26.1.0
| | +--- com.android.support:support-compat:26.1.0 (*)
| | --- com.android.support:support-core-ui:26.1.0 (*)
| --- com.android.support:transition:26.1.0
| +--- com.android.support:support-annotations:26.1.0
| --- com.android.support:support-v4:26.1.0 (*)
+--- com.android.support.constraint:constraint-layout:1.0.2
| --- com.android.support.constraint:constraint-layout-solver:1.0.2
(*) - dependencies omitted (listed previously)
If you have no control over changing the version, Try forcing it to use a specific version.
configurations.all {
resolutionStrategy {
force "com.android.support:appcompat-v7:26.1.0"
force "com.android.support:support-v4:26.1.0"
}
}
The force dependency may need to be different depending on what is being set to 28.0.0
Had the same issue while working on an application with several modules, check to make sure as you increase the compileSdkVersion
and targetSdkVersion
to 28+ values in a module you also do for the others.
A module was running on compileSdkVersion 29
and targetSdkVersion 29
while a second module of the application was running on compileSdkVersion 27
and targetSdkVersion 27
.
Changing the second module to also compile for and target SDK version 29 resolved my issue. Hope this helps someone.
Maybe it’s too late but i found a solution:
You have to edit in the build.gradle
either the compileSdkVersion
—> to lastest (now it is 28). Like that:
android {
compileSdkVersion 28
defaultConfig {
applicationId "NAME_OF_YOUR_PROJECT_DIRECTORY"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
or you can change the version of implementation:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
api 'com.android.support:design:27.+'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
try to change the compileSdkVersion to: compileSdkVersion 28
This Is Because compileSdkVersion , buildToolsVersion and Dependecies implementations are not match
You Have to done like this i have 28 library then
compileSdkVersion 28
targetSdkVersion 28
buildToolsVersion 28.0.3
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
If we You Use Any where less than 28 this error should occured so please try match library in all.
I was having the same issue while adding a mapbox navigation API and resolved this issue by going to: file>project Structure and then setting the compile sdk version and build tool version to the latest.
And here is the screenshot:
Hope it helps.
In my case, I was getting this error in AndroidStudio 4.1.1 while updating compileSdkVersion to 29.
If you are having dependent project in build.gradle, All you need to do is Update same compileSdkVersion in dependent project’s build.gradle as well.
Steps:
- Click on your app folder in Project view of AndroidStudio.
- Select Open Module Settings.
- In Project Structure >> Check how many modules are there?
- If there are more than one modules, you will have to update compileSdkVersion, buildToolsVersion & Project dependency as well.
That worked for me
Found a neat plugin to solve this:
cordova-android-support-gradle-release
cordova plugin add cordova-android-support-gradle-release —variable ANDROID_SUPPORT_VERSION=27.+ —save
in my case, I try tried File
>Invalidate Cache/Restart
and that works for me.
The dependencies must be applied as shown below to solve this issue :
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.android.support:support-v4:27.1.0'
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:recyclerview-v7:27.1.0'
}
Please do not use the version of :
v7:28.0.0-alpha1
I faced the same problem but I successfully solved the problem by changing the version of compileSdkVersion to the latest which is 29 and change the version of targetSdkVersion to the latest which is 29.
Go to the gradile.build file and change the compilesdkversion and targetsdkversion.
In my case, this error ocurred while i was using
the
implementation 'com.android.support:appcompat-v7:+'
implementation 'com.android.support:design:+'
libraries together with googles
implementation 'com.google.android.material:material-components:+'
library. If this is the case in your project, i highly recommend to fully remove the google material components library from your project.
buildscript {
project.ext {
supportLibVersion = '27.1.1'
compileVersion = 28
minSupportedVersion = 22
}
}
and set dependencies:
implementation "com.android.support:appcompat-v7:$project.supportLibVersion"
change useAndroidX and enableJetifier to false in the file gradle.properties and remove androidx in Dependecies in my case