简体   繁体   English

react-native run-android 不起作用:/

[英]react-native run-android does not work :/


Running react-native run-android in windows but get this error: 在 Windows 中运行 react-native run-android 但出现此错误:
create-react-native-app project
react-native init project
react-native start
react-native run-android

I have installed android studio and created a project and I also run the emulator and i did我已经安装了 android studio 并创建了一个项目,我还运行了模拟器,我做到了

create-react-native-app project react-native init project react-native start react-native run-android

For android try this code:对于 android 试试这个代码:

 # Reset metro bundler cache : 
`npx react-native start --reset-cache`
    
# Remove Android assets cache : 
`cd android && ./gradlew clean`
    
# Relaunch metro server : 
`npx react-native run-android`

And to remove the "Jetifier", use:要删除“Jetifier”,请使用:

react-native run-android --no-jetifier

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Ubuntu 14上运行“ react-native run-android”时出错 - Error Running 'react-native run-android' on ubuntu 14 react-native run-android 构建错误 ':app:generateDebugBuildConfig' - react-native run-android Building Error ':app:generateDebugBuildConfig' 升级到 react-native 版本 0.60.4 后 react-native run-android 出错 - Error with react-native run-android after upgrade to react-native version 0.60.4 在运行react-native run-android时发生错误react native - Error react native when run react-native run-android npx react-native run-android 错误 > 任务:react-native-gradle-plugin:compileKotlin FAILED - npx react-native run-android error > Task :react-native-gradle-plugin:compileKotlin FAILED 当我在终端命令的 react-native 中启动 npx react-native run-android 时,这个问题来了 - When i start npx react-native run-android in my react-native in terminal command this issue is coming 无法解析com.android.tools.build:gradle:3.1.4,react-native run-android - Could not resolve com.android.tools.build:gradle:3.1.4, react-native run-android java.io.IOException:无法编写 react-native run-android 失败 - java.io.IOException: Can't write react-native run-android failed react-native run-android因错误而失败:任务执行失败':app:dexDebug' - react-native run-android failed with error: Execution failed for task ':app:dexDebug' react-native run-android 错误“任务:app:javaPreCompileDebug FAILED” - react-native run-android error "Task :app:javaPreCompileDebug FAILED"
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM