react-native icon indicating copy to clipboard operation
react-native copied to clipboard

[Android]run-android error

Open ibeeger opened this issue 10 years ago • 8 comments

i have error code

FAILURE: Build failed with an exception.

  • What went wrong: A problem occurred configuring project ':app'.

    failed to find Build Tools revision 23.0.0

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 5.902 secs Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment: https://facebook.github.io/react-native/docs/android-setup.html

i have not method

ibeeger avatar Dec 17 '15 13:12 ibeeger

Hey cxh80301983, thanks for reporting this issue!

React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.

  • If you don't know how to do something or not sure whether some behavior is expected or a bug, please ask on StackOverflow with the tag react-native or for more real time interactions, ask on Discord in the #react-native channel.
  • If this is a feature request or a bug that you would like to be fixed, please report it on Product Pains. It has a ranking feature that lets us focus on the most important issues the community is experiencing.
  • We welcome clear issues and PRs that are ready for in-depth discussion. Please provide screenshots where appropriate and always mention the version of React Native you're using. Thank you for your contributions!

facebook-github-bot avatar Dec 17 '15 13:12 facebook-github-bot

@cxh80301983 You need to install build tools through your sdk manager. https://facebook.github.io/react-native/docs/android-setup.html#configure-your-sdk

christopherdro avatar Dec 17 '15 23:12 christopherdro

thanks

@christopherdro @facebook-github-bot I think that are configured

INSTALL_RECEIPT.json docs samples README etc sources add-ons extras system-images bin platform-tools temp build-tools platforms tools /usr/local/Cellar/android-sdk/24.4

and
.zshrc file export ANDROID_HOME=/usr/local/Cellar/android-sdk

android avd is ok

ibeeger avatar Dec 18 '15 02:12 ibeeger

thanks I found a solution

####中文

我找到解决方法了 首先 确定 是用 brew install android-sdk 安装后 会在 /usr/local/Cellar/android-sdk 这个目录 同时 /usr/local/var/lib/android-sdk 这个目录也会存在一部分 源 前者 一部分 以 link 后者的 最后 要把 前者目录里的 platform-tools build-tools 拷贝到 /usr/local/var/lib/android-sdk ANDROID_HOME=/usr/local/var/lib/android-sdk
react-native run-android

###English

I found a solution First determine with brew install android-sdk In / usr / local / Cellar / android-sdk directory after installation While / usr / local / var / lib / android-sdk directory will be present as part of the source In the latter part of the former link Finally, should the former platform-tools build-tools copied to / usr / local / var / lib / android-sdk ANDROID_HOME = / usr / local / var / lib / android-sdk

it's ok

ibeeger avatar Dec 18 '15 02:12 ibeeger

I am working on the windows system and this is what I get when running the app:

Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment: https://facebook.github.io/react-native/docs/android-setup.html

the problem is that the read the error above for details is nowhere to be seen, in other words, the error log is MISSING....

Have read the installation instructions several time but I can't find what is wrong...

any leads would be greatly appreciated!!!!

dcu-sharepoint avatar Mar 23 '17 23:03 dcu-sharepoint

This is my third attempt of getting the dev environment setup. And I got stuck with the same problem on windows 10. Slightly being sarcastic, but does it really need to be that complicated with hacking environment variables, shamanism with SDKs, AVDs, HAXM, cherry picking versions etc ? Feels like dealing with a "Touch me here.." system.

cristian-eriomenco avatar Apr 10 '17 20:04 cristian-eriomenco

@cristian-eriomenco I feel for you. Unfortunately, these technologies are made with a MAC in mind so when it comes to windows all you hear is: windows is useless, the terminal program is useless and other stupid comments. when I go for a meetup on any of these technologies tied to a Microsoft technology it looks like a commercial for an apple product line along with related stupid comments about Windows and yet they're using Microsoft as the main application target.... I feel your pain.

Cheer up, you'll get it done, I finally did and now have react-native working like a charm using the Genymotion emulator and it's all good.... and on a windows 10 system from the good for nothing, monopolistic company and we need to destroy or get rid of Micrsoft....

Cheers

dcu-sharepoint avatar Apr 12 '17 15:04 dcu-sharepoint

@ibeeger even though I can't find the path you mentioned, but I try your command brew cask install android-sdk and `react-native run-android' .it works. I don't know why.

guguji5 avatar Apr 03 '18 07:04 guguji5