react-native嵌入android原生
curl不是命令
conflict:jsr305
-
添加到android{}目录下
android{ configurations.all { resolutionStrategy.force 'com.google.code.findbugs:jsr305:3.0.0' } }
libreactnativejni.so
build.gradle添加
android{
defaultConfig{
ndk{
abiFilters "armeabi-v7a","x86"
}
packagingOptions {
exclude "lib/arm64-v8a/librealm-jni.so"
}
}
}
.v4.net.ConnectivityManagerCompat.()' is inaccessible to class 'com.f
- .gitignore(在该文件里添加排除项,node_modules/ 和 npm-debug.log)
- app/build.gradle (将 'com.android.support:appcompat-v7:24.2.1' 改为 'com.android.support:appcompat-v7:23.0.1')
- gradle.properties (在文件末尾添加,android.useDeprecatedNdk=true)
Can't find variable: __fbBatchedBridge
打开packager
adb reverse tcp:8081 tcp:8081
undefined is not a function (evaluating '(bridgeConfig.remoteModuleConfig || []).forEach')
allprojects {
repositories {
jcenter()
maven {
// All of React Native (JS, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
}
改为
allprojects {
repositories {
jcenter()
maven {
// All of React Native (JS, Android binaries) is installed from npm
url "$rootDir/node_modules/react-native/android"
}
}
}