我在 React Native 中遇到这个错误。 这question说放
ext {
compileSdkVersion = 26
在“顶级文件”中。 React Native 中的“顶级文件”是什么?
module/build.gradle
已经有了
安卓{
compileSdkVersion rootProject.ext.compileSdkVersion...
最佳答案
React Native android 有两个build.gradle 文件
// android/build.gradle
ext {
buildToolsVersion = "26.0.3"
minSdkVersion = 16
compileSdkVersion = 26
targetSdkVersion = 26
supportLibVersion = "26.1.0"
}
//android/app/build.gradle
android {
compileSdkVersion rootProject.ext.compileSdkVersion
}
关于android - REACT NATIVE 无法在额外属性扩展上获取属性 'compileSdkVersion',因为它不存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51618289/