在0.55 .4 中错误:Could not find method api() for arguments [directory 'libs'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
node_modules/jpush-react-native/android/build.gradle
node_modules/jcore-react-native/android/build.gradle
两个组件中 api 和 implementation 换成 compile
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.facebook.react:react-native:+'
}
android/app/build.gradle 中 implementation 换成 compile
dependencies {
compile fileTree(dir: "libs", include: ["*.jar"])
compile project(':jpush-react-native') // 添加 jpush 依赖
compile project(':jcore-react-native') // 添加 jcore 依赖
compile "com.facebook.react:react-native:+" // From node_modules
compile "com.android.support:appcompat-v7:23.0.1"
}