如何手动 link npm 包 'react native reanimated'
how to manual link npm package 'react native reanimated'
任何人都可以告诉我如何手动 link
react-native-reanimated
因为自动 cli linking 不工作并且崩溃反应本机应用程序
在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')
linkMainApplication.java
中的导入和link包
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"
}
任何人都可以告诉我如何手动 link
react-native-reanimated
因为自动 cli linking 不工作并且崩溃反应本机应用程序
在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')
linkMainApplication.java
中的导入和link包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"
}