aliyun / aliyun-oss-react-native

MIT License
148 stars 99 forks source link

android打包时报 `verifyReleaseResources` #70

Open quanzaiyu opened 4 years ago

quanzaiyu commented 4 years ago

android打包时报 verifyReleaseResources, 错误详情:

> Task :aliyun-oss-react-native:verifyReleaseResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':aliyun-oss-react-native:verifyReleaseResources'.

我知道解决方案, 但是希望官方尽快修复此问题

解决方案如下:

  1. 首先在 node_modules 中找到报错的包里面的build.gradle,比如我这个就是 \node_modules\aliyun-oss-react-native\android\build.gradle
  2. 修改这个 build.gradle,使其与 android/build.gradle 里面的SDK版本保持一致
  3. build.gradle 里的 compile 改为 implementation,因为 compile 已过时

修改结果为:

android {
    compileSdkVersion 28
    buildToolsVersion "28.0.3"

    // ...
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.facebook.react:react-native:+'
}