Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cordova android build :app:processDebugResources failed

I woke up this morning, no code has been committed or pushed and I attempted to run a build but suddenly my build failed to give me the following error:

enter image description here

I tried updating Android Studio but that didn't work.

I looked online to check this android:attr/lStar but I could only find something related to react which I'm not using (my project is an Ionic angular application)

I am really puzzled about this has anyone tried this before?

I am using Cordova and the android version is 9.0.0

Abit more info

This is built using the command cordova build android the command that files is:

/Users/admin/myagent/_work/3/s/platforms/android/gradlew cdvBuildDebug -b /Users/admin/myagent/_work/3/s/platforms/android/build.gradle

so cdvBuildDebug -b

like image 939
Marc Rasmussen Avatar asked Jan 23 '26 08:01

Marc Rasmussen


1 Answers

Solution 1

Just open your app/build.gradle file and change this line.

androidx.core:core-ktx:+

replace with

androidx.core:core-ktx:1.6.0

Here is an Example:

ext {
    buildToolsVersion = "29.0.2"
    minSdkVersion = 21
    compileSdkVersion = 29
    targetSdkVersion = 29
    googlePlayServicesAuthVersion = "16.0.1"
    androidXCore = "1.6.0"
}

Solution 2

upgrade the compile SDK to Android 31 If you are using androidx.core:core-ktx:+ then this will find the latest version of androidx.core:core-ktx:+ and the latest one is 1.7.0 and the latest version needs the Android 31 compile SDK. So that You are facing this issue.

Here is Two Possible Solution:

1- use a specific version, use androidx.core:core-ktx:${version} instead of androidx.core:core-ktx:+

2- upgrade the compile SDK to Android 31

for more information you can see this article from here.

like image 56
Louay Sleman Avatar answered Jan 24 '26 21:01

Louay Sleman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!