Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

package is no find, #57

Open
MTTTM opened this issue Nov 19, 2017 · 2 comments
Open

package is no find, #57

MTTTM opened this issue Nov 19, 2017 · 2 comments

Comments

@MTTTM
Copy link

MTTTM commented Nov 19, 2017

F:\3kwcommunity\android\app\src\main\java\com\simpleapp\MainActivity.java:9: 错误: 程序包com.mehcode.reactnative.splashscreen不存在
import com.mehcode.reactnative.splashscreen.SplashScreen;
^
F:\3kwcommunity\android\app\src\main\java\com\simpleapp\MainActivity.java:43: 错误: 找不到符号
protected void onCreate(Bundle savedInstanceState) {
^
符号: 类 Bundle
位置: 类 MainActivity
F:\3kwcommunity\android\app\src\main\java\com\simpleapp\MainActivity.java:45: 错误: 找不到符号
SplashScreen.show(this, getReactInstanceManager());
^
符号: 变量 SplashScreen
位置: 类 MainActivity
3 个错误
:app:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

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

my computer system is window 10.

@sinapcs
Copy link

sinapcs commented Jan 4, 2018

add this to dependencies of build.gradle
compile project(':rn-splash-screen')

@GodVampire
Copy link

GodVampire commented Jun 26, 2018

I have same error :
"错误: 找不到符号
SplashScreen.show(this, getReactInstanceManager()); "
I have already add compile project(':rn-splash-screen') in build.gradle

my MainActivity.java:

import com.reactnativenavigation.controllers.SplashActivity;

import android.graphics.Color;
import android.os.Bundle;

import com.facebook.react.ReactInstanceManager;
import com.facebook.react.bridge.ReactContext;
import com.mehcode.reactnative.splashscreen.SplashScreen;
import com.mehcode.reactnative.splashscreen.SplashScreenPackage;

public class MainActivity extends SplashActivity {

@OverRide
protected void onCreate(Bundle savedInstanceState) {
SplashScreen.show(this, getReactInstanceManager());
super.onCreate(savedInstanceState);
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants