美文网首页
react-native嵌入android原生

react-native嵌入android原生

作者: 我不是死胖子 | 来源:发表于2017-04-01 16:47 被阅读212次

    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"
            }
        }
    }
    

    相关文章

      网友评论

          本文标题:react-native嵌入android原生

          本文链接:https://www.haomeiwen.com/subject/pbyovttx.html