美文网首页
React-Native 学习之路 - 极光消息推送Could

React-Native 学习之路 - 极光消息推送Could

作者: NO我的错 | 来源:发表于2018-12-14 14:29 被阅读0次

在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"
}

相关文章

网友评论

      本文标题:React-Native 学习之路 - 极光消息推送Could

      本文链接:https://www.haomeiwen.com/subject/tqkghqtx.html