问题
When running in the emulator the splash screen gets stuck and never starts the next activity. I removed the splash Activity from the manifest file and made the next Activity as my launcher. Still, when I run the app I get the splash screen. I have done everything like restarting eclipse, made new avd but I don't know from where it is getting the splash screen. I don't know why this is happening.
This works fine when running on a device, the issue only occurs when running in the emulator.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.kaizen"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.kaizen.Login"
android:configChanges="keyboardHidden"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
回答1:
You have to uninstall all JRE 7 and install latest JRE 6 (http://www.oracle.com/technetwork/java/javase/downloads/jre6downloads-1902815.html). It will immediately fixed the problem.
See this for installation help
回答2:
Uninstall app from emulator and then re run your app. Hope it will help you.
来源:https://stackoverflow.com/questions/29553967/app-gets-stuck-on-splash-screen-when-running-in-the-emulator