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

Android resource linking failed #105

Closed
jungRoit opened this issue Oct 22, 2019 · 4 comments
Closed

Android resource linking failed #105

jungRoit opened this issue Oct 22, 2019 · 4 comments

Comments

@jungRoit
Copy link

I am having this error when creating an APK on android.

Execution failed for task ':react-native-ux-cam:verifyReleaseResources'.
> 1 exception was raised by workers:
  com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
  /home/lf/Documents/fieldapp/node_modules/react-native-ux-cam/android/build/intermediates/res/merged/release/values-v28/values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
  /home/lf/Documents/fieldapp/node_modules/react-native-ux-cam/android/build/intermediates/res/merged/release/values-v28/values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
  /home/lf/Documents/fieldapp/node_modules/react-native-ux-cam/android/build/intermediates/res/merged/release/values/values.xml:2714: error: resource android:attr/fontVariationSettings not found.
  /home/lf/Documents/fieldapp/node_modules/react-native-ux-cam/android/build/intermediates/res/merged/release/values/values.xml:2715: error: resource android:attr/ttcIndex not found.
  error: failed linking references.

I am able to fix this problem by changing the following code in android build.gradle

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.3"

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
    }

i changed "compileSdkVersion", "buildToolsVersion" and "targetSdkVersion" from 26 to 28.
can I send a PR to make these changes?
I always need to make these changes manually while building the APK.

@susanuxcam
Copy link

Hey @jungRoit, thanks for letting us know about the issue. I've already sent it to our developers and I will come back to you as soon as I hear back from them.

@susanuxcam
Copy link

hey again @jungRoit! I just wanted to let you know that this issue has been resolved with the latest release. Please, make sure to do a version update and verify if it helped. Thanks!

@henrique-in
Copy link

I have this problem when generating an apk

   buildToolsVersion = "31.0.0"
   minSdkVersion = 26
    compileSdkVersion = 31
    targetSdkVersion = 31
    kotlinVersion = '1.6.0'
    androidXCore = "1.6.0"

Task :react-native-ux-cam:verifyReleaseResources FAILED FAILURE: Build failed with an exception.What went wrong: Execution failed for task ':react-native-ux-cam:verifyReleaseResources'. A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action Android resource linking failed ERROR:/Users/henrique/.gradle/caches/transforms-3/3f599f9ca437831042d19dc7e14e670e/transformed/core-1.7.0/res/values/values.xml:105:5-114:25: AAPT: error: resource android:attr/lStar not found.

@meznaric
Copy link

@henrique-in 👇

If anyone finds themselves here in this issue, it turns out it's a widespread RN issue: facebook/react-native#35210 . Upgrading RN fixed it for us.

Also note, this repository is deprecated so you should probably continue discussion in https://github.com/uxcam/react-native-ux-cam

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

5 participants