React-native-splash-screen: Build fails on Android for v3.0.1

Created on 21 Sep 2017  路  2Comments  路  Source: crazycodeboy/react-native-splash-screen

When I run npm run android with v3.0.1 I get an error:

/Users/simonwade/dev/Workspace/sharegp/frontend/android/app/src/main/java/com/sharegp/MainActivity.java:5: error: package com.cboy.rn.splashscreen does not exist
import com.cboy.rn.splashscreen.SplashScreen;
                               ^
/Users/simonwade/dev/Workspace/sharegp/frontend/android/app/src/main/java/com/sharegp/MainApplication.java:6: error: package com.cboy.rn.splashscreen does not exist
import com.cboy.rn.splashscreen.SplashScreenReactPackage;
                               ^
/Users/simonwade/dev/Workspace/sharegp/frontend/android/app/src/main/java/com/sharegp/MainActivity.java:11: error: cannot find symbol
        SplashScreen.show(this);  // here
        ^
  symbol:   variable SplashScreen
  location: class MainActivity
/Users/simonwade/dev/Workspace/sharegp/frontend/android/app/src/main/java/com/sharegp/MainApplication.java:28: error: cannot find symbol
            new SplashScreenReactPackage(),
                ^
  symbol: class SplashScreenReactPackage
4 errors
:app:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

When I roll back to v3.0.0 the error is fixed.

Most helpful comment

@aexmachina I think the correct import is import org.devio.rn.splashscreen.SplashScreen; for the newest version. I have it running.

All 2 comments

@aexmachina I think the correct import is import org.devio.rn.splashscreen.SplashScreen; for the newest version. I have it running.

Okay great, thanks for that. Probably would have been better in a major version release ;) or with an entry in the CHANGELOG or README. Anyway, all sorted now - thanks!

Was this page helpful?
0 / 5 - 0 ratings