简体   繁体   English

反应原生项目类型

[英]react-native project Type

I've cina device whit android lollipop 5.1 i can create and run in device this type of react-native project我有 cina 设备 whit android Lollipop 5.1 我可以在设备中创建和运行这种类型的 react-native 项目

create-react-native-app AwesomeProject
cd AwesomeProject
npm start

But if i try to create and run in device this type of react-native project但是,如果我尝试在设备中创建并运行这种类型的 react-native 项目

react-native init AwesomeProject
cd AwesomeProject
react-native run-android

cant run it in device get this error无法在设备中运行它会出现此错误

FAILURE: Build failed with an exception. FAILURE:构建失败,出现异常。

* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: 
com.android.ddmlib.InstallExc
eption: Failed to install all

i solved the problem changing build:gradle version to我解决了将 build:gradle 版本更改为

 classpath 'com.android.tools.build:gradle:1.2.3' 

and gradle to和毕业

distributionUrl=https\://services.gradle.org/distributions/gradle-2.2-all.zip 

now i must un the app in the device whit现在我必须取消设备中的应用程序

react-native run-android  and  react-native start 

but cant have live reload update and i must give every app change this command但不能实时重新加载更新,我必须给每个应用程序更改此命令

react-native run-android

how can solve this and have live reload update如何解决此问题并进行实时重新加载更新

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM