React Native 0.60.5 plugin configuration android
See original GitHub issueHi, while I was doing the setup of the library I found that in MainActivity.java there’s no more the onCreate method. MainActivity.java
package com.testApp;
import com.facebook.react.ReactActivity;
public class MainActivity extends ReactActivity {
/**
* Returns the name of the main component registered from JavaScript.
* This is used to schedule rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "testApp";
}
}
So I tried to do the setup in the getMainComponentName method: MainActivity.java
package com.testApp;
import com.facebook.react.ReactActivity;
import org.devio.rn.splashscreen.SplashScreen;
public class MainActivity extends ReactActivity {
/**
* Returns the name of the main component registered from JavaScript.
* This is used to schedule rendering of the component.
*/
@Override
protected String getMainComponentName() {
SplashScreen.show(this);
return "testApp";
}
}
but when I try to compile it gives me this error: error: cannot find symbol variable SplashScreen
Anyone knows how to do it?
Issue Analytics
- State:
- Created 4 years ago
- Comments:10
Top Results From Across the Web
react-native-config - npm
Module to expose config variables to your javascript code in React Native, supporting iOS, Android and Windows.
Read more >Upgrading to new versions - React Native
Upgrading to new versions of React Native will give you access to more APIs, views, developer tools and other goodies.
Read more >React-Native 0.60+ with linked libs not running despite ...
I have an ejected react-native app with multiple linked libraries which fails to run in Android (works in iOS). The Dependency Graph loads ......
Read more >Home - Documentation
Version 2.9.0 introduced a breaking change to the Android configuration. ... This SDK targets apps that are using React Native SDK version 0.60.5...
Read more >React Native App - Automatic Setup - Flipper
Android - start the Flipper Desktop application and start your project using yarn android . Your application will appear in Flipper. · iOS...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
贴一个完整的供参考
MainActivity.java
@jedashford Thank you now working 👍🏻😍