闪屏后,Android应用“停止工作”

启动画面工作正常。 但是应用程序停止了我该怎么办?

我尝试搜索,但效果不佳... 我对此事需要一些建议。

SplashScreenactivity.java

public class SplashScreenactivity extends AppCompatactivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    EasySplashScreen config = new EasySplashScreen(SplashScreenactivity.this)
            .withFullScreen()
            .withTargetactivity(Mainactivity.class)
            .withSplashTimeOut(5000)
            .withBackgroundColor(Color.parseColor("#1a1b29"))
            .withHeaderText("Header")
            .withFooterText("Footer")
            .withBeforeLogoText("Before LoGo Text")
            .withAfterLogoText("After LoGo Text")
            .withLogo(R.mipmap.ic_launcher_round);

    config.getHeaderTextView().setTextColor(Color.WHITE);
    config.getFooterTextView().setTextColor(Color.WHITE);
    config.getBeforeLogoTextView().setTextColor(Color.WHITE);
    config.getafterLogoTextView().setTextColor(Color.WHITE);

        View easySplashScreen = config.create();
        setContentView(easySplashScreen);

    }
}

Mainactivity.java(仅上部)

public class Mainactivity extends AppCompatactivity

        implements NavigationView.OnNavigationItemSelectedListener {

    MenuItem menuSetting;
    Toolbar toolbar;

    DBHelper dbHelper;

AndroidManifest.xml

 <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsrtl="true"
        android:theme="@style/Apptheme">
        <activity
            android:name=".SplashScreenactivity"
            android:label="@string/app_name"
            android:theme="@style/Apptheme.NoactionBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".Mainactivity"></activity>
    </application>
jsftgkafgjag 回答:闪屏后,Android应用“停止工作”

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3003884.html

大家都在问