Slick Forums
http://slick.ninjacave.com/forum/

Unable to instantiate activity ComponentInfo
http://slick.ninjacave.com/forum/viewtopic.php?f=21&t=4747
Page 1 of 1

Author:  TheVapourRub [ Fri Mar 23, 2012 8:10 pm ]
Post subject:  Unable to instantiate activity ComponentInfo

With the project I'm working with, using an older version of slick-ae.jar works fine. However, with the issue regarding Animation, and the feeling that other issues are bound to come up, there is a need to update my jar with the new version under development in mercurial.

After compiling the new slick-ae.jar from the development build (with no errors) and replacing the old jars in my projects, this is the new error I have when trying to run on Android in logcat:

Code:
03-23 13:35:49.893: E/AndroidRuntime(26402): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{testing.test/testing.test.ZzTestAndroidActivity}: java.lang.ClassNotFoundException: testing.test.ZzTestAndroidActivity in loader dalvik.system.PathClassLoader[/data/app/testing.test-1.apk]


Through Google, I've found some entries at StackOverflow that mention the fix involves the AndroidManifest.xml. I haven't found anything in my manifest that would cause this issue. Here it is:

Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="testing.test"
    android:versionCode="1"
    android:versionName="1.0" >

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

    <supports-screens
        android:smallScreens="false"
        android:normalScreens="true"
        android:largeScreens="true"
        android:xlargeScreens="false"
        android:resizeable="false"
    />
    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" android:debuggable="true">
       
        <activity
            android:name=".ZzTestAndroidActivity"
            android:label="@string/app_name"
            android:configChanges="orientation|keyboardHidden"
            android:screenOrientation="landscape">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

</manifest>


In the build path, my gen and src folders are included as well.

Has anyone run into this issue before and do you have a solution for this?

Author:  Mr. Kenkron [ Sun Mar 25, 2012 1:56 am ]
Post subject:  Re: Unable to instantiate activity ComponentInfo

I have had a similar problem before. In my case, the problem turned out to be that I was compiling Slick-AE with Java 7, which does not work on android. The library worked when I switched back to Java 6. I should probably find a way to edit build.xml to fix this problem, so that people stopped encountering it.

Author:  TheVapourRub [ Tue Mar 27, 2012 1:01 am ]
Post subject:  Re: Unable to instantiate activity ComponentInfo

I tried to force it to build with jre6 by changing my default version to jre6 instead of 7, however I got an error while running build.xml:

Code:
C:\Users\Victor\Desktop\SlickMercurial\trunk\Slick-AE\build.xml:14: java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main : Unsupported major.minor version 51.0


I guess I'll leave it to you because I have no idea what I'm doing!

Author:  TheVapourRub [ Mon Apr 09, 2012 11:00 pm ]
Post subject:  Re: Unable to instantiate activity ComponentInfo

Mr. Kenkron did you figure out a way to change the build.xml to fix this issue yet?

Author:  Mr. Kenkron [ Tue Apr 10, 2012 3:12 pm ]
Post subject:  Re: Unable to instantiate activity ComponentInfo

I have been busy lately, and actually haven't done anything with slick in the past few weeks. ...actually, that's not true, there were about three days in which I was creating a multiplayer game that worked across the internet, but that was more of an addiction than productive code. I'll try to find and add build changes by thursday (4/12).

Author:  TheVapourRub [ Mon Apr 23, 2012 6:19 pm ]
Post subject:  Re: Unable to instantiate activity ComponentInfo

That sounds pretty cool. Is that for Android devices or just for desktop?

Take your time with the changes.

Author:  Mr. Kenkron [ Thu May 03, 2012 5:06 pm ]
Post subject:  Re: Unable to instantiate activity ComponentInfo

Okay, this is embarassing. I missed my own deadline SOOOOO badly. I would fix this now, but I have a few finals today. However, I have not forgotten this post, nor my intentions to fix this common problem.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/