Skip to content

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

Description

@mescalito

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>

Activity

  1. hramos commented on May 15, 2017

    @hramos
    Contributor

    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.

  2. mescalito commented on May 15, 2017

    @mescalito
    Author

    @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.

  3. hramos commented on May 15, 2017

    @hramos
    Contributor

    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.

  4. mescalito commented on May 16, 2017

    @mescalito
    Author

    Gracias Hector, I'll make a video

  5. hramos commented on May 16, 2017

    @hramos
    Contributor

    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?

  6. mescalito commented on May 16, 2017

    @mescalito
    Author

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

  7. hramos commented on May 16, 2017

    @hramos
    Contributor

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

  8. mescalito commented on May 16, 2017

    @mescalito
    Author

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

  9. oallouch commented on May 17, 2017

    @oallouch

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

  10. hramos commented on May 17, 2017

    @hramos
    Contributor

    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.

  11. oallouch commented on May 17, 2017

    @oallouch

    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.

  12. Kontra21 commented on May 23, 2017

    @Kontra21

    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.

  13. locked as resolved and limited conversation to collaborators on Jun 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions