• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Unable to instantiate activity ComponentInfo for Facebook SDK Samples

nfoboy

Lurker
Jun 23, 2011
2
1
So I am trying to learn how to use Facebook's SDK, so I went to their website, and thought I would try out some of their sample tutorials.

I have been stuck, and killed practically an entire day due to the fact that I can't figure out why their samples won't work!

Every time I try to run a Facebook from Eclipse, I get this:

06-02 20:44:41.500: E/AndroidRuntime(9033): FATAL EXCEPTION: main
06-02 20:44:41.500: E/AndroidRuntime(9033): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.facebook.samples.profilepicture/com.facebook.samples.profilepicture.ProfilePictureSampleActivity}: java.lang.ClassNotFoundException: com.facebook.samples.profilepicture.ProfilePictureSampleActivity in loader dalvik.system.PathClassLoader[/data/app/com.facebook.samples.profilepicture-1.apk]
06-02 20:44:41.500: E/AndroidRuntime(9033): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1573)
06-02 20:44:41.500: E/AndroidRuntime(9033): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
06-02 20:44:41.500: E/AndroidRuntime(9033): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
06-02 20:44:41.500: E/AndroidRuntime(9033): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
06-02 20:44:41.500: E/AndroidRuntime(9033): at android.os.Handler.dispatchMessage(Handler.java:99)
06-02 20:44:41.500: E/AndroidRuntime(9033): at android.os.Looper.loop(Looper.java:130)
06-02 20:44:41.500: E/AndroidRuntime(9033): at android.app.ActivityThread.main(ActivityThread.java:3687)
06-02 20:44:41.500: E/AndroidRuntime(9033): at java.lang.reflect.Method.invokeNative(Native Method)
06-02 20:44:41.500: E/AndroidRuntime(9033): at java.lang.reflect.Method.invoke(Method.java:507)
06-02 20:44:41.500: E/AndroidRuntime(9033): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
06-02 20:44:41.500: E/AndroidRuntime(9033): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
06-02 20:44:41.500: E/AndroidRuntime(9033): at dalvik.system.NativeStart.main(Native Method)
06-02 20:44:41.500: E/AndroidRuntime(9033): Caused by: java.lang.ClassNotFoundException: com.facebook.samples.profilepicture.ProfilePictureSampleActivity in loader dalvik.system.PathClassLoader[/data/app/com.facebook.samples.profilepicture-1.apk]
06-02 20:44:41.500: E/AndroidRuntime(9033): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
06-02 20:44:41.500: E/AndroidRuntime(9033): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
06-02 20:44:41.500: E/AndroidRuntime(9033): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
06-02 20:44:41.500: E/AndroidRuntime(9033): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
06-02 20:44:41.500: E/AndroidRuntime(9033): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1565)
06-02 20:44:41.500: E/AndroidRuntime(9033): ... 11 more
and here's the manifest
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.facebook.samples.profilepicture"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="8"/>
<uses-permission android:name="android.permission.INTERNET"/>
<application android:label="@string/app_name"
android:icon="@drawable/icon" >
<activity
android:name=".ProfilePictureSampleActivity"
android:label="@string/app_name"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
I have even gone so far to download and do a complete new install of the ADT, grab the SDK's for development, and then import the files to the new install, and I am getting the exact same errors.

All of my previous programs are compiling just fine, so I am at a complete loss on what to do.

Has anyone here been successful in trying out the Facebook examples?

Ross
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones