编辑构建gradle后无法构建apk

时间:2019-03-11 12:23:15

标签: android react-native

我与某些最新的API版本存在兼容性问题,因此我不得不降级compileSdkVersion和 build.gradle的targetSdkVersion,它解决了我的兼容性问题,APP运行正常,但是当我尝试生成apk时失败 它说:

  

错误:无效的文件路径   “ /Users/mac/Documents/forgetmenot/node_modules/react-native-camera/android/build/intermediates/manifests/aapt/release/AndroidManifest.xml”。

编辑: 这里gradle构建代码:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext {
        buildToolsVersion = "27.0.3"
        minSdkVersion = 16
        compileSdkVersion = 26
        targetSdkVersion = 24
        supportLibVersion = "27.1.1"
    }
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.4'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()
        google()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
    }
}


task wrapper(type: Wrapper) {
    gradleVersion = '4.4'
    distributionUrl = distributionUrl.replace("bin", "all")
}



could you please help 

0 个答案:

没有答案