package com.reactnativenavigation.controllers does not existI try to implement Splash screen in Android as documented https://wix.github.io/react-native-navigation/#/android-specific-use-cases?id=splash-screen and getting following error
/myproject/android/app/src/main/java/com/buygud/MainActivity.java:3: error: package com.reactnativenavigation.bridge does not exist
import com.reactnativenavigation.bridge.NavigationReactPackage;
import com.reactnativenavigation.NavigationActivity;
import android.graphics.drawable.Drawable;
import android.support.v4.content.ContextCompat;
import android.widget.LinearLayout;
import com.reactnativenavigation.controllers.SplashActivity;
public class MainActivity extends SplashActivity {
@Override
public LinearLayout createSplashLayout() {
LinearLayout splash = new LinearLayout(this);
Drawable splash_screen_bitmap = ContextCompat.getDrawable(getApplicationContext(),R.drawable.splash_screen_bitmap);
splash.setBackground(splash_screen_bitmap);
return splash;
}
}
any updates on this?
Nothing yet, for quick workaround I use below technique in MainActivity
public class MainActivity extends NavigationActivity {
@Override
public void addDefaultSplashLayout() {
LinearLayout splash = new LinearLayout(this);
Drawable splash_screen_bitmap = ContextCompat.getDrawable(getApplicationContext(),R.drawable.splash_screen_bitmap);
splash.setBackground(splash_screen_bitmap);
setContentView(splash);
}
}
just override addDefaultSplashLayout() with your own content. For splash screen content, I use guide at https://medium.com/@pqkluan/how-to-implement-splash-screen-in-react-native-navigation-ee2184a1a96
i dont why i am getting this weird error of package not found
.../MainActivity.java:7: error: package com.reactnativenavigation does not exist
import com.reactnativenavigation.NavigationActivity;
@arahmanali You might miss something during installation, follow https://wix.github.io/react-native-navigation/#/docs/Installing. One more solution stop existing module bundler and run react-native run-android again. If stille facing issue, try posting on Stackoverflow with your code.
@iShankarG i have fixed it by reverting my code and reinstall the package, thanks though :)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.
The issue has been closed for inactivity.