【发布时间】:2019-08-14 15:27:29
【问题描述】:
首先我运行一个新项目
react-native init AwesomeProject --version 0.58.6
(0.59.1有一个bug,但我用它测试了这个问题)
react-native run-android 我可以运行它。
在 android studio 中同步时出现错误:
app/build.gradle:
import com.android.build.OutputFile
错误:无法解析符号“构建”
我使用这些版本:
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 27
supportLibVersion = "28.0.0"
}
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
【问题讨论】:
标签: android react-native android-gradle-plugin react-native-android