栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

RN环境配置中的问题

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

RN环境配置中的问题

RN环境配置的问题 问题一

由于仅部分匹配或匹配不明确,因此无法迁移设备 USBVID_22D9&PID_2046DUKJMRAU9L9D4SDU。

解决方案:需要在点击USB调试按钮时选择传输文件。如果选择充电的话就会显示没有连接上设备。

问题二

在运行命令:

yarn andriod

之后报错

原因:由于app目录处于’F:/猪/reactnative/code/myApp’中,其中有中文,因此将中文目录变成全英文目录即可解决问题。

问题三

在运行命令:

yarn andriod

之后报错:

error Failed to install the app. Please accept all necessary Android SDK licenses using Android SDK Manager: "$ANDROID_HOME/tools/bin/sdkmanager --licenses".
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

- What went wrong:
  Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.

Failed to install the following Android SDK packages as some licences have not been accepted.
   build-tools;30.0.2 Android SDK Build-Tools 30.0.2
   platforms;android-30 Android SDK Platform 30
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.        
Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html

解决方案:

方案一

方案二

问题四

在运行命令:

yarn andriod

之后报错:

> Task :app:installDebug
[PropertyFetcher]: ShellCommandUnresponsiveException getting properties for device DUKJMRAU9L9D4SDU: null
[PropertyFetcher]: ShellCommandUnresponsiveException getting properties for device DUKJMRAU9L9D4SDU: null
[PropertyFetcher]: ShellCommandUnresponsiveException getting properties for device DUKJMRAU9L9D4SDU: null
Skipping device 'DUKJMRAU9L9D4SDU' for 'app:debug': Unknown API Level

> Task :app:installDebug FAILED
31 actionable tasks: 31 executed

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:installDebug'.
> java.util.concurrent.ExecutionException: org.gradle.api.GradleException: Failed to install on any devices.

解决方案:

在当前根目录下运行以下步骤 :
1 cd android
2 ./gradlew clean
3 cd …
4 npm cache clean --force
5 yarn android

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/697093.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号