ReactNative依赖库产生的环境问题

感觉rn的各种库各种环境问题就够自己喝一壶的了~~~
1、

* Where:
Build file 'D:\ReactNativePro\XXX\node_modules\react-native-languages\android\build.gradle' line: 24

* What went wrong:
A problem occurred evaluating project ':react-native-languages'.
> Could not find method implementation() for arguments [com.facebook.react:react-native:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

解决:

找到D:\ReactNativePro\XXX\node_modules\react-native-languages\android\build.gradle文件,并将implementation改为compile

2、

* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
   > A problem occurred configuring project ':react-native-languages'.
      > Could not find appcompat-v7.jar (com.android.support:appcompat-v7:26.1.0).
        Searched in the following locations:
            https://jcenter.bintray.com/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.jar

解决
找到node_modules下的react-native-languages库,打开找到android/build.gradle 在其中添加compile "com.android.support:appcompat-v7:27.1.1"
在这里插入图片描述

3、

:jpush-react-native:processReleaseResources
D:\ReactNativePro\HealthManagerRN_iOS_Doc\node_modules\jpush-react-native\android\build\intermediates\res\merged\release\values-v24\values-v24.x
ml:3: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borde
rless.Colored'.

解决:
找到对应的目录修改compileSdkVersion跟buildToolsVersion,我的修改成了27 和27.0.3
ReactNative依赖库产生的环境问题_第1张图片

4、MainApplication.java:37: 错误: 找不到符号 new SQLitePluginPackage(getApplicationContext()) ^ 符号: 类 SQLitePluginPackage 1 个错误
解决:
忘记导包了

import org.pgsqlite.SQLitePluginPackage;

你可能感兴趣的:(React,Native)