App gets stuck on splash screen when running in the emulator

牧云@^-^@ 提交于 2020-01-05 13:06:16

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!