我已经尝试过几次在手机上运行React Native的简单应用程序,但我认为我面前有一堵大墙。
我以前已完成以下修复:
将myapp / android / gradle / wrapper / gradle.properties更改如下:
... distributionUrl = https://services.gradle.org/distributions/gradle-4.1-
all.zip
所以我的build.gradle是这样的:
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}
allprojects {
repositories {
mavenLocal()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
google()
}
}
ext {
buildToolsVersion = "26.0.3"
minSdkVersion = 16
compileSdkVersion = 26
targetSdkVersion = 26
supportLibVersion = "26.1.0"
}
我找不到更多!感谢您的帮助。