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

Getting Started guide for windows/android is not working. #13900

Closed
mescalito opened this issue May 10, 2017 · 12 comments
Closed

Getting Started guide for windows/android is not working. #13900

mescalito opened this issue May 10, 2017 · 12 comments
Labels
Platform: Windows Building on Windows. Resolution: Locked This issue was locked by the bot.

Comments

@mescalito
Copy link

mescalito commented May 10, 2017

Description

Getting Started guide for windows/android is not working.

I followed the guide exactly step by step many times. I even created a VM container with a fresh installed windows 7 and 10 version, and it didn't work in both cases and neither in my day-by-day windows 7 machine.

You need to fix this guide: https://facebook.github.io/react-native/docs/getting-started.html

Also, the screenshots are out of date for Android Studio.

What I ended up doing was to install Expo XDE and Genymotion and add ADB into my system path config variables.

But I can't use "react-native run-android", I have to command via Expo XDE, what sucks a little bit.

The Android Studio installation is NOT working as described in the Getting Started guide.

ERROR:
Running dex in-process requires build tools 23.0.2.
For faster builds update this project to use the latest build tools.
:app:transformClassesWithDexForDebug FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
D:\reactExpo\reactDefault\nico1>react-native run-android
Scanning 557 folders for symlinks in D:\reactExpo\reactDefault\nico1\node_modules (27ms)
Starting JS server...
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
Incremental java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library
:app:prepareComAndroidSupportSupportV42301Library
:app:prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library
:app:prepareComFacebookFrescoDrawee101Library
:app:prepareComFacebookFrescoFbcore101Library
:app:prepareComFacebookFrescoFresco101Library
:app:prepareComFacebookFrescoImagepipeline101Library
:app:prepareComFacebookFrescoImagepipelineBase101Library
:app:prepareComFacebookFrescoImagepipelineOkhttp3101Library
:app:prepareComFacebookReactReactNative0440Library
:app:prepareComFacebookSoloaderSoloader010Library
:app:prepareOrgWebkitAndroidJscR174650Library
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:mergeDebugShaders
:app:compileDebugShaders
:app:generateDebugAssets
:app:mergeDebugAssets
:app:generateDebugResValues
:app:generateDebugResources
:app:mergeDebugResources
:app:bundleDebugJsAndAssets SKIPPED
:app:processDebugManifest
:app:processDebugResources
:app:generateDebugSources
:app:incrementalDebugJavaCompilationSafeguard
:app:compileDebugJavaWithJavac
:app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources
:app:transformClassesWithDexForDebug
Running dex in-process requires build tools 23.0.2.
For faster builds update this project to use the latest build tools.
:app:transformClassesWithDexForDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException

* 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: 39.949 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

D:\reactExpo\reactDefault\nico1>
@hramos
Copy link
Contributor

hramos commented May 15, 2017

Have you tried following the very latest version of the guide at http://facebook.github.io/react-native/releases/next/docs/getting-started.html ? I've recently gone through all the steps on Windows and did not run into the issue you presented. It sounds like you're having trouble connecting to the Android device.

@mescalito
Copy link
Author

mescalito commented May 15, 2017

@hramos Hi Hector! nice to see you in here, I have many apps running on Parse Server ;)

Yes I did follow the very latest version of the guide and it didn't work. I even created a fresh VM on windows 7 and it didn't work either.

By the way, the screenshots in the windows guide are from iOS, that doesn't make sense as well.

Hector, you should give it a try again on a windows machine, or someone on your team.

@hramos hramos added Documentation Platform: Windows Building on Windows. labels May 15, 2017
@hramos
Copy link
Contributor

hramos commented May 15, 2017

I dedicated most of the afternoon today to look into this. After completely uninstalling Android Studio and the Android SDK as well as all AVDs from my machine, I went back through the current instructions, step by step, and I was able to run the starter RN app on Windows on an Android emulator.

I was unable to reproduce the issue brought up here. The logs you posted indicate that you may be missing the 23.0.1 SDK build tools. Can you double-check and make sure you did not miss a single step?

I've updated the instructions to use Windows screenshots when applicable.

@mescalito
Copy link
Author

Gracias Hector, I'll make a video

@hramos
Copy link
Contributor

hramos commented May 16, 2017

Are you sure you have the 23.0.1 SDK build tools? The error indicates you're missing them. Did you install the JDK as well?

@mescalito
Copy link
Author

Yes, many times. Take a look at this image:
http://prntscr.com/f8idfp

@hramos
Copy link
Contributor

hramos commented May 16, 2017

That image does not show the 23.0.1 SDK build tools as being installed. That option is under the "SDK Tools" tab.

@mescalito
Copy link
Author

Hector, it is also there, check this other image: http://prntscr.com/f8j3vc

@oallouch
Copy link

Same here
And "adb devices" shows me my emulator, of course.

@hramos
Copy link
Contributor

hramos commented May 17, 2017

Like I said above, I just went through all the steps on a clean machine and had no issues. If anyone can pinpoint if there's a step that is missing, or an assumption that the guide makes about the user's machine, that could help.

@oallouch
Copy link

Ok, I found my problem.
I was running it from the conemu terminal and I was getting error messages with black text on a black background.
For me, the issue was a bad JAVA_HOME env var.

Hope that helps.

@Kontra21
Copy link

JAVA_HOME env var missing has been causing a lot of issues. As an extra precaution I also put %JAVA_HOME% in my PATH env var as well after creating the appropriate JAVA_HOME var. React worked without issues after adding that. You will also need to restart your CMD or other CLI you are using.

@hramos hramos closed this as completed Jun 7, 2017
@facebook facebook locked as resolved and limited conversation to collaborators Jun 7, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: Windows Building on Windows. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants