I am going to consume web service from android according to this link http://jatin4rise.wordpress.com/2010/10/03/webservicecallfromandroid/ but during run time my android application[AndroidFrontend] shown as
Sorry!.
The application AndroidFrontend(process.org.web.android.frontend)has stopped unexpectedly.Please try later.
And the logcat shown as
LOGCAT
05-14 11:13:55.133: E/dalvikvm(208): Could not find class 'org.ksoap2.serialization.SoapObject', referenced from method org.web.android.frontend.AndroidFrontendActivity.onCreate
05-14 11:13:55.133: W/dalvikvm(208): VFY: unable to resolve new-instance 25 (Lorg/ksoap2/serialization/SoapObject;) in Lorg/web/android/frontend/AndroidFrontendActivity;
05-14 11:13:55.133: D/dalvikvm(208): VFY: replacing opcode 0x22 at 0x0010
05-14 11:13:55.163: D/dalvikvm(208): VFY: dead code 0x0012-0081 in Lorg/web/android/frontend/AndroidFrontendActivity;.onCreate (Landroid/os/Bundle;)V
05-14 11:13:55.224: D/AndroidRuntime(208): Shutting down VM
05-14 11:13:55.224: W/dalvikvm(208): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
05-14 11:13:55.233: E/AndroidRuntime(208): FATAL EXCEPTION: main
05-14 11:13:55.233: E/AndroidRuntime(208): java.lang.NoClassDefFoundError: org.ksoap2.serialization.SoapObject
05-14 11:13:55.233: E/AndroidRuntime(208): at org.web.android.frontend.AndroidFrontendActivity.onCreate(AndroidFrontendActivity.java:28)
05-14 11:13:55.233: E/AndroidRuntime(208): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
05-14 11:13:55.233: E/AndroidRuntime(208): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
05-14 11:13:55.233: E/AndroidRuntime(208): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
05-14 11:13:55.233: E/AndroidRuntime(208): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
05-14 11:13:55.233: E/AndroidRuntime(208): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
05-14 11:13:55.233: E/AndroidRuntime(208): at android.os.Handler.dispatchMessage(Handler.java:99)
05-14 11:13:55.233: E/AndroidRuntime(208): at android.os.Looper.loop(Looper.java:123)
05-14 11:13:55.233: E/AndroidRuntime(208): at android.app.ActivityThread.main(ActivityThread.java:4627)
05-14 11:13:55.233: E/AndroidRuntime(208): at java.lang.reflect.Method.invokeNative(Native Method)
05-14 11:13:55.233: E/AndroidRuntime(208): at java.lang.reflect.Method.invoke(Method.java:521)
05-14 11:13:55.233: E/AndroidRuntime(208): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
05-14 11:13:55.233: E/AndroidRuntime(208): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
05-14 11:13:55.233: E/AndroidRuntime(208): at dalvik.system.NativeStart.main(Native Method)
Guys i have googled these issues as per my knowledge but still seeking for solution.Please let me know the solution if you have.
Thanks for your Precious Time!
The VM is unable to locate the class org.ksoap2.serialization.SoapObject.
Make sure you include the required library (the JAR file) when you build your project.
Related
I have an Android app that handles single sign-on with Facebook and requests the following permissions on login: read_stream, user_likes
I made sure to make my Facebook application public such that it is NOT in sandbox mode, but I still get the following error when logging in for only some accounts:
05-14 12:00:01.264: W/fb4a(:<default>):BlueServiceQueue(5095): Exception during service
05-14 12:00:01.264: W/fb4a(:<default>):BlueServiceQueue(5095): com.facebook.http.protocol.ApiException: Invalid application MY_VALID_APP_ID
05-14 12:00:01.264: W/fb4a(:<default>):BlueServiceQueue(5095): at com.facebook.http.protocol.ApiResponseChecker.b(ApiResponseChecker.java:78)
05-14 12:00:01.264: W/fb4a(:<default>):BlueServiceQueue(5095): at com.facebook.http.protocol.ApiResponseChecker.a(ApiResponseChecker.java:107)
05-14 12:00:01.264: W/fb4a(:<default>):BlueServiceQueue(5095): at com.facebook.http.protocol.ApiResponse.h(ApiResponse.java:291)
05-14 12:00:01.264: W/fb4a(:<default>):BlueServiceQueue(5095): at com.facebook.katana.server.protocol.AuthorizeAppMethod.a(AuthorizeAppMethod.java:266)
05-14 12:00:01.264: W/fb4a(:<default>):BlueServiceQueue(5095): at com.facebook.katana.server.protocol.AuthorizeAppMethod.a(AuthorizeAppMethod.java:27)
05-14 12:00:01.264: W/fb4a(:<default>):BlueServiceQueue(5095): at com.facebook.http.protocol.SingleMethodRunnerImpl.a(SingleMethodRunnerImpl.java:157)
05-14 12:00:01.264: W/fb4a(:<default>):BlueServiceQueue(5095): at com.facebook.http.protocol.AbstractSingleMethodRunner.a(AbstractSingleMethodRunner.java:16)
05-14 12:00:01.264: W/fb4a(:<default>):BlueServiceQueue(5095): at com.facebook.katana.server.handler.PlatformOperationHandler.c(PlatformOperationHandler.java:366)
05-14 12:00:01.264: W/fb4a(:<default>):BlueServiceQueue(5095): at com.facebook.katana.server.handler.PlatformOperationHandler.a(PlatformOperationHandler.java:259)
05-14 12:00:01.264: W/fb4a(:<default>):BlueServiceQueue(5095): at com.facebook.fbservice.service.BlueServiceQueue.d(BlueServiceQueue.java:245)
05-14 12:00:01.264: W/fb4a(:<default>):BlueServiceQueue(5095): at com.facebook.fbservice.service.BlueServiceQueue.d(BlueServiceQueue.java:51)
05-14 12:00:01.264: W/fb4a(:<default>):BlueServiceQueue(5095): at com.facebook.fbservice.service.BlueServiceQueue$3.run(BlueServiceQueue.java:191)
05-14 12:00:01.264: W/fb4a(:<default>):BlueServiceQueue(5095): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
05-14 12:00:01.264: W/fb4a(:<default>):BlueServiceQueue(5095): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
05-14 12:00:01.264: W/fb4a(:<default>):BlueServiceQueue(5095): at com.facebook.common.executors.HandlerExecutorServiceImpl$ListenableScheduledFuture.run(HandlerExecutorServiceImpl.java:268)
05-14 12:00:01.264: W/fb4a(:<default>):BlueServiceQueue(5095): at android.os.Handler.handleCallback(Handler.java:725)
05-14 12:00:01.264: W/fb4a(:<default>):BlueServiceQueue(5095): at android.os.Handler.dispatchMessage(Handler.java:92)
05-14 12:00:01.264: W/fb4a(:<default>):BlueServiceQueue(5095): at android.os.Looper.loop(Looper.java:137)
05-14 12:00:01.264: W/fb4a(:<default>):BlueServiceQueue(5095): at android.os.HandlerThread.run(HandlerThread.java:60)
05-14 12:00:01.298: W/fb4a(:<default>):GDPDialog(5095): Failed to send
05-14 12:00:01.298: W/fb4a(:<default>):GDPDialog(5095): com.facebook.fbservice.service.ServiceException: API_ERROR: API_ERROR
05-14 12:00:01.298: W/fb4a(:<default>):GDPDialog(5095): at com.facebook.fbservice.ops.BlueServiceOperation.c(BlueServiceOperation.java:637)
05-14 12:00:01.298: W/fb4a(:<default>):GDPDialog(5095): at com.facebook.fbservice.ops.BlueServiceOperation.c(BlueServiceOperation.java:46)
05-14 12:00:01.298: W/fb4a(:<default>):GDPDialog(5095): at com.facebook.fbservice.ops.BlueServiceOperation$2.run(BlueServiceOperation.java:602)
05-14 12:00:01.298: W/fb4a(:<default>):GDPDialog(5095): at android.os.Handler.handleCallback(Handler.java:725)
05-14 12:00:01.298: W/fb4a(:<default>):GDPDialog(5095): at android.os.Handler.dispatchMessage(Handler.java:92)
05-14 12:00:01.298: W/fb4a(:<default>):GDPDialog(5095): at android.os.Looper.loop(Looper.java:137)
05-14 12:00:01.298: W/fb4a(:<default>):GDPDialog(5095): at android.app.ActivityThread.main(ActivityThread.java:5041)
05-14 12:00:01.298: W/fb4a(:<default>):GDPDialog(5095): at java.lang.reflect.Method.invokeNative(Native Method)
05-14 12:00:01.298: W/fb4a(:<default>):GDPDialog(5095): at java.lang.reflect.Method.invoke(Method.java:511)
05-14 12:00:01.298: W/fb4a(:<default>):GDPDialog(5095): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
05-14 12:00:01.298: W/fb4a(:<default>):GDPDialog(5095): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
05-14 12:00:01.298: W/fb4a(:<default>):GDPDialog(5095): at dalvik.system.NativeStart.main(Native Method)
05-14 12:00:01.475: W/InputMethodManagerService(732): Focus gain on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy#41b99b70 (uid=10085 pid=4961)
I can also confirm that I am setting the correct Facebook Application id in my Android app as well. I also set the required key hashes for my Android app too. Any help would be appreciated!
It sounds like you're missing the Facebook App ID meta data in your manifest (or it's pointing to the wrong ID):
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:exported="true"
android:value="#string/your_facebook_app_id_string" />
I also have the same problem as you! I use new function 'Test Apps' of Facebook SDK ,
i found:
https://developers.facebook.com/docs/apps/test-apps/
Note:
Test Apps are always in Development Mode, making it less likely someone may chance upon a pre-release version of your product
So, I solved the problem by add join team members to testing in Roles.
If you do not have an Test App, you go to "Status and Review" setting to enable "live and available to all users".
I hope to help you, sr my English!
i'm getting this message when i run my application i don't know why i'm getting it could any one help me. here is the logcat.
java.lang.VerifyError: com.kosh.me.Smaller
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1429)
at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
at android.app.ActivityThread.access$2300(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:876)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:634)
at dalvik.system.NativeStart.main(Native Method)
This happens when the build library classes conflict with those at run-time. Try performing a Clean of your project followed by a build.
I create an android App which works perfectly in Android 2.3+ all devices. But when i tried to run in 2.2 but it crashed and gives error in log as,
08-16 10:22:41.323: E/dalvikvm(442): Could not find class 'android.os.StrictMode$ThreadPolicy$Builder', referenced from method com.uks.android.mssga.activity.LoginActivity.onCreate
08-16 10:22:41.333: W/dalvikvm(442): VFY: unable to resolve new-instance 39 (Landroid/os/StrictMode$ThreadPolicy$Builder;) in Lcom/uks/android/mssga/activity/LoginActivity;
08-16 10:22:41.333: D/dalvikvm(442): VFY: replacing opcode 0x22 at 0x000a
08-16 10:22:41.333: D/dalvikvm(442): VFY: dead code 0x000c-009a in Lcom/uks/android/mssga/activity/LoginActivity;.onCreate (Landroid/os/Bundle;)V
08-16 10:22:41.423: D/dalvikvm(442): GC_EXTERNAL_ALLOC freed 744 objects / 59064 bytes in 68ms
08-16 10:22:41.483: D/AndroidRuntime(442): Shutting down VM
08-16 10:22:41.483: W/dalvikvm(442): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
08-16 10:22:41.483: E/AndroidRuntime(442): FATAL EXCEPTION: main
08-16 10:22:41.483: E/AndroidRuntime(442): java.lang.NoClassDefFoundError: android.os.StrictMode$ThreadPolicy$Builder
08-16 10:22:41.483: E/AndroidRuntime(442): at com.uks.android.mssga.activity.LoginActivity.onCreate(LoginActivity.java:58)
08-16 10:22:41.483: E/AndroidRuntime(442): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
08-16 10:22:41.483: E/AndroidRuntime(442): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
08-16 10:22:41.483: E/AndroidRuntime(442): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
08-16 10:22:41.483: E/AndroidRuntime(442): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
08-16 10:22:41.483: E/AndroidRuntime(442): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
08-16 10:22:41.483: E/AndroidRuntime(442): at android.os.Handler.dispatchMessage(Handler.java:99)
08-16 10:22:41.483: E/AndroidRuntime(442): at android.os.Looper.loop(Looper.java:123)
08-16 10:22:41.483: E/AndroidRuntime(442): at android.app.ActivityThread.main(ActivityThread.java:4627)
08-16 10:22:41.483: E/AndroidRuntime(442): at java.lang.reflect.Method.invokeNative(Native Method)
08-16 10:22:41.483: E/AndroidRuntime(442): at java.lang.reflect.Method.invoke(Method.java:521)
08-16 10:22:41.483: E/AndroidRuntime(442): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
08-16 10:22:41.483: E/AndroidRuntime(442): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
08-16 10:22:41.483: E/AndroidRuntime(442): at dalvik.system.NativeStart.main(Native Method)
08-16 10:22:44.503: I/Process(442): Sending signal. PID: 442 SIG: 9
Code of LoginActivity is,
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.login);
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder()
.permitAll().build();
StrictMode.setThreadPolicy(policy);
// Other stuff
}
StrictMode.ThreadPolicy.Builder was introduced in Android 2.3 (API level 9), so attempts to call it in versions earlier than that will fail.
To stop it crashing on 2.2 and earlier you can choose to either:
* Remove the ThreadPolicy code (as it is a developer debug tool to provide warnings of bad things you are doing)
or
* Use reflection to determine if the class exists before making use of it
I am having problem when starting com.facebook.katana.ProxyAuth. The activity that is starting this intent is defined in manifest file with android:launchMode="singleInstance"
I've solved this by removing launch mode as single instance, this intent is started successfully.
I really need this activity to be single instance, so does anyone know how to solve this problem without removing android:launchMode="singleInstance"?
Intent intent = new Intent();
intent.setClassName("com.facebook.katana",
"com.facebook.katana.ProxyAuth");
intent.putExtra("client_id", applicationId);
// Verify that the application whose package name is
// com.facebook.katana.ProxyAuth
// has the expected FB app signature.
if (!validateActivityIntent(activity, intent)) {
return false;
}
// activity is defined in manifest as single instance
activity.startActivityForResult(intent, activityCode);
LogCat:
05-14 16:42:13.470: E/AndroidRuntime(28141): FATAL EXCEPTION: main
05-14 16:42:13.470: E/AndroidRuntime(28141): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.facebook.katana/com.facebook.katana.ProxyAuth}: java.lang.NullPointerException
05-14 16:42:13.470: E/AndroidRuntime(28141): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2787)
05-14 16:42:13.470: E/AndroidRuntime(28141): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2803)
05-14 16:42:13.470: E/AndroidRuntime(28141): at android.app.ActivityThread.access$2300(ActivityThread.java:135)
05-14 16:42:13.470: E/AndroidRuntime(28141): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2136)
05-14 16:42:13.470: E/AndroidRuntime(28141): at android.os.Handler.dispatchMessage(Handler.java:99)
05-14 16:42:13.470: E/AndroidRuntime(28141): at android.os.Looper.loop(Looper.java:144)
05-14 16:42:13.470: E/AndroidRuntime(28141): at android.app.ActivityThread.main(ActivityThread.java:4937)
05-14 16:42:13.470: E/AndroidRuntime(28141): at java.lang.reflect.Method.invokeNative(Native Method)
05-14 16:42:13.470: E/AndroidRuntime(28141): at java.lang.reflect.Method.invoke(Method.java:521)
05-14 16:42:13.470: E/AndroidRuntime(28141): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
05-14 16:42:13.470: E/AndroidRuntime(28141): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
05-14 16:42:13.470: E/AndroidRuntime(28141): at dalvik.system.NativeStart.main(Native Method)
05-14 16:42:13.470: E/AndroidRuntime(28141): Caused by: java.lang.NullPointerException
05-14 16:42:13.470: E/AndroidRuntime(28141): at com.facebook.orca.common.util.Base64.c(Base64.java:497)
05-14 16:42:13.470: E/AndroidRuntime(28141): at com.facebook.orca.common.util.Base64.b(Base64.java:459)
05-14 16:42:13.470: E/AndroidRuntime(28141): at com.facebook.katana.ProxyAuth.b(ProxyAuth.java:36)
05-14 16:42:13.470: E/AndroidRuntime(28141): at com.facebook.katana.activity.PlatformDialogActivity.a(PlatformDialogActivity.java:127)
05-14 16:42:13.470: E/AndroidRuntime(28141): at com.facebook.orca.activity.FbFragmentActivity.onCreate(FbFragmentActivity.java:48)
05-14 16:42:13.470: E/AndroidRuntime(28141): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1069)
05-14 16:42:13.470: E/AndroidRuntime(28141): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2751)
05-14 16:42:13.470: E/AndroidRuntime(28141): ... 11 more
05-14 16:42:15.520: E/ActivityManager(114): Error running process
05-14 16:42:15.520: E/ActivityManager(114): java.io.IOException: Error running exec(). Command: [/system/xbin/procrank] Working Directory: null Environment: [ANDROID_SOCKET_zygote=11, ANDROID_BOOTLOGO=1, EXTERNAL_STORAGE=/mnt/sdcard, ANDROID_ASSETS=/system/app, ASEC_MOUNTPOINT=/mnt/asec, PATH=/sbin:/system/sbin:/system/bin:/system/xbin, ANDROID_DATA=/data, BOOTCLASSPATH=/system/framework/core.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/com.htc.framework.jar:/system/framework/com.htc.android.pimlib.jar:/system/framework/com.htc.android.easopen.jar:/system/framework/com.scalado.util.ScaladoUtil.jar, ANDROID_PROPERTY_WORKSPACE=10,65536, ANDROID_ROOT=/system, LD_LIBRARY_PATH=/system/lib]
05-14 16:42:15.520: E/ActivityManager(114): at java.lang.ProcessManager.exec(ProcessManager.java:226)
05-14 16:42:15.520: E/ActivityManager(114): at java.lang.ProcessBuilder.start(ProcessBuilder.java:201)
05-14 16:42:15.520: E/ActivityManager(114): at com.android.server.am.ActivityManagerService.logProcessResult(ActivityManagerService.java:9437)
05-14 16:42:15.520: E/ActivityManager(114): at com.android.server.am.ActivityManagerService.access$900(ActivityManagerService.java:155)
05-14 16:42:15.520: E/ActivityManager(114): at com.android.server.am.ActivityManagerService$9.run(ActivityManagerService.java:9614)
05-14 16:42:15.520: E/ActivityManager(114): Caused by: java.io.IOException: No such file or directory
05-14 16:42:15.520: E/ActivityManager(114): at java.lang.ProcessManager.exec(Native Method)
05-14 16:42:15.520: E/ActivityManager(114): at java.lang.ProcessManager.exec(ProcessManager.java:224)
05-14 16:42:15.520: E/ActivityManager(114): ... 4 more
It may not be the answer that you need, but you may try android:launchMode="singleTask", it behaves like singleInstance in many cases and works with the facebook authentication. See Android singleTask or singleInstance launch mode?
15 reports
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.oas.fruitkungfufree/com.openfeint.internal.ui.IntroFlow}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
at android.app.ActivityThread.access$2300(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.openfeint.internal.Util.setOrientation(Util.java:36)
at com.openfeint.internal.ui.NestedWindow.onCreate(NestedWindow.java:32)
at com.openfeint.internal.ui.WebNav.onCreate(WebNav.java:93)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
Does any one have a solution for this??
This is a problem with your code, you can't use an object that is null. This is a hint.