0
votes

I'm new react-native developer. When i run react native in windows with "react-native run-android", it return error :

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 FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:prepareComAndroidSupportSupportV42301Library'. Could not expand ZIP 'C:\Android\sdk\extras\android\m2repository\com\android\support\support-v4\23.0.1\support-v4-23.0.1.aar'.

  • 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: 15 mins 33.768 secs

Can you help me fix this problem? thank!

1

1 Answers

0
votes

I had the exact same issue and it turns out it's got to do with the google play-services-analytics version. and by adding the following code to the build.gradle file I was able to get rid of the error.

compile("com.google.android.gms:play-services-analytics:8.3.0"){
force = true
}

add it at the top of the dependencies curly braces. so that it looks like this. dependencies { compile("com.google.android.gms:play-services- analytics:8.3.0"){ force = true } //the rest of the dependencies follow Go t the page below for a better and more detailed explanation https://github.com/idehub/react-native-google-analytics-bridge/issues/31