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
=======================`
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.
Still giving error:
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
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 ;)
Most helpful comment
try cd android & gradlew clean