无法在额外的属性扩展上获取属性“ndkVersion”,因为它不存在于…react-native0.64.0

从 react-native 0.63.4 升级到 0.64.0

我的步骤:

  1. npx react-native run-android 到版本 0.64.0 - 这一步成功了

2. npx react-native upgrade- 这一步成功了

  1. npx react-native run-android- 此步骤失败,出现以下2 个错误

顺便说一句,在 iOS 模拟器上一切正常。

回答

您需要将ndkVersion中的android/build.gradle文件添加到中buildscript.ext,应该看起来类似于

buildscript {
    ext {
        ndkVersion = xxx //<-- Add this
        buildToolsVersion = xxx
        minSdkVersion = xxx
        compileSdkVersion = xxx
        targetSdkVersion = xxx
    }
    ... 


以上是无法在额外的属性扩展上获取属性“ndkVersion”,因为它不存在于…react-native0.64.0的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>