新起项目,RN版本0.69.0
在安装了react-navigation的时候。编译反复报react-native-screens:compileDebugKotlin及react-native-safe-area-context:compileDebugKotlin。
react-navigation版本:
由于react-native-screens及react-native-safe-area-context都是安装的当前最新版本,会和Kotlin版本导致冲突。在build.gradle里面加kotlinVersion = "1.6.10"解决编译失败的问题。
另:安装react-native-screens时需要在该目录下添加代码才能正常运行react-native-screens。
import android.os.Bundle;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(null);
}