5

I recently just received a bug report from device "Desire HD (ace)" which I cannot recreate for the life of me. I looked over Here1 and Here2 but it didn't seem like it would help me with my problem or I am just not understanding this enough to know if this is the fix to my problem.

My LogCat :

java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{joseph.lubonty.librarysmite11/joseph.lubonty.librarysmite11.Splash}: java.lang.ClassNotFoundException: joseph.lubonty.librarysmite11.Splash in loader dalvik.system.PathClassLoader[/mnt/asec/joseph.lubonty.librarysmite11-2/pkg.apk]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1738)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1837)
at android.app.ActivityThread.access$1500(ActivityThread.java:132)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1033)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4196)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: joseph.lubonty.librarysmite11.Splash in loader dalvik.system.PathClassLoader[/mnt/asec/joseph.lubonty.librarysmite11-2/pkg.apk]
at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1730)
... 11 more

My Manifest :

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="joseph.lubonty.librarysmite11"
android:installLocation="preferExternal"
android:versionCode="19"
android:versionName="2.7" >

<compatible-screens>

    <!-- all normal size screens -->
    <screen
        android:screenDensity="mdpi"
        android:screenSize="normal" />
    <screen
        android:screenDensity="hdpi"
        android:screenSize="normal" />
    <screen
        android:screenDensity="xhdpi"
        android:screenSize="normal" />

    <!-- all large size screens -->
    <screen
        android:screenDensity="mdpi"
        android:screenSize="large" />
    <screen
        android:screenDensity="hdpi"
        android:screenSize="large" />
    <screen
        android:screenDensity="xhdpi"
        android:screenSize="large" />

    <!-- all xlarge size screens -->
    <screen
        android:screenDensity="mdpi"
        android:screenSize="xlarge" />
    <screen
        android:screenDensity="hdpi"
        android:screenSize="xlarge" />
    <screen
        android:screenDensity="xhdpi"
        android:screenSize="xlarge" />

    <!-- Special case for Nexus 7 -->
    <screen
        android:screenDensity="213"
        android:screenSize="large" />

    <!-- Special case for HTC One -->
    <screen
        android:screenDensity="480"
        android:screenSize="large" />

    <!-- Special case for Android DNA -->
    <screen
        android:screenDensity="480"
        android:screenSize="normal" />
</compatible-screens>

<uses-sdk
    android:minSdkVersion="10"
    android:targetSdkVersion="17" />

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<application
    android:allowBackup="true"
    android:icon="@drawable/b_promo"
    android:label="@string/app_name"
    android:logo="@drawable/i_topbarimage1"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".Splash"
        android:label="@string/title_activity_main"
        android:noHistory="true"
        android:screenOrientation="landscape" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name=".MainActivity"
        android:label="@string/title_activity_main" >
    </activity>
    <activity
        android:name=".GodStatComparison"
        android:label="@string/app_name"
        android:screenOrientation="landscape" >
    </activity>
    <activity
        android:name=".JungleTimers"
        android:label="@string/app_name"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name=".JungleInfoTablet"
        android:label="@string/app_name"
        android:screenOrientation="landscape" >
    </activity>
    <activity
        android:name=".JungleTimersTablet"
        android:label="@string/app_name"
        android:screenOrientation="landscape" >
    </activity>
    <activity
        android:name=".TopPlayers"
        android:label="@string/app_name"
        android:screenOrientation="landscape" >
    </activity>
</application>
</manifest>

Here are images of my "Properties" > "Java Build Path" if this may help solve this problem :

enter image description here

enter image description here

("Projects" tab is empty)

enter image description here

Please let me know if there is any other sort of information you need.

Edit :

package joseph.lubonty.librarysmite11;

public class Splash extends FragmentActivity {

}
Community
  • 1
  • 1
JoeyL
  • 1,295
  • 7
  • 28
  • 50

2 Answers2

2

Just installed it on my Desire HD fine. Installed itself to SD card by default. So probably what @Jon said.

NeilS
  • 625
  • 7
  • 13
1

It's possible their device is fubar'd, but I also just noticed your project is setup for JDK builds instead of ADT. You'll want to make sure everything is set up using Properties -> Android instead of Properties -> Java Build, as explained here.

Managing Projects from Eclipse with ADT | Android Developers

It appears others are also having similar issues after upgrading to ADT version 22, so there may be a bug in the SDK. I just checked to see what version I have and found an update to Ver. 22.2.1 available.

Libraries do not get added to APK after update to ADK 22

Community
  • 1
  • 1
Jon
  • 1,398
  • 9
  • 14
  • I guess this is where I am really confused. So I guess I did it "The Wrong Way" as described in your link "here". So would I have to undo this? (If I do which Screenshot or tab should I do my removal in?). So for me to do this the right way I should be going to Properties -> Android and in "Project Build Target" and Select my Target (which is 17) and in "Library" select the check box "isLibrary"? Also I cannot add anything when I click the "Add" feature in the Library section, it is all just blank. – JoeyL Sep 25 '13 at 03:46
  • 1
    To be completely honest, I'm not really sure why that setup wouldn't work for you. I just checked my projects and even the the android samples are setup like that. Have you tried updating the ADK again and doing a clean build? – Jon Sep 26 '13 at 19:38
  • I have not had an error since that user has reported it (or multiple users with the same device). I did though have in my Properties > Android that the Project Build Target didn't match the one in my Manifest file so I went ahead and fixed that. So I think it was their device being foobar or my small mistake there. I will be putting out another update on it in 2 days that I hope to never see that error again or at least once in a blue moon. Thanks again Jon for the follow up, I really appreciate it. – JoeyL Sep 26 '13 at 21:48