Uninote
Uninote

打包报错

React-native-webview
  • 找到工程目录下/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java
  • 注释掉此方法
public void setWebChromeClient(WebChromeClient client) {
        this.mWebChromeClient = client;
        super.setWebChromeClient(client);
}
  • 找不到符号,Android.Q 解决办法是:把android Q改为28
所有的依赖库如果报错 not found supportv4 如:

/Users/daaijinxiao/Desktop/dajx/dajx_client/node_modules/react-native-getui/android/src/main/java/com/getui/reactnativegetui/GetuiModule.java:5: 错误: 程序包android.support.annotation不存在 import android.support.annotation.Nullable; 参考:https://bin.zmide.com/?p=337/

https://bin.zmide.com/?p=337/

  • 导入包名修改为androidx.annotation
  • 将报错的库改为import androidx.annotation.xxxx;
React-native-swpier
  • 找到路径/node_modules/react-native-swiper/src/index.js
  • index.js文件第775行改为 contentoffset={this.fullstate().offset}
react-native-orientation:verifyReleaseResources FAILE
  • 找到/android/build.gradle 的build.gradle文件
  • 做以下修改
targetSdkVersion 28
compileSdkVersion 28
buildToolsVersion "28.0.0"
react-native-picker:verifyReleaseResources FAILED
  • 找到/android/build.gradle 的build.gradle文件
  • 做以下修改
targetSdkVersion 28
compileSdkVersion 28
buildToolsVersion "28.0.0"
app:bundleReleaseJsAndAssets FAILED

其他报错

@react-native-community/toolbar-android红屏
> Task :app:bundleReleaseJsAndAssets FAILED
Connect to 127.0.0.1:1080 [/127.0.0.1] failed: Connection refused: connect

1、出现的场景,使用SS设置了全局代理,然后在Android Studio中设置了代理,然后将Android Studio代理关闭之后,还是发现上不了网。出现了这个错误。

解决: 找到.gradle文件夹下的gradle.properties 文件,将末尾的代理取消掉。

注:gradle.properties并非是项目中的文件,而是本地gradle中的文件。比如mac电脑是用户目录下.gradle文件夹中。 mac下该文件为隐藏文件,大家自行改为可见文件。

2、参考链接 https://blog.csdn.net/u011368551/article/details/84309829

RN代码规范

个推相关配置

点赞(0) 阅读(1) 举报
目录
标题