카테고리 없음

[react-native] android build시 npm list의 compile버전에 대한 문제

개발자_이훈규 2019. 2. 8. 14:24

Error


react-native npm 하위 프로젝트의 android compile 버전이 root project의 버전과 상이하여 발생하는 문제

error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found.
error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found.

 

Solution


this fixed for me

gradle.build에서 하위 프로젝트에 대한 버전을 명시해준다.

in android/build.gradle

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

 

Reference


link