Question

I'm tying to publish my app on the market. But after i sign my apk and install it i get a crash before it even loads an activity. I've located the following error in the logCat

03-24 14:57:03.080: E/AndroidRuntime(4310): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.golfboxdk/com.golfboxdk.LoginActivity}: 
java.lang.ClassNotFoundException: Didn't find class "com.golfboxdk.LoginActivity" on path: DexPathList[[zip file "/data/app/com.golfboxdk-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.golfboxdk-1, /vendor/lib, /system/lib]]

I've checked my manifest and i really cant figure out whats wrong. My app runs smoothly when I'm using an unsigned apk.

This is the start of my manifest

package="com.golfboxdk"
android:versionCode="5"
android:versionName="1.7.2" >

<uses-sdk
    android:minSdkVersion="9"
    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_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

<application
    android:name="com.golfboxdk.utils.GolfBoxApplication"
    android:allowBackup="false"
    android:icon="@drawable/app_icon"
    android:killAfterRestore="true"
    android:label="@string/app_name"
    android:theme="@android:style/Theme.Light.NoTitleBar" >
    <activity
        android:name="com.golfboxdk.LoginActivity"
        android:label="@string/app_name"
        android:launchMode="singleTop"
        android:screenOrientation="portrait" >

        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

    </activity>

Things i already tried: Enabling all files under ->Project->Properties->java Build path->Order and Expert, followed with a clean. Check if ProGuard is activated (it's not)

Was it helpful?

Solution

Try the following:

  1. Project > Uncheck build automatically
  2. Clean the workspace
  3. Manually build your project
  4. Sign your apk and send it to device via bluetooth/wifi/email, etc.
  5. Test it and release it if it works

OTHER TIPS

I have had this issue before with Eclipse/ADT. Sometimes it just doesn't seem to package up the APK correctly.

Typically a clean and build followed by exporting the signed APK again fixes it for me.

No one said that there would be a problem with proguard, but only this solved my issue.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top