React-native-splash-screen: react-native run-android Build failed

Created on 7 Jul 2017  ·  8Comments  ·  Source: crazycodeboy/react-native-splash-screen

react-native run-android Build failed

I configure it as an example,but there's a mistake I can't solve:

Terminal error reporting is as follows::
`============================
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:compileDebugJavaWithJavac'.

    Could not add entry '0' to cache localClassSetAnalysis.bin (/home/littlestone/Documents/test/android/.gradle/2.14.1/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin).

  • 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: 1.389 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

=======================`

react-native : 0.45 ndoe: v7.10.0 npm :4.2.0

plaese tell me how to handle this case.

Most helpful comment

try cd android & gradlew clean

All 8 comments

try cd android & gradlew clean

我也是 react-native run-android的时候出现下面的错误,照不清方向啊,请大神指点啊
/Users/curry/Documents/gitHub_workSpace/reacrNative/firstReactNative/xianBox-app/android/app/src/main/java/com/native/MainActivity.java:1: 错误: 需要<标识符>
package com.native;
^
/Users/curry/Documents/gitHub_workSpace/reacrNative/firstReactNative/xianBox-app/android/app/src/main/java/com/native/MainApplication.java:1: 错误: 需要<标识符>
package com.native;
^
/Users/curry/Documents/gitHub_workSpace/reacrNative/firstReactNative/xianBox-app/android/app/build/generated/source/r/debug/com/native/R.java:8: 错误: 需要<标识符>
package com.native;
^
/Users/curry/Documents/gitHub_workSpace/reacrNative/firstReactNative/xianBox-app/android/app/build/generated/source/buildConfig/debug/com/native/BuildConfig.java:4: 错误: 需要<标识符>
package com.native;
^
4 个错误
:app:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

^

1 error
:react-native-splash-screen:compileReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':react-native-splash-screen:compileReleaseJavaWithJavac'.
    > Compilation failed; see the compiler error output for details........
    help plss......node 6.11.1 and npm 4.6.1

Still giving error:

FAILURE: Build failed with an exception.

react-native: 0.46.4
react-native-splash-screen: 3.0.0

Followed Readme.md and created same folders (drawable-...) for Android as the example.

@MrBrownser try either rn-splash-screen or react-native-smart-splash-screen

Thanks @therovermind!
I ended up doing it natively for both Android and iOS, following an always-wise Spencer Carli post.

@MrBrownser How did you manage hiding the splashscreen when done natively ?

Hi @yasir-netlinks both Android and iOS hide the splash screen when app loads, meaning maybe app is not yet ready to show and further loading is still required. Therefore the idea of this module (creating a bridge with native splash screen handler) is really good.
That's why I looked again and finally I'm using this module because after 3.0.6 release it started working with my version of other modules (sorry but didn't went further on the _why_).
Then I can do a normal SplashScreen.hide(); when I decide app is ready to be shown ;)

Was this page helpful?
0 / 5 - 0 ratings