我正在为Unity Android编写插件,使用此插件,用户可以从图库中选择他们的图像。我为“onActivityResult”函数调用创建了一个新活动。当我在Unity中单击按钮时,库正确打开,但选择后,我的应用程序关闭时没有任何消息,并且在logCat中有很多消息,为什么我的应用程序关闭以及如何解决它,非常感谢。
resimSec.java
package com.alptugrul.background;
import android.app.Activity;
import android.content.Intent;
import android.util.Log;
import com.unity3d.player.UnityPlayer;
/**
* Created by Alpaslan on 27.3.2018.
*/
public class resimSec extends Activity {
public static void resimSec() {
Intent intent = new Intent();
intent.setAction("com.alptugrul.background.imgSec");
UnityPlayer.currentActivity.startActivityForResult(intent, imgSec.GalleryRequest);
Log.e("alpi","baslioruz.");
}
}
imgSec.java
package com.alptugrul.background;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.util.Log;
import android.widget.Toast;
import com.unity3d.player.UnityPlayer;
import com.unity3d.player.UnityPlayerActivity;
/**
* Created by Alpaslan on 27.3.2018.
*/
public class imgSec extends UnityPlayerActivity {
public static int GalleryRequest = 1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(intent, GalleryRequest);
}
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
// TODO Auto-generated method stub
super.onActivityResult(requestCode, resultCode, data);
if(resultCode == Activity.RESULT_OK){
if(requestCode == GalleryRequest){
// fetch image uri or do whatever you like here
// send it to Unity ;)
// UnityPlayer.UnitySendMessage("xx", "xx", "xx");
}
}else{
// System.out.print("Result code in router:"+resultCode);
}
setResult(resultCode);
finish();
}
}
Unity中的imgSec.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class imgSec : MonoBehaviour {
private static string fullClassName = "com.alptugrul.background.resimSec";
AndroidJavaClass fotoSecClass;
// Use this for initialization
void Start () {
fotoSecClass = new AndroidJavaClass(fullClassName);
}
public void fotoSec () {
fotoSecClass.CallStatic ("resimSec");
}
public void setIMG (string imgURL) {
Texture2D tex;
tex = new Texture2D(4, 4, TextureFormat.DXT1, false);
using (WWW www = new WWW(imgURL))
{
www.LoadImageIntoTexture(tex);
GetComponent<Renderer>().material.mainTexture = tex;
}
}
}
和LOGCAT消息
03-27 14:30:16.505 1301-1306/? D/gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 3686400
03-27 14:30:16.554 1301-1559/? E/BufferQueueProducer: [SurfaceView - com.akgames.kazzan/com.unity3d.player.UnityPlayerActivity] cancelBuffer: BufferQueue has been abandoned
03-27 14:30:16.579 3474-3490/? D/EGL_emulation: eglMakeCurrent: 0x92a7d2a0: ver 2 0 (tinfo 0x93684bc0)
03-27 14:30:16.585 3474-3555/? D/AudioTrack: Client defaulted notificationFrames to 682 for frameCount 2048
03-27 14:30:16.597 3353-3391/? D/EGL_emulation: eglMakeCurrent: 0xb1185600: ver 2 0 (tinfo 0xb1183470)
03-27 14:30:16.628 1309-1332/? D/AudioFlinger: mixer(0xab683ac0) throttle end: throttle time(10)
03-27 14:30:16.639 1309-1332/? D/AudioFlinger: mixer(0xab683ac0) throttle end: throttle time(10)
03-27 14:30:16.876 3474-3474/? W/Unity: Not running Google VR from an Activity; Ignoring execution request...
03-27 14:30:16.879 3474-3474/? I/Process: Sending signal. PID: 3474 SIG: 9
03-27 14:30:16.923 1576-1929/? I/WindowManager: Destroying surface Surface(name=com.android.documentsui/com.android.documentsui.DocumentsActivity) called by com.android.server.wm.WindowStateAnimator.destroySurface:2016 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:882 com.android.server.wm.WindowState.removeLocked:1456 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2484 com.android.server.wm.WindowManagerService.removeWindowLocked:2442 com.android.server.wm.WindowManagerService.removeWindowLocked:2311 com.android.server.wm.WindowManagerService.removeWindow:2306 com.android.server.wm.Session.remove:202
03-27 14:30:16.937 1576-1620/? W/InputDispatcher: channel 'a5b3e22 com.akgames.kazzan/com.unity3d.player.UnityPlayerActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9
03-27 14:30:16.938 1576-1620/? E/InputDispatcher: channel 'a5b3e22 com.akgames.kazzan/com.unity3d.player.UnityPlayerActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
03-27 14:30:16.941 1576-1605/? I/WindowManager: WIN DEATH: Window{a5b3e22 u0 com.akgames.kazzan/com.unity3d.player.UnityPlayerActivity}
03-27 14:30:16.941 1576-1605/? W/InputDispatcher: Attempted to unregister already unregistered input channel 'a5b3e22 com.akgames.kazzan/com.unity3d.player.UnityPlayerActivity (server)'
03-27 14:30:16.941 1576-1605/? W/WindowManager: Force-removing child win Window{b6239 u0 SurfaceView - com.akgames.kazzan/com.unity3d.player.UnityPlayerActivity} from container Window{a5b3e22 u0 com.akgames.kazzan/com.unity3d.player.UnityPlayerActivity}
03-27 14:30:16.941 1576-1605/? I/WindowManager: Destroying surface Surface(name=SurfaceView - com.akgames.kazzan/com.unity3d.player.UnityPlayerActivity) called by com.android.server.wm.WindowStateAnimator.destroySurface:2016 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:882 com.android.server.wm.WindowState.removeLocked:1456 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2484 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2463 com.android.server.wm.WindowManagerService.removeWindowLocked:2442 com.android.server.wm.WindowState$DeathRecipient.binderDied:1787 android.os.BinderProxy.sendDeathNotice:688
03-27 14:30:16.945 1576-1605/? I/WindowManager: Destroying surface Surface(name=com.akgames.kazzan/com.unity3d.player.UnityPlayerActivity) called by com.android.server.wm.WindowStateAnimator.destroySurface:2016 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:882 com.android.server.wm.WindowState.removeLocked:1456 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2484 com.android.server.wm.WindowManagerService.removeWindowLocked:2442 com.android.server.wm.WindowState$DeathRecipient.binderDied:1787 android.os.BinderProxy.sendDeathNotice:688 <bottom of call stack>
03-27 14:30:16.949 1576-1588/? W/WindowManager: Failed looking up window
java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@61400b3 does not exist
at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:9107)
at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:9098)
at com.android.server.wm.WindowState$DeathRecipient.binderDied(WindowState.java:1784)
at android.os.BinderProxy.sendDeathNotice(Binder.java:688)
03-27 14:30:16.949 1576-1588/? I/WindowManager: WIN DEATH: null
03-27 14:30:16.950 1576-2125/? I/ActivityManager: Process com.akgames.kazzan (pid 3474) has died
03-27 14:30:16.950 1576-2125/? D/ActivityManager: cleanUpApplicationRecord -- 3474
03-27 14:30:16.957 1576-2125/? W/ActivityManager: Force removing ActivityRecord{8ec07d4 u0 com.akgames.kazzan/com.unity3d.player.UnityPlayerActivity t18}: app died, no saved state
03-27 14:30:17.049 2095-2165/? E/EGL_emulation: tid 2165: eglSurfaceAttrib(1227): error 0x3009 (EGL_BAD_MATCH)
03-27 14:30:17.049 2095-2165/? W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0x93699bc0, error=EGL_BAD_MATCH
03-27 14:30:17.060 2095-2165/? D/EGL_emulation: eglMakeCurrent: 0xa252cf80: ver 2 0 (tinfo 0xad530520)
如果我从我的函数中删除finish()
标记,我的应用程序在此之后就停止了工作。 LogCat消息如下。
03-28 19:37:55.302 1301-1304/? D/gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 3686400
[ 03-28 19:37:55.354 4006: 4065 D/ ]
HostConnection::get() New Host Connection established 0x84c6c640, tid 4065
[ 03-28 19:37:55.354 4006: 4065 W/ ]
Unrecognized GLES max version string in extensions: ANDROID_EMU_CHECKSUM_HELPER_v1
03-28 19:37:55.354 1301-1306/? E/BufferQueueProducer: [SurfaceView - com.akgames.kazzan/com.unity3d.player.UnityPlayerActivity] cancelBuffer: BufferQueue has been abandoned
03-28 19:37:55.385 1577-1988/? W/InputMethodManagerService: Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@59730ee (uid=10010 pid=3699)
03-28 19:37:55.386 4006-4065/? D/EGL_emulation: eglMakeCurrent: 0x8ad91000: ver 2 0 (tinfo 0x84f7b610)
03-28 19:37:55.388 4006-4065/? A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x54 in tid 4065 (UnityMain)
[ 03-28 19:37:55.388 1259: 1259 W/ ]
debuggerd: handling request: pid=4006 uid=10086 gid=10086 tid=4065
03-28 19:37:55.390 3699-3745/? D/EGL_emulation: eglMakeCurrent: 0x9fc055a0: ver 2 0 (tinfo 0x9fc036d0)
03-28 19:37:55.449 4073-4073/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-28 19:37:55.449 4073-4073/? A/DEBUG: Build fingerprint: 'google/sdk_google_phone_x86/generic_x86:7.0/NYC/4409132:userdebug/dev-keys'
03-28 19:37:55.449 4073-4073/? A/DEBUG: Revision: '0'
03-28 19:37:55.449 4073-4073/? A/DEBUG: ABI: 'x86'
03-28 19:37:55.449 4073-4073/? A/DEBUG: pid: 4006, tid: 4065, name: UnityMain >>> com.akgames.kazzan <<<
03-28 19:37:55.449 4073-4073/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x54
03-28 19:37:55.449 4073-4073/? A/DEBUG: eax 00000000 ebx 8ed4fc04 ecx 00000001 edx 00000001
03-28 19:37:55.449 4073-4073/? A/DEBUG: esi 88cfdf20 edi 00000001
03-28 19:37:55.449 4073-4073/? A/DEBUG: xcs 00000073 xds 0000007b xes 0000007b xfs 0000003b xss 0000007b
03-28 19:37:55.449 4073-4073/? A/DEBUG: eip 8eba62e9 ebp 88cfdd98 esp 88cfdd60 flags 00010286
03-28 19:37:55.450 4073-4073/? A/DEBUG: backtrace:
03-28 19:37:55.450 4073-4073/? A/DEBUG: #00 pc 001cb2e9 /data/app/com.akgames.kazzan-1/lib/x86/libmono.so
03-28 19:37:55.450 4073-4073/? A/DEBUG: #01 pc 001d0bb0 /data/app/com.akgames.kazzan-1/lib/x86/libmono.so (mono_array_new+130)
03-28 19:37:55.450 4073-4073/? A/DEBUG: #02 pc 00579a35 /data/app/com.akgames.kazzan-1/lib/x86/libunity.so
03-28 19:37:55.450 4073-4073/? A/DEBUG: #03 pc 006a47f7 /data/app/com.akgames.kazzan-1/lib/x86/libunity.so
03-28 19:37:55.450 4073-4073/? A/DEBUG: #04 pc 006a7226 /data/app/com.akgames.kazzan-1/lib/x86/libunity.so
03-28 19:37:55.450 4073-4073/? A/DEBUG: #05 pc 006b18a2 /data/app/com.akgames.kazzan-1/lib/x86/libunity.so
03-28 19:37:55.450 4073-4073/? A/DEBUG: #06 pc 001a4738 /data/app/com.akgames.kazzan-1/oat/x86/base.odex (offset 0x180000)
03-28 19:37:55.893 1577-4078/? W/ActivityManager: Force finishing activity com.akgames.kazzan/com.alptugrul.background.imgSec
03-28 19:37:55.896 1577-1595/? I/BootReceiver: Copying /data/tombstones/tombstone_06 to DropBox (SYSTEM_TOMBSTONE)
[ 03-28 19:37:55.900 1259: 1259 W/ ]
debuggerd: resuming target 4006
03-28 19:37:55.903 1577-4078/? E/JavaBinder: !!! FAILED BINDER TRANSACTION !!! (parcel size = 104)
03-28 19:37:55.905 1577-4078/? W/ActivityManager: Exception thrown during pause
android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(Binder.java:615)
at android.app.ApplicationThreadProxy.schedulePauseActivity(ApplicationThreadNative.java:784)
at com.android.server.am.ActivityStack.startPausingLocked(ActivityStack.java:1128)
at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:3483)
at com.android.server.am.ActivityStack.finishTopRunningActivityLocked(ActivityStack.java:3319)
at com.android.server.am.ActivityStackSupervisor.finishTopRunningActivityLocked(ActivityStackSupervisor.java:1842)
at com.android.server.am.AppErrors.handleAppCrashLocked(AppErrors.java:619)
at com.android.server.am.AppErrors.makeAppCrashingLocked(AppErrors.java:481)
at com.android.server.am.AppErrors.crashApplicationInner(AppErrors.java:357)
at com.android.server.am.AppErrors.crashApplication(AppErrors.java:309)
at com.android.server.am.ActivityManagerService.handleApplicationCrashInner(ActivityManagerService.java:13313)
at com.android.server.am.NativeCrashListener$NativeCrashReporter.run(NativeCrashListener.java:86)
03-28 19:37:55.910 1577-4078/? E/JavaBinder: !!! FAILED BINDER TRANSACTION !!! (parcel size = 56)
03-28 19:37:55.914 1577-4078/? E/JavaBinder: !!! FAILED BINDER TRANSACTION !!! (parcel size = 56)
03-28 19:37:55.919 1577-4078/? E/JavaBinder: !!! FAILED BINDER TRANSACTION !!! (parcel size = 112)
03-28 19:37:55.920 1577-4078/? I/ActivityManager: Restarting because process died: ActivityRecord{b998be6 u0 com.akgames.kazzan/com.unity3d.player.UnityPlayerActivity t21}
03-28 19:37:55.924 1577-4078/? E/JavaBinder: !!! FAILED BINDER TRANSACTION !!! (parcel size = 2304)
03-28 19:37:55.928 1577-4078/? W/ActivityManager: Exception when starting activity com.akgames.kazzan/com.unity3d.player.UnityPlayerActivity
android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(Binder.java:615)
at android.app.ApplicationThreadProxy.scheduleLaunchActivity(ApplicationThreadNative.java:883)
at com.android.server.am.ActivityStackSupervisor.realStartActivityLocked(ActivityStackSupervisor.java:1296)
at com.android.server.am.ActivityStackSupervisor.startSpecificActivityLocked(ActivityStackSupervisor.java:1395)
at com.android.server.am.ActivityStack.resumeTopActivityInnerLocked(ActivityStack.java:2514)
at com.android.server.am.ActivityStack.resumeTopActivityUncheckedLocked(ActivityStack.java:2106)
at com.android.server.am.ActivityStackSupervisor.resumeFocusedStackTopActivityLocked(ActivityStackSupervisor.java:1820)
at com.android.server.am.ActivityStackSupervisor.resumeFocusedStackTopActivityLocked(ActivityStackSupervisor.java:1810)
at com.android.server.am.ActivityStack.startPausingLocked(ActivityStack.java:1183)
at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:3483)
at com.android.server.am.ActivityStack.finishTopRunningActivityLocked(ActivityStack.java:3319)
at com.android.server.am.ActivityStackSupervisor.finishTopRunningActivityLocked(ActivityStackSupervisor.java:1842)
at com.android.server.am.AppErrors.handleAppCrashLocked(AppErrors.java:619)
at com.android.server.am.AppErrors.makeAppCrashingLocked(AppErrors.java:481)
at com.android.server.am.AppErrors.crashApplicationInner(AppErrors.java:357)
at com.android.server.am.AppErrors.crashApplication(AppErrors.java:309)
at com.android.server.am.ActivityManagerService.handleApplicationCrashInner(ActivityManagerService.java:13313)
at com.android.server.am.NativeCrashListener$NativeCrashReporter.run(NativeCrashListener.java:86)
03-28 19:37:55.928 1577-4078/? D/ActivityManager: cleanUpApplicationRecord -- 4006
03-28 19:37:55.933 1577-4078/? E/JavaBinder: !!! FAILED BINDER TRANSACTION !!! (parcel size = 56)
03-28 19:37:55.936 1577-1621/? W/InputDispatcher: channel '6f4da04 com.akgames.kazzan/com.unity3d.player.UnityPlayerActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9
03-28 19:37:55.936 1577-1621/? E/InputDispatcher: channel '6f4da04 com.akgames.kazzan/com.unity3d.player.UnityPlayerActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
03-28 19:37:55.936 1577-1621/? W/InputDispatcher: channel '5b9ff0b com.akgames.kazzan/com.alptugrul.background.imgSec (server)' ~ Consumer closed input channel or an error occurred. events=0x9
03-28 19:37:55.936 1577-1621/? E/InputDispatcher: channel '5b9ff0b com.akgames.kazzan/com.alptugrul.background.imgSec (server)' ~ Channel is unrecoverably broken and will be disposed!
03-28 19:37:55.937 1308-1308/? I/Zygote: Process 4006 exited due to signal (11)
03-28 19:37:55.939 1577-4078/? E/JavaBinder: !!! FAILED BINDER TRANSACTION !!! (parcel size = 56)
03-28 19:37:55.950 1577-1844/? I/WindowManager: WIN DEATH: Window{99c71d7 u0 SurfaceView - com.akgames.kazzan/com.alptugrul.background.imgSec}
03-28 19:37:55.950 1577-1844/? I/WindowManager: Destroying surface Surface(name=SurfaceView - com.akgames.kazzan/com.alptugrul.background.imgSec) called by com.android.server.wm.WindowStateAnimator.destroySurface:2016 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:882 com.android.server.wm.WindowState.removeLocked:1456 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2484 com.android.server.wm.WindowManagerService.removeWindowLocked:2442 com.android.server.wm.WindowState$DeathRecipient.binderDied:1787 android.os.BinderProxy.sendDeathNotice:688 <bottom of call stack>
03-28 19:37:55.956 1577-3454/? I/WindowManager: WIN DEATH: Window{6f4da04 u0 com.akgames.kazzan/com.unity3d.player.UnityPlayerActivity}
03-28 19:37:55.956 1577-3454/? W/InputDispatcher: Attempted to unregister already unregistered input channel '6f4da04 com.akgames.kazzan/com.unity3d.player.UnityPlayerActivity (server)'
03-28 19:37:55.956 1577-3454/? W/WindowManager: Force-removing child win Window{9901dad u0 SurfaceView - com.akgames.kazzan/com.unity3d.player.UnityPlayerActivity} from container Window{6f4da04 u0 com.akgames.kazzan/com.unity3d.player.UnityPlayerActivity}
03-28 19:37:55.959 4080-4080/? W/art: Unexpected CPU variant for X86 using defaults: x86
03-28 19:37:55.959 1577-3453/? W/WindowManager: Failed looking up window
java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@3c63bed does not exist
at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:9107)
at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:9098)
at com.android.server.wm.WindowState$DeathRecipient.binderDied(WindowState.java:1784)
at android.os.BinderProxy.sendDeathNotice(Binder.java:688)
03-28 19:37:55.959 1577-3453/? I/WindowManager: WIN DEATH: null
03-28 19:37:55.960 1577-1606/? I/WindowManager: WIN DEATH: Window{5b9ff0b u0 com.akgames.kazzan/com.alptugrul.background.imgSec}
03-28 19:37:55.960 1577-1606/? W/InputDispatcher: Attempted to unregister already unregistered input channel '5b9ff0b com.akgames.kazzan/com.alptugrul.background.imgSec (server)'
03-28 19:37:55.960 1577-1606/? I/WindowManager: Destroying surface Surface(name=com.akgames.kazzan/com.alptugrul.background.imgSec) called by com.android.server.wm.WindowStateAnimator.destroySurface:2016 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:882 com.android.server.wm.WindowState.removeLocked:1456 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2484 com.android.server.wm.WindowManagerService.removeWindowLocked:2442 com.android.server.wm.WindowState$DeathRecipient.binderDied:1787 android.os.BinderProxy.sendDeathNotice:688 <bottom of call stack>
03-28 19:37:55.962 1577-4078/? I/ActivityManager: Start proc 4080:com.akgames.kazzan/u0a86 for activity com.akgames.kazzan/com.unity3d.player.UnityPlayerActivity
03-28 19:37:55.980 4080-4087/? E/art: Failed sending reply to debugger: Broken pipe
03-28 19:37:55.980 4080-4087/? I/art: Debugger is no longer active
03-28 19:37:55.980 4080-4087/? I/art: Starting a blocking GC Instrumentation
03-28 19:37:55.984 1577-1598/? I/WindowManager: Destroying surface Surface(name=Starting com.akgames.kazzan) called by com.android.server.wm.WindowStateAnimator.destroySurface:2016 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:882 com.android.server.wm.WindowState.removeLocked:1456 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2484 com.android.server.wm.WindowManagerService.removeWindowLocked:2442 com.android.server.wm.WindowManagerService.removeWindowLocked:2311 com.android.server.wm.WindowManagerService.removeWindow:2306 com.android.server.wm.Session.remove:202
03-28 19:37:56.011 1577-3058/? I/OpenGLRenderer: Initialized EGL, version 1.4
03-28 19:37:56.011 1577-3058/? D/OpenGLRenderer: Swap behavior 1
03-28 19:37:56.024 1577-3058/? D/EGL_emulation: eglCreateContext: 0x9bdd1820: maj 2 min 0 rcv 2
03-28 19:37:56.039 1577-3058/? D/EGL_emulation: eglMakeCurrent: 0x9bdd1820: ver 2 0 (tinfo 0x86a033e0)
03-28 19:37:56.048 1577-3058/? E/EGL_emulation: tid 3058: eglSurfaceAttrib(1227): error 0x3009 (EGL_BAD_MATCH)
03-28 19:37:56.048 1577-3058/? W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0x8a639540, error=EGL_BAD_MATCH
03-28 19:37:56.054 1577-3058/? D/EGL_emulation: eglMakeCurrent: 0x9bdd1820: ver 2 0 (tinfo 0x86a033e0)
03-28 19:37:56.105 1301-3146/? D/gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 3686400
[ 03-28 19:37:56.121 4080: 4080 D/ ]
HostConnection::get() New Host Connection established 0x9e435740, tid 4080
[ 03-28 19:37:56.123 4080: 4080 W/ ]
Unrecognized GLES max version string in extensions: ANDROID_EMU_CHECKSUM_HELPER_v1
[ 03-28 19:37:56.124 4080: 4080 W/ ]
Process pipe failed
03-28 19:37:56.227 1577-1598/? I/ActivityManager: Displayed com.akgames.kazzan/com.unity3d.player.UnityPlayerActivity: +306ms
03-28 19:37:56.245 1577-3455/? I/WindowManager: Destroying surface Surface(name=com.android.documentsui/com.android.documentsui.DocumentsActivity) called by com.android.server.wm.WindowStateAnimator.destroySurface:2016 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:882 com.android.server.wm.WindowState.removeLocked:1456 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2484 com.android.server.wm.WindowManagerService.removeWindowLocked:2442 com.android.server.wm.WindowManagerService.removeWindowLocked:2311 com.android.server.wm.WindowManagerService.removeWindow:2306 com.android.server.wm.Session.remove:202
答案 0 :(得分:0)
您的应用已关闭,因为您在finish()
方法中致电onActivityResult
。
删除finish()
会修复它。