0

i am getting an fatal exception like

 java.lang.RuntimeException: Unable to start activity ComponentInfo{android/com.android.internal.app.ResolverActivity}: java.lang.SecurityException: Given caller package android is not running in process ProcessRecord

in an class which extends AtivityGroup trying to start another activity as bellow

View view = ((ActivityGroup) a).getLocalActivityManager().startActivity( "ReferenceName",
          intent.addFlags(
          Intent.FLAG_ACTIVITY_CLEAR_TOP)).getDecorView();
          a.setContentView(view);

which gives the above exception,

so i tried with usual way of starting Activity as bellow and it works fine.

intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
    a.startActivity(intent) 

i need another activity within same tab where i need the 1st method, can anybody help me to solve this problem ?

4

1 に答える 1

0

TabActivityとGroupActivityの使用は非推奨であり、TextViewを使用しても同じ効果を得ることができます:)

于 2012-11-26T11:54:33.877 に答える