2023-02-12 The minCompileSdk (31) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-29).
初始化rn项目,as中运行app,报错:
The minCompileSdk (31) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-29).
// 依赖项的AAR元数据(META-INF.com/android/build/gradle/AAR-metadata.properties)中指定的minCompileSdk(31)大于此模块的compileSdkVersion(android-29)。
原因:compileSdkVersion版本过低,需要升级到31
解决方案:
找到rn项目/android/build.gradle文件,搜索buildscript,添加:
etx.compileSdkVersion = 31
或者你的可能是
ext { compileSdkVersion = 31 ... }

浙公网安备 33010602011771号