I managed to create a * .apk file from my code, put the file in IIS, and upload it to several Android phones. On install, the application works exactly as expected.
However, after rebooting the phone, the application name changes to the fully qualified java class name for the activity in the menu (so "MyActivity" becomes "com.mycompany.MyActivity"), and when I try to go to menu> Settings, I get an error message that causes Android force close my application.
Looking in DDMS, I see that I get an error indicating that it may not detect my activity in Preferences, despite the fact that install, it works correctly.
I use Eclipse on Windows XP and have several Android devices at my disposal for testing.
Any idea what is going on?
AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.company.app"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/logo" android:label="@string/app_name">
<activity android:name="com.company.app.ActivityMain"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.company.app.Preferences"
android:label="@string/app_settings">
<intent-filter>
<category android:name="android.intent.category.PREFERENCE"></category>
<action android:name="android.intent.action.MAIN"></action>
</intent-filter>
</activity>
<service android:name="com.company.app.Service"></service>
</application>
<uses-sdk android:minSdkVersion="3" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
</manifest>
source
share