提交事务时获取事务ID

时间:2018-01-15 13:03:03

标签: c# transactions transactionscope

我在事务范围内使用IEnlistmentNotification接口,我希望在范围完成后访问提交方法中的当前事务ID,如下所示:

public void Commit(Enlistment enlistment)
{     
    string transactionId = Transaction.Current.TransactionInformation.LocalIdentifier;
    enlistment.Done();
} 

但是我收到错误,因为现在transaction.current为null。 从我检查的登记实例具有transactionId的私有成员,但我无法访问它的保护级别。

当范围完成时,还有另一种获取事务ID的方法吗?

1 个答案:

答案 0 :(得分:0)

03/21 23:27:31: Launching app
$ adb install-multiple -r -t C:\Users\Hashir Sarwar\AndroidStudioProjects\CourseLog\app\build\intermediates\split-apk\debug\slices\slice_3.apk C:\Users\Hashir Sarwar\AndroidStudioProjects\CourseLog\app\build\intermediates\split-apk\debug\slices\slice_0.apk C:\Users\Hashir Sarwar\AndroidStudioProjects\CourseLog\app\build\intermediates\split-apk\debug\slices\slice_5.apk C:\Users\Hashir Sarwar\AndroidStudioProjects\CourseLog\app\build\intermediates\split-apk\debug\slices\slice_6.apk C:\Users\Hashir Sarwar\AndroidStudioProjects\CourseLog\app\build\intermediates\split-apk\debug\slices\slice_4.apk C:\Users\Hashir Sarwar\AndroidStudioProjects\CourseLog\app\build\intermediates\split-apk\debug\slices\slice_7.apk C:\Users\Hashir Sarwar\AndroidStudioProjects\CourseLog\app\build\intermediates\split-apk\debug\slices\slice_1.apk C:\Users\Hashir Sarwar\AndroidStudioProjects\CourseLog\app\build\intermediates\split-apk\debug\slices\slice_2.apk C:\Users\Hashir Sarwar\AndroidStudioProjects\CourseLog\app\build\intermediates\split-apk\debug\dep\dependencies.apk C:\Users\Hashir Sarwar\AndroidStudioProjects\CourseLog\app\build\intermediates\split-apk\debug\slices\slice_9.apk C:\Users\Hashir Sarwar\AndroidStudioProjects\CourseLog\app\build\intermediates\split-apk\debug\slices\slice_8.apk C:\Users\Hashir Sarwar\AndroidStudioProjects\CourseLog\app\build\intermediates\instant-run-apk\debug\app-debug.apk 
Split APKs installed in 4 s 505 ms
$ adb shell am start -n "com.example.courselog/com.example.courselog.login" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Client not ready yet..Waiting for process to come online
Waiting for process to come online
Connected to process 8872 on device tecno-tecno_wx4_pro-024101081H000931
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
D/ActivityThread: EYE startEyeVerifyBroadcast packagename=com.example.courselog; ClassName=com.example.courselog.login
V/PhoneWindow: DecorView setVisiblity: visibility = 4, Parent = null, this = DecorView@80f65b4[],statusBarBackground visible =true,statusColor: 0xff757575->
D/WindowClient: Add to mViews: DecorView@80f65b4[login], this = android.view.WindowManagerGlobal@62af5e0
D/OpenGLRenderer: Dumper init 2 threads <0x786410c140>
    <com.example.courselog> is running.
D/OpenGLRenderer: CanvasContext() 0x78640a9800
D/GraphicBuffer: register, handle(0x7864016200) (w:1024 h:960 s:1024 f:0x1 u:0x000100)
D/ViewRootImpl[login]: hardware acceleration is enabled, this = ViewRoot{2752099 com.example.courselog/com.example.courselog.login,ident = 0}
V/PhoneWindow: DecorView setVisiblity: visibility = 0, Parent = ViewRoot{2752099 com.example.courselog/com.example.courselog.login,ident = 0}, this = DecorView@80f65b4[login],statusBarBackground visible =true,statusColor: 0xff757575->
I/lulingjie--screenshot--observer--: observer is rigistedDecorView@80f65b4[login]
D/Surface: Surface::allocateBuffers(this=0x786f055c00)
D/OpenGLRenderer: CanvasContext() 0x78640a9800 initialize window=0x786f055c00, title=com.example.courselog/com.example.courselog.login
I/OpenGLRenderer: Initialized EGL, version 1.4
D/OpenGLRenderer: Swap behavior 1
D/OpenGLRenderer: Created EGL context (0x7865bfc980)
D/OpenGLRenderer: ProgramCache.init: enable enhancement 1
I/OpenGLRenderer: Get disable program binary service property (0)
    Initializing program atlas...
I/ProgramBinary/Service: ProgramBinaryService client side disable debugging.
    ProgramBinaryService client side disable binary content debugging.
D/ProgramBinary/Service: BpProgramBinaryService.getReady
D/ProgramBinary/Service: BpProgramBinaryService.getProgramBinaryData
I/OpenGLRenderer: Program binary detail: Binary length is 182828, program map length is 124.
    Succeeded to mmap program binaries. File descriptor is 72, and path is /dev/ashmem.
    No need to use file discriptor anymore, close fd(72).
D/OpenGLRenderer: Initializing program cache from 0x0, size = -1
D/MALI: eglCreateImageKHR:513: [Crop] 0 0 1024 960  img[1024 960] 
D/Surface: Surface::connect(this=0x786f055c00,api=1)
W/libEGL: [ANDROID_RECORDABLE] format: 1
D/mali_winsys: EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000
D/OpenGLRenderer: CacheTexture 3 upload: x, y, width height = 0, 0, 149, 298
    ProgramCache.generateProgram: 0
D/GraphicBuffer: register, handle(0x7855888bc0) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
D/OpenGLRenderer: ProgramCache.generateProgram: 34359738371
D/OpenGLRenderer: ProgramCache.generateProgram: 5242945
D/OpenGLRenderer: ProgramCache.generateProgram: 5242944
D/OpenGLRenderer: ProgramCache.generateProgram: 240518168576
D/OpenGLRenderer: ProgramCache.generateProgram: 68724719680
D/GraphicBuffer: register, handle(0x7855458b80) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
V/InputMethodManager: onWindowFocus: android.support.v7.widget.AppCompatEditText{1fac449 VFED..CL. .F....ID 326,312-706,403 #7f070043 app:id/editText2} softInputMode=272 first=true flags=#81810100
D/GraphicBuffer: register, handle(0x785552b840) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
D/OpenGLRenderer: ProgramCache.generateProgram: 34364981312
D/ActivityThread: EYE startEyeVerifyBroadcast packagename=com.example.courselog; ClassName=com.example.courselog.createProfile
V/PhoneWindow: DecorView setVisiblity: visibility = 4, Parent = null, this = DecorView@60bd3b3[],statusBarBackground visible =true,statusColor: 0xff757575->
D/WindowClient: Add to mViews: DecorView@60bd3b3[createProfile], this = android.view.WindowManagerGlobal@62af5e0
D/OpenGLRenderer: CanvasContext() 0x7864115000
D/ViewRootImpl[createProfile]: hardware acceleration is enabled, this = ViewRoot{9f25056 com.example.courselog/com.example.courselog.createProfile,ident = 1}
V/PhoneWindow: DecorView setVisiblity: visibility = 0, Parent = ViewRoot{9f25056 com.example.courselog/com.example.courselog.createProfile,ident = 1}, this = DecorView@60bd3b3[createProfile],statusBarBackground visible =true,statusColor: 0xff757575->
D/Surface: Surface::allocateBuffers(this=0x786f054e00)
D/OpenGLRenderer: CanvasContext() 0x7864115000 initialize window=0x786f054e00, title=com.example.courselog/com.example.courselog.createProfile
D/Surface: Surface::connect(this=0x786f054e00,api=1)
W/libEGL: [ANDROID_RECORDABLE] format: 1
D/mali_winsys: EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000
D/OpenGLRenderer: CacheTexture 3 upload: x, y, width height = 0, 0, 237, 501
D/GraphicBuffer: register, handle(0x7855888a40) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
D/GraphicBuffer: register, handle(0x78558a3f00) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
V/InputMethodManager: onWindowFocus: android.support.v7.widget.AppCompatEditText{646d01b VFED..CL. .F....ID 224,155-644,246 #7f070039 app:id/editText} softInputMode=272 first=true flags=#81810100
D/GraphicBuffer: register, handle(0x78558a4800) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
W/IInputConnectionWrapper: finishComposingText on inactive InputConnection
D/Surface: Surface::disconnect(this=0x786f055c00,api=1)
D/GraphicBuffer: unregister, handle(0x7855458b80) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
    unregister, handle(0x785552b840) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
    unregister, handle(0x7855888bc0) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
D/Surface: Surface::disconnect(this=0x786f055c00,api=1)
I/art: Do partial code cache collection, code=24KB, data=30KB
I/art: After code cache collection, code=24KB, data=30KB
I/art: Increasing code cache capacity to 128KB
V/PhoneWindow: DecorView setVisiblity: visibility = 4, Parent = ViewRoot{2752099 com.example.courselog/com.example.courselog.login,ident = 0}, this = DecorView@80f65b4[login],statusBarBackground visible =true,statusColor: 0xff757575->
D/OpenGLRenderer: ProgramCache.generateProgram: 34359738368
W/IInputConnectionWrapper: finishComposingText on inactive InputConnection
    finishComposingText on inactive InputConnection
D/OpenGLRenderer: CacheTexture 3 upload: x, y, width height = 136, 118, 10, 11
W/IInputConnectionWrapper: finishComposingText on inactive InputConnection
I/art: Do partial code cache collection, code=58KB, data=56KB
    After code cache collection, code=58KB, data=56KB
I/art: Increasing code cache capacity to 256KB
I/art: Enter while loop.
I/art: Background sticky concurrent mark sweep GC freed 17132(1466KB) AllocSpace objects, 0(0B) LOS objects, 33% free, 5MB/8MB, paused 952us total 102.554ms
W/IInputConnectionWrapper: finishComposingText on inactive InputConnection
D/OpenGLRenderer: CacheTexture 3 upload: x, y, width height = 28, 416, 23, 28
I/greenpower: the fling duration 75
W/IInputConnectionWrapper: finishComposingText on inactive InputConnection
I/View: Key down dispatch to android.support.v7.widget.AppCompatEditText{50d4ce8 VFED..CL. .F...... 224,878-644,969 #7f070051 app:id/editText7}, event = KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_2, scanCode=0, metaState=0, flags=0x6, repeatCount=0, eventTime=36542366, downTime=36542366, deviceId=-1, source=0x0 }
V/ViewRootImpl[createProfile]: [ANR Warning]Input routeing takes more than 6000ms since 1970-01-01 05:00:00.000, this = ViewRoot{9f25056 com.example.courselog/com.example.courselog.createProfile,ident = 1}
    Input event delivered to android.view.ViewRootImpl$EarlyPostImeInputStage@8181057 at 2019-03-21 23:27:55.227
    Input event delivered to android.view.ViewRootImpl$NativePostImeInputStage@183a744 at 2019-03-21 23:27:55.228
V/ViewRootImpl[createProfile]: Input event delivered to android.view.ViewRootImpl$ViewPostImeInputStage@49d202d at 2019-03-21 23:27:55.228
    Input event delivered to android.view.ViewRootImpl$SyntheticInputStage@6829962 at 2019-03-21 23:27:55.264
I/View: Key up dispatch to android.support.v7.widget.AppCompatEditText{50d4ce8 VFED..CL. .F....ID 224,878-644,969 #7f070051 app:id/editText7}, event = KeyEvent { action=ACTION_UP, keyCode=KEYCODE_2, scanCode=0, metaState=0, flags=0x6, repeatCount=0, eventTime=36542366, downTime=36542366, deviceId=-1, source=0x0 }
V/ViewRootImpl[createProfile]: [ANR Warning]Input routeing takes more than 6000ms since 1970-01-01 05:00:00.000, this = ViewRoot{9f25056 com.example.courselog/com.example.courselog.createProfile,ident = 1}
V/ViewRootImpl[createProfile]: Input event delivered to android.view.ViewRootImpl$EarlyPostImeInputStage@8181057 at 2019-03-21 23:27:55.268
V/ViewRootImpl[createProfile]: Input event delivered to android.view.ViewRootImpl$NativePostImeInputStage@183a744 at 2019-03-21 23:27:55.268
    Input event delivered to android.view.ViewRootImpl$ViewPostImeInputStage@49d202d at 2019-03-21 23:27:55.268
    Input event delivered to android.view.ViewRootImpl$SyntheticInputStage@6829962 at 2019-03-21 23:27:55.293
D/OpenGLRenderer: CacheTexture 3 upload: x, y, width height = 216, 144, 20, 28
I/View: Key down dispatch to android.support.v7.widget.AppCompatEditText{50d4ce8 VFED..CL. .F...... 224,878-644,969 #7f070051 app:id/editText7}, event = KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_0, scanCode=0, metaState=0, flags=0x6, repeatCount=0, eventTime=36542619, downTime=36542619, deviceId=-1, source=0x0 }
V/ViewRootImpl[createProfile]: [ANR Warning]Input routeing takes more than 6000ms since 1970-01-01 05:00:00.000, this = ViewRoot{9f25056 com.example.courselog/com.example.courselog.createProfile,ident = 1}
    Input event delivered to android.view.ViewRootImpl$EarlyPostImeInputStage@8181057 at 2019-03-21 23:27:55.480
V/ViewRootImpl[createProfile]: Input event delivered to android.view.ViewRootImpl$NativePostImeInputStage@183a744 at 2019-03-21 23:27:55.480
    Input event delivered to android.view.ViewRootImpl$ViewPostImeInputStage@49d202d at 2019-03-21 23:27:55.480
    Input event delivered to android.view.ViewRootImpl$SyntheticInputStage@6829962 at 2019-03-21 23:27:55.483
I/View: Key up dispatch to android.support.v7.widget.AppCompatEditText{50d4ce8 VFED..CL. .F...... 224,878-644,969 #7f070051 app:id/editText7}, event = KeyEvent { action=ACTION_UP, keyCode=KEYCODE_0, scanCode=0, metaState=0, flags=0x6, repeatCount=0, eventTime=36542619, downTime=36542619, deviceId=-1, source=0x0 }
D/OpenGLRenderer: CacheTexture 3 upload: x, y, width height = 216, 171, 19, 29
V/ViewRootImpl[createProfile]: [ANR Warning]Input routeing takes more than 6000ms since 1970-01-01 05:00:00.000, this = ViewRoot{9f25056 com.example.courselog/com.example.courselog.createProfile,ident = 1}
    Input event delivered to android.view.ViewRootImpl$EarlyPostImeInputStage@8181057 at 2019-03-21 23:27:55.497
    Input event delivered to android.view.ViewRootImpl$NativePostImeInputStage@183a744 at 2019-03-21 23:27:55.497
    Input event delivered to android.view.ViewRootImpl$ViewPostImeInputStage@49d202d at 2019-03-21 23:27:55.497
    Input event delivered to android.view.ViewRootImpl$SyntheticInputStage@6829962 at 2019-03-21 23:27:55.497
I/View: Key down dispatch to android.support.v7.widget.AppCompatEditText{50d4ce8 VFED..CL. .F...... 224,878-644,969 #7f070051 app:id/editText7}, event = KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_1, scanCode=0, metaState=0, flags=0x6, repeatCount=0, eventTime=36542741, downTime=36542741, deviceId=-1, source=0x0 }
V/ViewRootImpl[createProfile]: [ANR Warning]Input routeing takes more than 6000ms since 1970-01-01 05:00:00.000, this = ViewRoot{9f25056 com.example.courselog/com.example.courselog.createProfile,ident = 1}
V/ViewRootImpl[createProfile]: Input event delivered to android.view.ViewRootImpl$EarlyPostImeInputStage@8181057 at 2019-03-21 23:27:55.602
    Input event delivered to android.view.ViewRootImpl$NativePostImeInputStage@183a744 at 2019-03-21 23:27:55.602
    Input event delivered to android.view.ViewRootImpl$ViewPostImeInputStage@49d202d at 2019-03-21 23:27:55.602
V/ViewRootImpl[createProfile]: Input event delivered to android.view.ViewRootImpl$SyntheticInputStage@6829962 at 2019-03-21 23:27:55.605
I/View: Key up dispatch to android.support.v7.widget.AppCompatEditText{50d4ce8 VFED..CL. .F....ID 224,878-644,969 #7f070051 app:id/editText7}, event = KeyEvent { action=ACTION_UP, keyCode=KEYCODE_1, scanCode=0, metaState=0, flags=0x6, repeatCount=0, eventTime=36542741, downTime=36542741, deviceId=-1, source=0x0 }
V/ViewRootImpl[createProfile]: [ANR Warning]Input routeing takes more than 6000ms since 1970-01-01 05:00:00.000, this = ViewRoot{9f25056 com.example.courselog/com.example.courselog.createProfile,ident = 1}
    Input event delivered to android.view.ViewRootImpl$EarlyPostImeInputStage@8181057 at 2019-03-21 23:27:55.609
    Input event delivered to android.view.ViewRootImpl$NativePostImeInputStage@183a744 at 2019-03-21 23:27:55.609
    Input event delivered to android.view.ViewRootImpl$ViewPostImeInputStage@49d202d at 2019-03-21 23:27:55.609
    Input event delivered to android.view.ViewRootImpl$SyntheticInputStage@6829962 at 2019-03-21 23:27:55.610
D/OpenGLRenderer: CacheTexture 3 upload: x, y, width height = 136, 128, 12, 28
I/View: Key down dispatch to android.support.v7.widget.AppCompatEditText{50d4ce8 VFED..CL. .F...... 224,878-644,969 #7f070051 app:id/editText7}, event = KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_8, scanCode=0, metaState=0, flags=0x6, repeatCount=0, eventTime=36542869, downTime=36542869, deviceId=-1, source=0x0 }
V/ViewRootImpl[createProfile]: [ANR Warning]Input routeing takes more than 6000ms since 1970-01-01 05:00:00.000, this = ViewRoot{9f25056 com.example.courselog/com.example.courselog.createProfile,ident = 1}
    Input event delivered to android.view.ViewRootImpl$EarlyPostImeInputStage@8181057 at 2019-03-21 23:27:55.731
    Input event delivered to android.view.ViewRootImpl$NativePostImeInputStage@183a744 at 2019-03-21 23:27:55.731
V/ViewRootImpl[createProfile]: Input event delivered to android.view.ViewRootImpl$ViewPostImeInputStage@49d202d at 2019-03-21 23:27:55.731
V/ViewRootImpl[createProfile]: Input event delivered to android.view.ViewRootImpl$SyntheticInputStage@6829962 at 2019-03-21 23:27:55.735
I/View: Key up dispatch to android.support.v7.widget.AppCompatEditText{50d4ce8 VFED..CL. .F....ID 224,878-644,969 #7f070051 app:id/editText7}, event = KeyEvent { action=ACTION_UP, keyCode=KEYCODE_8, scanCode=0, metaState=0, flags=0x6, repeatCount=0, eventTime=36542869, downTime=36542870, deviceId=-1, source=0x0 }
V/ViewRootImpl[createProfile]: [ANR Warning]Input routeing takes more than 6000ms since 1970-01-01 05:00:00.000, this = ViewRoot{9f25056 com.example.courselog/com.example.courselog.createProfile,ident = 1}
V/ViewRootImpl[createProfile]: Input event delivered to android.view.ViewRootImpl$EarlyPostImeInputStage@8181057 at 2019-03-21 23:27:55.738
    Input event delivered to android.view.ViewRootImpl$NativePostImeInputStage@183a744 at 2019-03-21 23:27:55.738
    Input event delivered to android.view.ViewRootImpl$ViewPostImeInputStage@49d202d at 2019-03-21 23:27:55.738
    Input event delivered to android.view.ViewRootImpl$SyntheticInputStage@6829962 at 2019-03-21 23:27:55.739
D/OpenGLRenderer: CacheTexture 3 upload: x, y, width height = 216, 199, 20, 29
I/greenpower: the fling duration 159
D/OpenGLRenderer: CacheTexture 3 upload: x, y, width height = 0, 0, 261, 505
W/IInputConnectionWrapper: finishComposingText on inactive InputConnection
D/OpenGLRenderer: CacheTexture 3 upload: x, y, width height = 236, 60, 24, 29
D/OpenGLRenderer: ProgramCache.generateProgram: 103079215104
D/OpenGLRenderer: ProgramCache.generateProgram: 103084458052
D/ActivityThread: EYE startEyeVerifyBroadcast packagename=com.example.courselog; ClassName=com.example.courselog.login
V/PhoneWindow: DecorView setVisiblity: visibility = 0, Parent = ViewRoot{2752099 com.example.courselog/com.example.courselog.login,ident = 0}, this = DecorView@80f65b4[login],statusBarBackground visible =true,statusColor: 0xff757575->
D/Surface: Surface::allocateBuffers(this=0x785597b400)
D/OpenGLRenderer: CanvasContext() 0x78640a9800 initialize window=0x785597b400, title=com.example.courselog/com.example.courselog.login
D/Surface: Surface::connect(this=0x785597b400,api=1)
W/libEGL: [ANDROID_RECORDABLE] format: 1
D/mali_winsys: EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000
D/GraphicBuffer: register, handle(0x78558a3600) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
D/GraphicBuffer: register, handle(0x78558a57c0) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
W/SQLiteConnection: Could not change the database journal as DB was busy. Proceeding...
V/InputMethodManager: onWindowFocus: android.support.v7.widget.AppCompatEditText{1fac449 VFED..CL. .F....ID 326,312-706,403 #7f070043 app:id/editText2} softInputMode=16 first=true flags=#81810100
D/SQLiteDatabase: beginTransaction()
D/SQLiteDatabase: endTransaction()
D/SQLiteDatabase: beginTransaction()
D/GraphicBuffer: register, handle(0x78550e8840) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
W/IInputConnectionWrapper: finishComposingText on inactive InputConnection
    finishComposingText on inactive InputConnection
D/SQLiteDatabase: endTransaction()
D/SQLiteDatabase: beginTransaction()
D/SQLiteDatabase: endTransaction()
D/SQLiteDatabase: beginTransaction()
D/SQLiteDatabase: endTransaction()
E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
    Process: com.example.courselog, PID: 8872
    java.lang.RuntimeException: An error occurred while executing doInBackground()
        at android.os.AsyncTask$3.done(AsyncTask.java:318)
        at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
        at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
        at java.util.concurrent.FutureTask.run(FutureTask.java:242)
        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at java.lang.Thread.run(Thread.java:761)
     Caused by: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
        at android.os.Handler.<init>(Handler.java:208)
        at android.os.Handler.<init>(Handler.java:122)
        at android.widget.Toast$TN.<init>(Toast.java:351)
        at android.widget.Toast.<init>(Toast.java:106)
        at android.widget.Toast.makeText(Toast.java:265)
        at com.example.courselog.createProfile$1.doInBackground(createProfile.java:78)
        at com.example.courselog.createProfile$1.doInBackground(createProfile.java:66)
        at android.os.AsyncTask$2.call(AsyncTask.java:304)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243) 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 
        at java.lang.Thread.run(Thread.java:761) 
D/Surface: Surface::disconnect(this=0x786f054e00,api=1)
D/GraphicBuffer: unregister, handle(0x78558a3f00) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
    unregister, handle(0x78558a4800) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
    unregister, handle(0x7855888a40) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
D/Surface: Surface::disconnect(this=0x786f054e00,api=1)
D/OpenGLRenderer: endAllActiveAnimators on 0x7855577c00 (RippleDrawable @e82e4de) with handle 0x78554d3540
D/Surface: Surface::disconnect(this=0x785597b400,api=1)
D/GraphicBuffer: unregister, handle(0x78558a3600) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
    unregister, handle(0x78558a57c0) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
    unregister, handle(0x78550e8840) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
D/Surface: Surface::disconnect(this=0x785597b400,api=1)
D/WindowClient: Remove from mViews: DecorView@80f65b4[login], this = android.view.WindowManagerGlobal@62af5e0
D/OpenGLRenderer: Destroyed EGL context (0x7865bfc980)
D/OpenGLRenderer: Terminated EGL display (0x1)
D/WindowClient: Remove from mViews: DecorView@60bd3b3[createProfile], this = android.view.WindowManagerGlobal@62af5e0
Application terminated.
相关问题