Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AAPT: error: resource android:attr/lStar not found #440

Closed
5 tasks done
swadeshkamlesh opened this issue Sep 30, 2021 · 14 comments
Closed
5 tasks done

AAPT: error: resource android:attr/lStar not found #440

swadeshkamlesh opened this issue Sep 30, 2021 · 14 comments

Comments

@swadeshkamlesh
Copy link

swadeshkamlesh commented Sep 30, 2021

While building apk we are facing this issue -- AAPT: error: resource android:attr/lStar not found
All new project and old project

Execution failed for task ':app:processDebugResources'.
FAILED

Android resource linking failed
C:\Users\kamlesh.gradle\caches\transforms-1\files-1.1\appcompat-1.4.0-beta01.aar\97b333eeae39b4b443d1c2079f33a72e\res\values\values.xml:2422:5-2449:25: AAPT: error: resource android:attr/lStar not found.

error: failed linking references.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 34s
23 actionable tasks: 21 executed, 2 up-to-date
D:\ionic\carworld\platforms\android\gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:processDebugResources'.

Android resource linking failed
C:\Users\kamlesh.gradle\caches\transforms-1\files-1.1\appcompat-1.4.0-beta01.aar\97b333eeae39b4b443d1c2079f33a72e\res\values\values.xml:2422:5-2449:25: AAPT: error: resource android:attr/lStar not found.

error: failed linking references.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 34s

Bug report

CHECKLIST

  • I have reproduced the issue using the example project or provided the necessary information to reproduce the issue.
  • I have checked that no similar issues (open or closed) already exist.

Current behavior:

Expected behavior:

Steps to reproduce:

Screenshots

Environment information

  • Cordova CLI version
    • cordova -v
  • Cordova platform version
    • cordova platform ls
  • Plugins & versions installed in project (including this plugin)
    • cordova plugin ls
  • Dev machine OS and version, e.g.
    • OSX
      • sw_vers
    • Windows 10
      • winver

Runtime issue

  • Device details
    • e.g. iPhone X, Samsung Galaxy S8, iPhone X Simulator, Pixel XL Emulator
  • OS details
    • e.g. iOS 12.2, Android 9.0

Android build issue:

  • Node JS version
    • node -v
  • Gradle version
    • ls platforms/android/.gradle
  • Target Android SDK version
    • android:targetSdkVersion in AndroidManifest.xml
  • Android SDK details
    • sdkmanager --list | sed -e '/Available Packages/q'

iOS build issue:

  • Node JS version
    • node -v
  • XCode version

Related code:

insert any relevant code here such as plugin API calls / input parameters

Console output

console output

// Paste any relevant JS/native console output here



Other information:

@ucsbricks
Copy link

This issue is related to androidx.appcompat:appcompat 1.4.0-beta01 released on September 29, 2021.

As plugin.xml defines ANDROIDX_VERSION as major version 1 (1.+), 1.4.0-beta01 was used instead of 1.3.0. Unfortunately you cannot simply use cordova plugin add cordova.plugins.diagnostic --variable ANDROIDX_VERSION=1.3.+ to overwrite the value, as the same version would be used for androidx.legacy:legacy-support-v4 which exists as version 1.0.0 only.

I successfully used cordova plugin add cordova.plugins.diagnostic --variable ANDROIDX_VERSION="[1.0, 1.4[" to get my builds fixed.

@ucsbricks
Copy link

ucsbricks commented Sep 30, 2021

I created a PR to fix plugin.xml #441

@Doomkyn
Copy link

Doomkyn commented Oct 1, 2021

This issue is related to androidx.appcompat:appcompat 1.4.0-beta01 released on September 29, 2021.

As plugin.xml defines ANDROIDX_VERSION as major version 1 (1.+), 1.4.0-beta01 was used instead of 1.3.0. Unfortunately you cannot simply use cordova plugin add cordova.plugins.diagnostic --variable ANDROIDX_VERSION=1.3.+ to overwrite the value, as the same version would be used for androidx.legacy:legacy-support-v4 which exists as version 1.0.0 only.

I successfully used cordova plugin add cordova.plugins.diagnostic --variable ANDROIDX_VERSION="[1.0, 1.4[" to get my builds fixed.

This did not work for me. Still got the same error:

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
  C:\Users\user\.gradle\caches\transforms-1\files-1.1\appcompat-1.4.0-beta01.aar\44d19d1897a0637d7141365a653800f4\res\values\values.xml:2422:5-2449:25: AAPT: error: resource android:attr/lStar not found.   

  error: failed linking references.

@phal0r
Copy link

phal0r commented Oct 1, 2021

I think PR #441 would also solve the problem for Capacitor. We cannot use install variables in Capacitor, so for us also 1.4.0-beta01 is installed, which breaks, because compileSdk is currently 30, but the plugin has a minium of 31 set.

@dpa99c dpa99c closed this as completed in cb6ca10 Oct 1, 2021
@dpa99c
Copy link
Owner

dpa99c commented Oct 1, 2021

The fix for this has been published to npm in v6.0.4
Note you may need to update the value for the ANDROIDX_VERSION plugin variable in your project's package.json and plugins/fetch.json to align with the new default set in this plugin's plugin.xml

@Harsh8796
Copy link

Harsh8796 commented Oct 2, 2021

Try to install again cordova.plugins.diagnostic. using
if you are capacitor user
npm install cordova.plugins.diagnostic
npm install @ionic-native/diagnostic
ionic cap sync

and if you are cordova user
ionic cordova plugin add cordova.plugins.diagnostic
npm install @ionic-native/diagnostic

@ProximaHaiz
Copy link

#440 (comment)
It have worked for me, thank you

@Techpro-naitik
Copy link

can you explain this issue in case of capacitor .& how to resolve this issue .

@damsorian
Copy link

damsorian commented Oct 5, 2021

#440 (comment) It have worked for me, thank you

@ProximaHaiz it's working for you, with capacitor or cordova?

@tameemkazia35
Copy link

Try to install again cordova.plugins.diagnostic. using if you are capacitor user npm install cordova.plugins.diagnostic npm install @ionic-native/diagnostic ionic cap sync and if you are cordova user ionic cordova plugin add cordova.plugins.diagnostic npm install @ionic-native/diagnostic

Thanks it worked for me

@Harsh8796
Copy link

can you explain this issue in case of capacitor .& how to resolve this issue .

can you explain this issue in case of capacitor .& how to resolve this issue .

Just re-run this command

npm install cordova.plugins.diagnostic
npm install @ionic-native/diagnostic
ionic cap sync

@jlmosconi
Copy link

jlmosconi commented Oct 7, 2021

This issue is related to androidx.appcompat:appcompat 1.4.0-beta01 released on September 29, 2021.

As plugin.xml defines ANDROIDX_VERSION as major version 1 (1.+), 1.4.0-beta01 was used instead of 1.3.0. Unfortunately you cannot simply use cordova plugin add cordova.plugins.diagnostic --variable ANDROIDX_VERSION=1.3.+ to overwrite the value, as the same version would be used for androidx.legacy:legacy-support-v4 which exists as version 1.0.0 only.

I successfully used cordova plugin add cordova.plugins.diagnostic --variable ANDROIDX_VERSION="[1.0, 1.4[" to get my builds fixed.

Thanks! it worked for me. (Cordova)

cordova plugin add cordova.plugins.diagnostic --variable ANDROIDX_VERSION="[1.0, 1.4["

and upgrade targetSdkVersion to 31
<preference name="android-targetSdkVersion" value="31" />

@jpiero-exus
Copy link

This issue is related to androidx.appcompat:appcompat 1.4.0-beta01 released on September 29, 2021.

As plugin.xml defines ANDROIDX_VERSION as major version 1 (1.+), 1.4.0-beta01 was used instead of 1.3.0. Unfortunately you cannot simply use cordova plugin add cordova.plugins.diagnostic --variable ANDROIDX_VERSION=1.3.+ to overwrite the value, as the same version would be used for androidx.legacy:legacy-support-v4 which exists as version 1.0.0 only.

I successfully used cordova plugin add cordova.plugins.diagnostic --variable ANDROIDX_VERSION="[1.0, 1.4[" to get my builds fixed.

Work for me!! Thanks so much!! 👏

@GianLucaFinelli
Copy link

This issue is related to androidx.appcompat:appcompat 1.4.0-beta01 released on September 29, 2021.
As plugin.xml defines ANDROIDX_VERSION as major version 1 (1.+), 1.4.0-beta01 was used instead of 1.3.0. Unfortunately you cannot simply use cordova plugin add cordova.plugins.diagnostic --variable ANDROIDX_VERSION=1.3.+ to overwrite the value, as the same version would be used for androidx.legacy:legacy-support-v4 which exists as version 1.0.0 only.
I successfully used cordova plugin add cordova.plugins.diagnostic --variable ANDROIDX_VERSION="[1.0, 1.4[" to get my builds fixed.

This did not work for me. Still got the same error:

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
  C:\Users\user\.gradle\caches\transforms-1\files-1.1\appcompat-1.4.0-beta01.aar\44d19d1897a0637d7141365a653800f4\res\values\values.xml:2422:5-2449:25: AAPT: error: resource android:attr/lStar not found.   

  error: failed linking references.

I get the same result, it didn't work for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests