My emulator and SDK package were working fine literally one hour ago. I try to edit the code in the manifest file and BAM! All of a sudden, when I run my applications, the emulator freezes, sometimes needing Ctrl + Alt+ Delete, and when it unfreezes itself, the application doesn't even show up. The console log seems fine but I am getting some WIERD readings from the Logcat... not sure if they're normal or not. Help me out?
Actually, scratch that... wierd things are happening in the console log too...
[2011-01-24 23:25:44 - UnicornTest] ------------------------------
[2011-01-24 23:25:44 - UnicornTest] Android Launch!
[2011-01-24 23:25:44 - UnicornTest] adb is running normally.
[2011-01-24 23:25:44 - UnicornTest] No Launcher activity found!
[2011-01-24 23:25:44 - UnicornTest] The launch will only sync the application package on the device!
[2011-01-24 23:25:44 - UnicornTest] Performing sync
[2011-01-24 23:25:44 - UnicornTest] Automatic Target Mode: Preferred AVD 'Koneko' is available on emulator 'emulator-5554'
[2011-01-24 23:25:44 - UnicornTest] WARNING: Application does not specify an API level requirement!
[2011-01-24 23:25:44 - UnicornTest] Device API version is 9 (Android 2.3)
[2011-01-24 23:25:46 - UnicornTest] Application already deployed. No need to reinstall.
[2011-01-24 23:25:46 - UnicornTest] \UnicornTest\bin\UnicornTest.apk installed on device
[2011-01-24 23:25:46 - UnicornTest] Done!
Android Manifest File:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.unicorn.test.whee"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:label="@string/app_name" android:enabled="true" android:name="SplashScreenPear">
</activity>
</application>
</manifest>
I feel as if there is some totally, blatant error somewhere I just can't see... I know GIMP does somthing like this freeze if you have a virus but I just did a scan and nothing came up... Sorry in advance.
You are making a mistake. You have not declare any activity as launcher activity in manifest file, so your app is running but emulator can't find any activity to launch so it doesn't show anything.
Just change the following:
<activity android:name=".SplashScreenPear"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
instead of
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:label="@string/app_name" android:enabled="true" android:name="SplashScreenPear">
</activity>
Always remember: declare one of your activity as launcher as above.