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

Does not compile for release on android with RN 0.57 #51

Open
mieszko4 opened this issue Jan 19, 2019 · 3 comments
Open

Does not compile for release on android with RN 0.57 #51

mieszko4 opened this issue Jan 19, 2019 · 3 comments

Comments

@mieszko4
Copy link

mieszko4 commented Jan 19, 2019

When I compile this with new RN 0.57 I get the following errors:

The project name '@remobile/react-native-toast' contains at least one of the following characters: [ , /, \, :, <, >, ", ?, *, |]. This has been deprecated and is scheduled to be removed in Gradle 5.0. Set the 'rootProject.name' or adjust the 'include' statement (see https://docs.gradle.org/4.4/dsl/org.gradle.api.initialization.Settings.html#org.gradle.api.initialization.Settings:include(java.lang.String[]) for more details).

> Configure project :@remobile/react-native-toast 
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (23.0.1) is ignored, as it is below the minimum supported version (27.0.3) for Android Gradle Plugin 3.1.4.
Android SDK Build Tools 27.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '23.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

and

error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found.
error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found.
/home/mieszko4/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/2894229df102aba6e62f0ed03c56206b/res/values-v26/values-v26.xml:9:5-12:13: AAPT: error: resource android:attr/colorError not found.
    
/home/mieszko4/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/2894229df102aba6e62f0ed03c56206b/res/values-v26/values-v26.xml:13:5-16:13: AAPT: error: resource android:attr/colorError not found.
    
/home/mieszko4/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/2894229df102aba6e62f0ed03c56206b/res/values-v26/values-v26.xml:17:5-93: AAPT: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
    
/home/mieszko4/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/2894229df102aba6e62f0ed03c56206b/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/fontStyle not found.
    
/home/mieszko4/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/2894229df102aba6e62f0ed03c56206b/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/font not found.
    
/home/mieszko4/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/2894229df102aba6e62f0ed03c56206b/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/fontWeight not found.
    
error: failed linking references.

This happens when I run for release (for debug it works ok)
I am using com.android.tools.build:gradle:3.1.4
As a workaround the following helps:

subprojects {
    afterEvaluate {project ->
        if (project.hasProperty("android")) {
            android {
                compileSdkVersion rootProject.ext.compileSdkVersion
                buildToolsVersion rootProject.ext.buildToolsVersion
            }
        }
    }
}
@yellowpig
Copy link

I change the compileSdkVersion buildToolsVersion targetSdkVersion in './node_modules/@remobile/react-native-toast/android/build.gradle' to my project's version. Solved this problem temporarily.

@mieszko4
Copy link
Author

@fov42550564 Is this project dead? I see lots of prs with potential fix for this issue.

@ibedwi
Copy link

ibedwi commented Jun 25, 2019

I change the compileSdkVersion buildToolsVersion targetSdkVersion in './node_modules/@remobile/react-native-toast/android/build.gradle' to my project's version. Solved this problem temporarily.

This works for me. Thanks!

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

3 participants