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

Task :react-native-orientation:verifyReleaseResources FAILED #396

Open
piscespieces opened this issue Mar 18, 2021 · 16 comments
Open

Task :react-native-orientation:verifyReleaseResources FAILED #396

piscespieces opened this issue Mar 18, 2021 · 16 comments

Comments

@piscespieces
Copy link

When generating the Android APK file for my project I would run in the android folder ./gradlew assembleRelease command.

It would log the following error:

Task :react-native-orientation:verifyReleaseResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-orientation:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     /Users/aeum3893/.gradle/caches/transforms-2/files-2.1/40fbf5f2fad154d2097847c5f892fc34/appcompat-1.0.2/res/values-v26/values-v26.xml:5:5-8:13: AAPT: error: resource android:attr/colorError not found.
         
     /Users/aeum3893/.gradle/caches/transforms-2/files-2.1/40fbf5f2fad154d2097847c5f892fc34/appcompat-1.0.2/res/values-v26/values-v26.xml:9:5-12:13: AAPT: error: resource android:attr/colorError not found.
         
     /Users/aeum3893/.gradle/caches/transforms-2/files-2.1/40fbf5f2fad154d2097847c5f892fc34/appcompat-1.0.2/res/values-v26/values-v26.xml:13:5-16:13: AAPT: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
         
     /Users/aeum3893/.gradle/caches/transforms-2/files-2.1/40fbf5f2fad154d2097847c5f892fc34/appcompat-1.0.2/res/values-v28/values-v28.xml:5:5-8:13: AAPT: error: resource android:attr/dialogCornerRadius not found.
         
     /Users/aeum3893/.gradle/caches/transforms-2/files-2.1/40fbf5f2fad154d2097847c5f892fc34/appcompat-1.0.2/res/values-v28/values-v28.xml:9:5-12:13: AAPT: error: resource android:attr/dialogCornerRadius not found.
         
     /Users/aeum3893/.gradle/caches/transforms-2/files-2.1/c2c18b306f60dd0c1da0301fc5c7b480/core-1.0.1/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/fontStyle not found.
         
     /Users/aeum3893/.gradle/caches/transforms-2/files-2.1/c2c18b306f60dd0c1da0301fc5c7b480/core-1.0.1/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/font not found.
         
     /Users/aeum3893/.gradle/caches/transforms-2/files-2.1/c2c18b306f60dd0c1da0301fc5c7b480/core-1.0.1/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/fontWeight not found.
         
     /Users/aeum3893/.gradle/caches/transforms-2/files-2.1/c2c18b306f60dd0c1da0301fc5c7b480/core-1.0.1/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/fontVariationSettings not found.
         
     /Users/aeum3893/.gradle/caches/transforms-2/files-2.1/c2c18b306f60dd0c1da0301fc5c7b480/core-1.0.1/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/ttcIndex not found.
         
     /Users/aeum3893/.gradle/caches/transforms-2/files-2.1/c2c18b306f60dd0c1da0301fc5c7b480/core-1.0.1/res/values/values.xml:89:5-125:25: AAPT: error: resource android:attr/startX not found.
         
     /Users/aeum3893/.gradle/caches/transforms-2/files-2.1/c2c18b306f60dd0c1da0301fc5c7b480/core-1.0.1/res/values/values.xml:89:5-125:25: AAPT: error: resource android:attr/startY not found.
         
     /Users/aeum3893/.gradle/caches/transforms-2/files-2.1/c2c18b306f60dd0c1da0301fc5c7b480/core-1.0.1/res/values/values.xml:89:5-125:25: AAPT: error: resource android:attr/endX not found.
         
     /Users/aeum3893/.gradle/caches/transforms-2/files-2.1/c2c18b306f60dd0c1da0301fc5c7b480/core-1.0.1/res/values/values.xml:89:5-125:25: AAPT: error: resource android:attr/endY not found.
         
     /Users/aeum3893/.gradle/caches/transforms-2/files-2.1/c2c18b306f60dd0c1da0301fc5c7b480/core-1.0.1/res/values/values.xml:126:5-132:25: AAPT: error: resource android:attr/offset not found.

I have successfully gone through the automatic linking setup already. Tried manual and got the same error. I don't know what else to do.

@Sccccmu
Copy link

Sccccmu commented Mar 24, 2021

C5ED639C-04FA-4049-BBA0-BA647005D263

@daonamutc1
Copy link

daonamutc1 commented Apr 16, 2021

I had same error, if you are generating aab, try use ./gradlew bundleRelease

@ThanhNguyen140797
Copy link

same error when ./gradlew assembleRelease

@ThanhNguyen140797
Copy link

./gradlew app:assembleRelease fix this error

@piscespieces
Copy link
Author

@ThanhNguyen140797 Yes, for me the ./gradlew app:assembleRelease command worked to generate the APK. However when installing the APK in the Android Simulator the app was crashing right away.

Couldn't tell what worked for me because I experimented quite a bit to get it working until I got it to work.
Pretty much uninstalled react-native-orientation completely and then installed it. Went through the manual linking process again. Also in the build.gradle file located in node_modules/react-native-orientation/android/build.gradle made sure to match the compileSdkVersion and buildToolsVersion with the one being used in android/build.gradle.

Then running ./gradlew clean && ./gradlew assembleRelease did work to generate the APK.

@ghost
Copy link

ghost commented May 31, 2021

I encountered the same error, but by changing node_modules/react-native-orientation/android/build.gradle to the following, assembleRelease completed successfully.

apply plugin: 'com.android.library'

android {
-   compileSdkVersion 23
+   compileSdkVersion 28
-   buildToolsVersion "23.0.1"
+   buildToolsVersion "28.0.3"

    defaultConfig {
        minSdkVersion 16
-       targetSdkVersion 22
+       targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }
}

dependencies {
    compile "com.facebook.react:react-native:+"
}

@fatemekarami
Copy link

./gradlew app:assembleRelease fix this error

thanks. its fix my problem

@SujanAU2914421
Copy link

I had same error, if you are generating aab, try use ./gradlew bundleRelease

What that aab mean ? Will it be uploaded in google play store... ?

@BridgeEast
Copy link

BridgeEast commented Dec 1, 2021

add this to build.gradle

subprojects {
  afterEvaluate {
    project ->
      if (project.hasProperty("android")) {
        android {
          compileSdkVersion = 30
          buildToolsVersion = "30.0.3"
          compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
          }
        }
      }
  }
}

@mandakha
Copy link

Thank you, this one worked!

@mfrag38
Copy link

mfrag38 commented Jun 8, 2022

That solved my issue, thanks

@Faris-Salman001
Copy link

@ThanhNguyen140797 thanx its works for me

@Zuxelus
Copy link

Zuxelus commented Jul 14, 2022

In my case the same problem was in parallel task. One task was locking files so the other cannot get access to them.
Solved by changing org.gradle.parallel=true ->org.gradle.parallel=false in android/gradle.properties

@tungxuan1656
Copy link

./gradlew app:assembleRelease fix this error

thanks, its works for me

@Jelezik
Copy link

Jelezik commented Jan 8, 2023

Thanks bro

@mohamedadel1994825
Copy link

Hi 👋 ,
I Fixed that issue by making the compileSdkVersion , targetSdkVersion minSdkVersion in the build.gradle for library the same as my build.gradle in android floder of my project

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