3

Aこれは、SingleTop次のような別の意図データを使用して、彼女の中でこのアクティビティを開始したいときです。

Intent intent = new Intent();
intent.setData(Uri.parse("something://someone"));
startActivity(intent);

この例外が発生します:

startActivityUncheckedLocked: task left null
V/ActivityManager(  596): java.lang.RuntimeException: here
V/ActivityManager(  596):   at com.android.server.am.ActivityStackSupervisor.startActivityUncheckedLocked(ActivityStackSupervisor.java:1646)
V/ActivityManager(  596):   at com.android.server.am.ActivityStackSupervisor.startActivityLocked(ActivityStackSupervisor.java:1249)
V/ActivityManager(  596):   at com.android.server.am.ActivityStackSupervisor.startActivityMayWait(ActivityStackSupervisor.java:741)
V/ActivityManager(  596):   at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:3118)
V/ActivityManager(  596):   at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:3104)
V/ActivityManager(  596):   at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:135)
V/ActivityManager(  596):   at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2071)
V/ActivityManager(  596):   at android.os.Binder.execTransact(Binder.java:404)

私は何をすべきか?私は何か間違ったことをしていますか?

ありがとう

ファイルのEDIT 1
で、activity で開くようAndroidManifest.xmlに定義しました。something://A

EDIT 2
アクティビティAがそうでない場合singleTop、問題はありません。

編集 3
このエラーによってアプリが強制的に閉じられることはありません。実際、問題は、このエラーが発生した直後に、次のようなエラーが発生することです。

F/libc    (24873): Fatal signal 11 (SIGSEGV) at 0x00007074 (code=1), thread 24939 (Thread-2287)
I/DEBUG   (  195): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   (  195): Build fingerprint: 'google/occam/mako:4.4.2/KOT49H/937116:user/release-keys'
I/DEBUG   (  195): Revision: '11'
I/DEBUG   (  195): pid: 24873, tid: 24939, name: Thread-2287  >>> com.blah.blah <<<
I/DEBUG   (  195): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00007074
I/DEBUG   (  195):     r0 779b9828  r1 4199b380  r2 00000014  r3 00007075
I/DEBUG   (  195):     r4 76b24ac0  r5 00000014  r6 00000000  r7 779b9828
I/DEBUG   (  195):     r8 774c3afc  r9 76c84d90  sl 76da6250  fp 774c3b14
I/DEBUG   (  195):     ip 733e9cec  sp 774c3ac0  lr 40a49b9d  pc 00007074  cpsr 00070030
I/DEBUG   (  195):     d0  0000000000000000  d1  0000000000000000
I/DEBUG   (  195):     d2  0000000000000000  d3  0000000000000000
I/DEBUG   (  195):     d4  0000000000000000  d5  0000000000000000
I/DEBUG   (  195):     d6  0000000000000000  d7  0000000000000000
I/DEBUG   (  195):     d8  0000000000000000  d9  0000000000000000
I/DEBUG   (  195):     d10 0000000000000000  d11 0000000000000000
I/DEBUG   (  195):     d12 0000000000000000  d13 0000000000000000
I/DEBUG   (  195):     d14 0000000000000000  d15 0000000000000000
I/DEBUG   (  195):     d16 0000000000000000  d17 0000000000000000
I/DEBUG   (  195):     d18 4a9b4d1ae3550b44  d19 1619de72ef18c72c
I/DEBUG   (  195):     d20 a5598b5ef3ee9d2c  d21 ea73a9b3cbecc5ff
I/DEBUG   (  195):     d22 1f5becf8adc083d0  d23 3f09f8604410f094
I/DEBUG   (  195):     d24 4000000000000000  d25 547d42aea2879f2e
I/DEBUG   (  195):     d26 40f86a0000000000  d27 3ff0000000000000
I/DEBUG   (  195):     d28 40f86a0000000000  d29 0000000000000001
I/DEBUG   (  195):     d30 4024000000000000  d31 4000000000000000  
...  
Force finishing activity com.blah.blah.A

これは私のアプリを殺します。

4

2 に答える 2

-1

あなたの意図では、クラスを開始するように設定していません。つまり、開始するアクティビティを定義していません。

このようなもの:

Intent intent = new Intent(this, newActivity.class);

また

intent.setClass(this, newActivity.class);
于 2014-02-11T23:25:42.520 に答える