谁能告诉我如何手动链接
react-native-reanimated
因为自动 cli 链接不起作用并且崩溃反应原生应用程序
谁能告诉我如何手动链接
react-native-reanimated
因为自动 cli 链接不起作用并且崩溃反应原生应用程序
在 Android 中,将以下行添加到 android/settings.gradle
include ':react-native-reanimated'
project(':react-native-reanimated').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-reanimated/android')
将编译行添加到 android/app/build.gradle 中的依赖项中
implementation project(':react-native-reanimated')
MainApplication.java 中的导入和链接包
import com.swmansion.reanimated.ReanimatedPackage;
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new ReanimatedPackage(), );// <-- add this line
}
}
在 android/build.gradle
ext {
compileSdkVersion = 25
targetSdkVersion = 25
buildToolsVersion = "25.0.2"
googlePlayServicesVersion = "12.0.1"
supportLibVersion = "27.0.0"
}