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

resource android:attr/dialogCornerRadius not found. #4671

Closed
genglei01 opened this issue Feb 1, 2019 · 11 comments
Closed

resource android:attr/dialogCornerRadius not found. #4671

genglei01 opened this issue Feb 1, 2019 · 11 comments

Comments

@genglei01
Copy link

Issue Description

Get error like the following when run npm run android
[ENTER DESCRIPTION HERE]

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':react-native-navigation:processReactNative51DebugAndroidTestResources'.

Android resource linking failed
Output: PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/intermediates/incremental/mergeReactNative51DebugAndroidTestResources/merged.dir/values-v28/values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/intermediates/incremental/mergeReactNative51DebugAndroidTestResources/merged.dir/values-v28/values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/intermediates/incremental/mergeReactNative51DebugAndroidTestResources/merged.dir/values/values.xml:1047: error: resource android:attr/fontVariationSettings not found.
PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/intermediates/incremental/mergeReactNative51DebugAndroidTestResources/merged.dir/values/values.xml:1048: error: resource android:attr/ttcIndex not found.
error: failed linking references.

Command: user/java/gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-osx.jar/01679366724b6cc8d75f761ec8d23958/aapt2-3.2.1-4818971-osx/aapt2 link -I
user/Library/Android/sdk/platforms/android-26/android.jar
--manifest
PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/intermediates/merged_manifests/reactNative51DebugAndroidTest/processReactNative51DebugAndroidTestManifest/merged/AndroidManifest.xml
-o
PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/intermediates/processed_res/reactNative51DebugAndroidTest/processReactNative51DebugAndroidTestResources/out/resources-reactNative51DebugAndroidTest.ap_
-R
@PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/intermediates/incremental/processReactNative51DebugAndroidTestResources/resources-list-for-resources-reactNative51DebugAndroidTest.ap_.txt
--auto-add-overlay
--java
PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/generated/not_namespaced_r_class_sources/reactNative51DebugAndroidTest/processReactNative51DebugAndroidTestResources/r
-0
apk
--output-text-symbols
PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/intermediates/symbols/androidTest/reactNative51/debug/R.txt
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-osx Daemon #0
Output: user/Documents/java/gradle/caches/transforms-1/files-1.1/appcompat-v7-28.0.0.aar/788639be9df739a4d85280dd2698b112/res/values-v28/values-v28.xml:9:5-12:13: AAPT: error: resource android:attr/dialogCornerRadius not found.

PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/intermediates/incremental/mergeReactNative51DebugAndroidTestResources/merged.dir/values-v28/values-v28.xml:11: AAPT: error: resource android:attr/dialogCornerRadius not found.

user/Documents/java/gradle/caches/transforms-1/files-1.1/design-26.1.0.aar/b2741e663f525b0147aac8cf2e40d225/res/values/values.xml:159:5-202: AAPT: error: resource android:attr/fontVariationSettings not found.

user/Documents/java/gradle/caches/transforms-1/files-1.1/design-26.1.0.aar/b2741e663f525b0147aac8cf2e40d225/res/values/values.xml:159:5-202: AAPT: error: resource android:attr/ttcIndex not found.

error: failed linking references.
Command: userjava/gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-osx.jar/01679366724b6cc8d75f761ec8d23958/aapt2-3.2.1-4818971-osx/aapt2 link -I
user/Library/Android/sdk/platforms/android-26/android.jar
--manifest
PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/intermediates/merged_manifests/reactNative51DebugAndroidTest/processReactNative51DebugAndroidTestManifest/merged/AndroidManifest.xml
-o
PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/intermediates/processed_res/reactNative51DebugAndroidTest/processReactNative51DebugAndroidTestResources/out/resources-reactNative51DebugAndroidTest.ap_
-R
@PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/intermediates/incremental/processReactNative51DebugAndroidTestResources/resources-list-for-resources-reactNative51DebugAndroidTest.ap_.txt
--auto-add-overlay
--java
PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/generated/not_namespaced_r_class_sources/reactNative51DebugAndroidTest/processReactNative51DebugAndroidTestResources/r
-0
apk
--output-text-symbols
PROJECT_ROOT/node_modules/react-native-navigation/lib/android/app/build/intermediates/symbols/androidTest/reactNative51/debug/R.txt
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-osx Daemon #0

Steps to Reproduce / Code Snippets / Screenshots

config : "android": "cd ./android && ./gradlew app:assembleDebug && ./gradlew installDebug"
https://wix.github.io/react-native-navigation/#/docs/Installing?id=android

npm run android


Environment

  • React Native Navigation version: 2.8
  • React Native version: 0.58
  • Platform(s) (iOS, Android, or both?): Android
@cinder92
Copy link

cinder92 commented Feb 7, 2019

did you find any solution?

@mCodex
Copy link

mCodex commented Feb 11, 2019

I had a similar problem with AAPT2 which is disabled by default, what I did to fix my problem was just update react-native-navigation's compileSdkVersion,targetSdkVersion,buildToolsVersion in its build.gradle to same version as mine and the problem was solved.

I hope it helps

@no131614
Copy link

I had a similar problem with AAPT2 which is disabled by default, what I did to fix my problem was just update react-native-navigation's compileSdkVersion,targetSdkVersion,buildToolsVersion in its gradle.properties to same version as mine and the problem was solved.

I hope it helps

I have the same problem too. Could you be a bit more specific on how to update react-native-vavigation gradle properties properly to the correct version ? Thanks for the help.

@mCodex
Copy link

mCodex commented Feb 25, 2019

I had a similar problem with AAPT2 which is disabled by default, what I did to fix my problem was just update react-native-navigation's compileSdkVersion,targetSdkVersion,buildToolsVersion in its gradle.properties to same version as mine and the problem was solved.
I hope it helps

I have the same problem too. Could you be a bit more specific on how to update react-native-vavigation gradle properties properly to the correct version ? Thanks for the help.

Of course, I got into react-native-navigation's android folder (./node_modules/react-native-navigation/lib/android/app/build.gradle (or open it up in Android Studio) and changed lines 5 to 12 to:

android {
    compileSdkVersion 28
    buildToolsVersion '28.0.3'

    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
    }
   ...

In my project I've been using android sdk version 28. (If you don't know which version you are using just check your build.gradle inside your android/app folder.

But note, if you run npm i or yarnor even install a new library in your project you may have to do it again. Maybe you can optimize those steps running a .sh script or doing something else 😄

I'm using:

  • React-Native-Navigation - 2.12.0
  • React-Native - 0.58.5
  • React - 16.6.3

@jdnichollsc
Copy link

Try this:

  • /android/build.gradle
subprojects {
    afterEvaluate {project ->
        if (project.hasProperty("android")) {
            android {
                compileSdkVersion compileSdkVersion
                buildToolsVersion "$buildToolsVersion"
            }
        }
    }
}

ext {
    buildToolsVersion = "28.0.3"
    minSdkVersion = 16
    compileSdkVersion = 28
    targetSdkVersion = 27
    supportLibVersion = "28.0.0"
}
  • /android/app/build.gradle

android {
    compileSdkVersion rootProject.ext.compileSdkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion

    defaultConfig {
        applicationId "com.modularapp"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 1
        versionName "1.0"
    }

Regards, Juan

@ancyrweb
Copy link

Setting compileSdkVersion to 28 solved it for me.

@stale
Copy link

stale bot commented Apr 12, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.

@stale stale bot added the 🏚 stale label Apr 12, 2019
@stale
Copy link

stale bot commented Apr 19, 2019

The issue has been closed for inactivity.

@nileshpandey3
Copy link

I had a similar problem with AAPT2 which is disabled by default, what I did to fix my problem was just update react-native-navigation's compileSdkVersion,targetSdkVersion,buildToolsVersion in its gradle.properties to same version as mine and the problem was solved.
I hope it helps

I have the same problem too. Could you be a bit more specific on how to update react-native-vavigation gradle properties properly to the correct version ? Thanks for the help.

Of course, I got into react-native-navigation's android folder (./node_modules/react-native-navigation/lib/android/app/build.gradle (or open it up in Android Studio) and changed lines 5 to 12 to:

android {
    compileSdkVersion 28
    buildToolsVersion '28.0.3'

    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
    }
   ...

In my project I've been using android sdk version 28. (If you don't know which version you are using just check your build.gradle inside your android/app folder.

But note, if you run npm i or yarnor even install a new library in your project you may have to do it again. Maybe you can optimize those steps running a .sh script or doing something else 😄

I'm using:

  • React-Native-Navigation - 2.12.0
  • React-Native - 0.58.5
  • React - 16.6.3

Solved my issue too. Thanks

@nileshpandey3
Copy link

Setting compileSdkVersion to 28 solved it for me.

Solved my issue too.

@CemaSkopea
Copy link

Try this:

  • /android/build.gradle
subprojects {
    afterEvaluate {project ->
        if (project.hasProperty("android")) {
            android {
                compileSdkVersion compileSdkVersion
                buildToolsVersion "$buildToolsVersion"
            }
        }
    }
}

ext {
    buildToolsVersion = "28.0.3"
    minSdkVersion = 16
    compileSdkVersion = 28
    targetSdkVersion = 27
    supportLibVersion = "28.0.0"
}
  • /android/app/build.gradle

android {
    compileSdkVersion rootProject.ext.compileSdkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion

    defaultConfig {
        applicationId "com.modularapp"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 1
        versionName "1.0"
    }

Regards, Juan

Thank you... thank you.... thaaaaaankkkkkk youuuuuuuuuuu :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants