windows环境里React-Native运行失败的原因之一,缺少依赖

命令行react-native run-android遇到如下错误:

windows环境里React-Native运行失败的原因之一,缺少依赖Could not resolve project :react-native-camera

用下列命令行安装依赖后问题仍旧存在:

npm install --save react-native-camera

windows环境里React-Native运行失败的原因之一,缺少依赖在这里链接里找到了解决方案:

https://github.com/react-native-community/react-native-camera/blob/master/docs/migrationV2.md#androidwindows环境里React-Native运行失败的原因之一,缺少依赖windows环境里React-Native运行失败的原因之一,缺少依赖

android {
    compileSdkVersion rootProject.ext.compileSdkVersion

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    defaultConfig {
        applicationId "com.bacardi"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 1
        versionName "1.0"
        missingDimensionStrategy 'react-native-camera', 'general'
    }
    splits {
        abi {
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk false  // If true, also generate a universal APK
            include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
        }
    }
    buildTypes {
        release {
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
        }
    }


上一篇:windows环境里React-Native运行失败的原因之一,安卓模拟器未启动


下一篇:Android开发学习笔记:浅谈WebView