flexbox / whatwentwrong

⚛ Documenting React Native most commons issues and solutions
0 stars 0 forks source link

java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed #4

Open flexbox opened 5 years ago

flexbox commented 5 years ago

FAILURE: Build failed with an exception.

flexbox commented 5 years ago

We can force Gradle to build all the dependencies with our main project SDK version and tools versions. Add the following line to your project's android/build.gradle with your Android SDK dependency.

subprojects {
    afterEvaluate {project ->
        if (project.hasProperty("android")) {
            android {
                compileSdkVersion 27
                buildToolsVersion "27.0.2"
            }
        }
    }
}

Source: https://github.com/react-native-community/react-native-image-picker/issues/882#issuecomment-405255785