Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-native run android v0.50版本 环境配置坑 #13

Open
aototo opened this issue Nov 8, 2017 · 0 comments
Open

react-native run android v0.50版本 环境配置坑 #13

aototo opened this issue Nov 8, 2017 · 0 comments

Comments

@aototo
Copy link
Owner

aototo commented Nov 8, 2017

React-native

android

第一次部署 react-native run-android
https://services.gradle.org/distributions/gradle-2.14.1-all.zip 下载很慢的问题

手动下载之后,把文件放在
~/.gradle\wrapper\dists\gradle-2.14.1-all\8bnwg5hd3w55iofp58khbp6yv

Android开发环境需求
java JDK 必须是1.8以上

下载地址

React Native的开发环境 - 简书

jdk版本问题导致:

Unsupported major.minor version 52.0

解决方案更新jdk,修改文件内容具体内容 点这里!

设置skd dir path

报错内容:

SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

解决方案:在android 下面创建 local.properties 文件,绑定android sdk 路径

sdk.dir = /Users/*username*/Library/Android/sdk

或者设置变量ANDROID_HOME
需要.bash_profile文件 定义ANDROID_HOME 变量,修改之后
然后在 .bashrc 或者 zsh 文件修改

. ~/.bash_profile

保证重启后生效

需要下载安装Android studio

https://developer.android.com/studio/install.html

具体可以看http://sstlant.com/2017/11/05/React%20Native%20%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant