gradle not coordinated with the project - android

I am using android studio version 4.1.3 and gradle version 6.8.3 . My target sdk version for the project is API 26.
After clicking on sync the project, the result seems have no problem but after clicking on run app, I have some errors. One of them says,
gradle-6.8.3\caches\transforms-3\71de35e86c45a332199eb23f9129d32f\transformed\material-1.4.0\res\values\values.xml:1316:-1327:11: AAPT: error: style attribute 'android:attr/dialogCornerRadius' not found
I have seen the Error:(9, 5) error: resource android:attr/dialogCornerRadius not found
But again the problem is not solved
I don't know what should I do?

Related

AAPT style attribute not found

I am using android studio version 4.1.3 and gradle version 6.8.3 . My target sdk version for the project is API 26.
After clicking on sync the project, the result seems have no problem but after clicking on run app, I have an error which says,
gradle-6.8.3\caches\transforms-3\71de35e86c45a332199eb23f9129d32f\transformed\material-1.4.0\res\values\values.xml:1316:-1327:11: AAPT: error: style attribute 'android:attr/dialogCornerRadius' not found
I don't know what should I do?
Just tell me if you need more details for better diagnosis.
Thanks.

Error to Build Gradle when I Updating sdk versions

I had faced following error when I update versions in Gradle:
C:\Users\03142\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.1.1.aar\7e646e2ca904450b985ca981ac3ba677\res\values\values.xml
Error:(251, 5) error: duplicate value for resource 'attr/mode' with config ''.
Error:(251, 5) error: resource previously defined here.
How to Resolved it?
You have defined same resources for multiple times. Like you are using any module for your app but you initialled them multiple times in gradle file.

Gradle build fails after adding core ktx

When I add the core-ktx dependency to my app's build.gradle file, my gradle builds fail with the error message AAPT2 error: check logs for details
It furthermore tells that there are two attributes missing in values.xml. This file is located under the .gradle folder inside my user directory.
when I add android.enableAAPT2=false to my project properties, the build fails due to that option being deprecated so I want to avoid that.
The error descriptions of the two resource not found errors are the following:
error: resource android:attr/fontVariationSettings not found.
Message{kind=ERROR, text=error: resource android:attr/fontVariationSettings not found., sources=[C:\Users\Marc.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aar\b6d4f8d4d33639ae469eaec181e24176\res\values\values.xml], original message=, tool name=Optional.of(AAPT)}
When I add different ktx libraries everything is just fine. It builds properly and I can even import androidx.collections! How can I add the core-ktx library without any errors?
You are using 'AndroidX' which is only available if you set your compileSdkVersion 'android-P' and targetSdkVersion 28. Then in AndroidStudio go to Refactor -> Refactor to AndroidX and everything should work fine now :).

No resource found that matches the given name (at 'android:src' with value '#drawable/abc_ic_menu_moreoverflow_mtrl_alpha')

I'm updating my project to API level 25 (Android 7.1.1).
I've updated the build.gradle file:
gradle plugin version
support library versions
targetSdkVersion
compileSdkVersion
When I sync the project, I get the following error:
Error:(2752, 34) No resource found that matches the given name (at android:src with value #drawable/abc_ic_menu_moreoverflow_mtrl_alpha).
The error mentions the root of the problem as android:src.
The abc_ic_menu_moreoverflow_mtrl_alpha is not used in my project. Perhaps it is being used in some library ... ??
What is the meaning of this, and how do I resolve this issue?
Does this require updating some other components such as the build tools or the Google repository?
I'm using Android Studio 2.3.2 and Gradle 3.3 if that helps.
This resource has renamed. Change this
abc_ic_menu_moreoverflow_mtrl_alpha
TO
abc_ic_menu_overflow_material Solve the issue.

Android Studio - can't run project - Error retrieving parent for item

I've just installed Android Studio (been using eclipse until now). I started a new project. SDK version 4.0 (also tried different versions). Main Activity blank.
After the project initializes I see in the "Gradle Build" window the following errors:
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'E:\Android\sdk\build-tools\23.0.0\aapt.exe'' finished with non-zero exit value 1
And of course I can't run the project. Nothing special here. Everything "out of the box".
What is the problem here?
Your compile SDK version must be like the support library's installed version.
I am assuming that you are using version 23 of the support library, since you have the latest Android Studio installed. So you need to compile your project with version 23 of the Android SDK too.
Open your SDK Manager and install the latest API so far which is API 23. Also update your Android Support Library and Android Support Repository in case there are updates to them, then create a new project and set target version to API 23.
Hope that works for you.

Categories

Resources