facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
119.43k stars 24.37k forks source link

Android resource linking failed #30264

Closed jonneymendoza closed 1 year ago

jonneymendoza commented 4 years ago

Please provide all the information requested. Issues that do not follow this format are likely to stall.

Description

when i execute gradlew assembleRelease i get a android resouce lnking issue.


* What went wrong:
Execution failed for task ':react-native-passkit-wallet:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     /root/.gradle/caches/transforms-2/files-2.1/6da249295a8c8ecbd4d1ab0ef0c0da5a/core-1.5.0-alpha04/res/values/values.xml:143:5-174:25: AAPT: error: resource android:attr/fontStyle not found.

     /root/.gradle/caches/transforms-2/files-2.1/6da249295a8c8ecbd4d1ab0ef0c0da5a/core-1.5.0-alpha04/res/values/values.xml:143:5-174:25: AAPT: error: resource android:attr/font not found.

     /root/.gradle/caches/transforms-2/files-2.1/6da249295a8c8ecbd4d1ab0ef0c0da5a/core-1.5.0-alpha04/res/values/values.xml:143:5-174:25: AAPT: error: resource android:attr/fontWeight not found.

     /root/.gradle/caches/transforms-2/files-2.1/6da249295a8c8ecbd4d1ab0ef0c0da5a/core-1.5.0-alpha04/res/values/values.xml:143:5-174:25: AAPT: error: resource android:attr/fontVariationSettings not found.

     /root/.gradle/caches/transforms-2/files-2.1/6da249295a8c8ecbd4d1ab0ef0c0da5a/core-1.5.0-alpha04/res/values/values.xml:143:5-174:25: AAPT: error: resource android:attr/ttcIndex not found.

     /root/.gradle/caches/transforms-2/files-2.1/6da249295a8c8ecbd4d1ab0ef0c0da5a/core-1.5.0-alpha04/res/values/values.xml:175:5-211:25: AAPT: error: resource android:attr/startX not found.

     /root/.gradle/caches/transforms-2/files-2.1/6da249295a8c8ecbd4d1ab0ef0c0da5a/core-1.5.0-alpha04/res/values/values.xml:175:5-211:25: AAPT: error: resource android:attr/startY not found.

     /root/.gradle/caches/transforms-2/files-2.1/6da249295a8c8ecbd4d1ab0ef0c0da5a/core-1.5.0-alpha04/res/values/values.xml:175:5-211:25: AAPT: error: resource android:attr/endX not found.

     /root/.gradle/caches/transforms-2/files-2.1/6da249295a8c8ecbd4d1ab0ef0c0da5a/core-1.5.0-alpha04/res/values/values.xml:175:5-211:25: AAPT: error: resource android:attr/endY not found.

     /root/.gradle/caches/transforms-2/files-2.1/6da249295a8c8ecbd4d1ab0ef0c0da5a/core-1.5.0-alpha04/res/values/values.xml:212:5-218:25: AAPT: error: resource android:attr/offset not found.

React Native version:

system:    OS: Linux 5.8 Pop!_OS 20.10
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz    Memory: 43.90 GB / 62.41 GB
    Shell: 5.0.17 - /bin/bash  Binaries:
    Node: 14.13.1 - /home/linuxbrew/.linuxbrew/bin/node    Yarn: 1.22.10 - /home/linuxbrew/.linuxbrew/bin/yarn
    npm: 6.14.8 - /home/linuxbrew/.linuxbrew/bin/npm
    Watchman: 4.9.0 - /home/linuxbrew/.linuxbrew/bin/watchman
  SDKs:
    Android SDK:
      API Levels: 19, 23, 25, 27, 28, 29, 30
      Build Tools: 28.0.3, 29.0.2, 30.0.0, 30.0.2
      System Images: android-19 | Google APIs ARM EABI v7a, android-19 | Google APIs Intel x86 Atom, android-25 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: Not Found
  Languages:
    Java: 1.8.0_272 - /usr/bin/javac
    Python: Not Found
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: 0.63.1 => 0.63.1 
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. navigate to android/app and type ./gradlew assembleRelease

Expected Results

Successfully compile a signed APK of the react naive android app

gokhandoslu commented 4 years ago

Hi @jonneymendoza I created a PR https://github.com/miyabi/react-native-passkit-wallet/pull/16 to fix this issue. Until the PR merged, you can try by making changes in node_modules/react-native-passkit-wallet/android/build.gradle. After changing the file, clean project and compile again

./gradlew clean
./gradlew assembleRelease
jonneymendoza commented 4 years ago

Ok cool let me try and manually add it

JowelTisso commented 3 years ago

@gokhandoslu Thank you.. It worked out for me... I changed the compile sdk version and build tool version in the node_modules folder and built it successfully...

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 1 year ago

This issue was closed because it has been stalled for 7 days with no activity.