React-native-orientation: Execution failed for task ':react-native-orientation:verifyReleaseResources'

Created on 22 May 2018  路  12Comments  路  Source: yamill/react-native-orientation

Hi, i am running sample application. I am using this module it's working fine in iOS and Android. My question is..... when i build an apk file in android i am getting error like below image. Please give me any suggestion. Thank you in advance.

  "react": "16.3.1",
    "react-native": "0.55.4",
    "react-native-orientation": "^3.1.3",
    "react-native-router-flux": "^4.0.0-beta.31"

screen shot 2018-05-22 at 4 40 31 pm

Most helpful comment

@Luisda199824 thanks.

Other solution:
Add subprojects {} to android/build.gradle:

buildscript {
    ext {
        buildToolsVersion = "27.0.3"    // version of build tool used for project
        minSdkVersion = 16
        compileSdkVersion = 27         // version of compile sdk used for project
        targetSdkVersion = 26
        supportLibVersion = "27.1.1"
    }
    repositories {
       ...
    }
    dependencies {
       ...
    }
}

allprojects {
    ...
}

subprojects {
    afterEvaluate { project ->
        if (project.hasProperty("android")) {
            android {
                compileSdkVersion 27        // version of compile sdk used for project
                buildToolsVersion '27.0.3'    // version of build tool used for project
            }
        }
    }
}

task wrapper(type: Wrapper) {
    ...
}

All 12 comments

@harikanammi Did you find any solution?

@GoshaEgorian, Please follow the manual linking of android.
I think It will be helpful to you.
https://github.com/yamill/react-native-orientation
(or)
can u check this once.....
https://github.com/react-native-community/react-native-svg/issues/585

@harikanammi If you see into node_modules/react-native-orientation/android/build.gradle, you see that:

#

apply plugin: 'com.android.library'

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"

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

}

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

#

I changed it to:

#

apply plugin: 'com.android.library'

android {
compileSdkVersion 26
buildToolsVersion '26.0.2'

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

}

dependencies {
implementation 'com.android.support:appcompat-v7:26.0.2'
compile "com.facebook.react:react-native:+"
}

#

And this worked for me

@Luisda199824 Thanks. It works for me.

@Luisda199824 thanks.

Other solution:
Add subprojects {} to android/build.gradle:

buildscript {
    ext {
        buildToolsVersion = "27.0.3"    // version of build tool used for project
        minSdkVersion = 16
        compileSdkVersion = 27         // version of compile sdk used for project
        targetSdkVersion = 26
        supportLibVersion = "27.1.1"
    }
    repositories {
       ...
    }
    dependencies {
       ...
    }
}

allprojects {
    ...
}

subprojects {
    afterEvaluate { project ->
        if (project.hasProperty("android")) {
            android {
                compileSdkVersion 27        // version of compile sdk used for project
                buildToolsVersion '27.0.3'    // version of build tool used for project
            }
        }
    }
}

task wrapper(type: Wrapper) {
    ...
}

@nuocgansoi solution worked for me!

Another Solution:
Use ./gradlew app:assembleRelease

Another Solution:
Use ./gradlew app:assembleRelease

Hi Could you please explain why is this working ?

Another Solution:
Use ./gradlew app:assembleRelease

Hi, would you mind providing some details about why this works? But grandlew assembleRelease doesn't.

only updating too:

    compileSdkVersion 28
    buildToolsVersion "28.0.1"

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 28

with the rest of @Luisda199824 update
worked for me

Since Google now forces everyone to use SDK version 29, this repo is indeed not usable anymore sadly.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sujay-bidchat picture sujay-bidchat  路  6Comments

MrEdinLaw picture MrEdinLaw  路  3Comments

julesmoretti picture julesmoretti  路  7Comments

cbcye picture cbcye  路  8Comments

testxin picture testxin  路  4Comments