gpt4 book ai didi

android - com.facebook.katana.ProxyAuth 抛出从单个实例 Activity 调用的错误

转载 作者:太空狗 更新时间:2023-10-29 15:18:14 24 4
gpt4 key购买 nike

我在启动 com.facebook.katana.ProxyAuth 时遇到问题。启动此 Intent 的 Activity 在 list 文件中定义为 android:launchMode="singleInstance"我已经通过将启动模式删除为单个实例来解决此问题,此 Intent 已成功启动。

我真的需要这个 Activity 是单实例的,所以有谁知道如何在不删除 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);

日志:

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

最佳答案

它可能不是您需要的答案,但您可以尝试 android:launchMode="singleTask",它在许多情况下表现得像 singleInstance,并且可以与 facebook 身份验证一起使用。参见 Android singleTask or singleInstance launch mode?

关于android - com.facebook.katana.ProxyAuth 抛出从单个实例 Activity 调用的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10585795/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com