Android手机应用,浏览器应用,地图应用崩溃,当我使用意图从我的应用程序启动它们

时间:2015-05-08 23:19:40

标签: android android-intent

我正在启动不同的应用,例如手机应用,浏览器应用,我的应用中的地图应用

 String url = "http://www." + textView.getText().toString();
            Log.d(TAG,url);
            Intent i = new Intent(Intent.ACTION_VIEW);
            i.setData(Uri.parse(url));
            mContext.startActivity(i);

起初他们工作得很好,但现在每个应用都崩溃了 "不幸的是,chorme停止了工作"或者"不幸的拨号器已停止工作"我希望有人知道它为什么会发生。提前谢谢。

这是我的logcat

05-08 19:12:28.720  10227-10227/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.google.android.apps.maps, PID: 10227
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.google.android.apps.maps/com.google.android.maps.MapsActivity}: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.example.krishnateja.bigapplesearch.models.MTAMainScreenModel
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2314)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2388)
        at android.app.ActivityThread.access$800(ActivityThread.java:148)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1292)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:135)
        at android.app.ActivityThread.main(ActivityThread.java:5312)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)
 Caused by: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.example.krishnateja.bigapplesearch.models.MTAMainScreenModel
        at android.os.Parcel.readParcelableCreator(Parcel.java:2289)
        at android.os.Parcel.readParcelable(Parcel.java:2239)
        at android.os.Parcel.readValue(Parcel.java:2146)
        at android.os.Parcel.readListInternal(Parcel.java:2520)
        at android.os.Parcel.readArrayList(Parcel.java:1836)
        at android.os.Parcel.readValue(Parcel.java:2167)
        at android.os.Parcel.readArrayMapInternal(Parcel.java:2479)
        at android.os.BaseBundle.unparcel(BaseBundle.java:221)
        at android.os.BaseBundle.getIntArray(BaseBundle.java:1164)
        at android.content.Intent.getIntArrayExtra(Intent.java:5004)
        at com.google.android.apps.gmm.m.l.a(PG:1061)
        at com.google.android.apps.gmm.m.w.a(PG:2241)
        at com.google.android.apps.gmm.base.activities.a.onNewIntent(PG:953)
        at com.google.android.apps.gmm.base.activities.a.onCreate(PG:641)
        at android.app.Activity.performCreate(Activity.java:5953)
        at 

1 个答案:

答案 0 :(得分:0)

找不到课程的原因是我为了其他一些意图而重置了开始活动,但是我没有if条件说添加额外的特定意图。一个愚蠢的错误。