简体   繁体   English

从其他应用程序导航回我的应用程序时,我的Android应用程序崩溃

[英]My Android application crashes when navigating back to my application from other applications

I am working on android application, My application is crashing saying this message 'Unfortunately process "iTextSharpGeneric.ITextSharp" has stopped' when i am navigating form other application to my application. 我正在使用android应用程序,当我从其他应用程序导航到我的应用程序时,我的应用程序崩溃并显示此消息“不幸的是,进程“ iTextSharpGeneric.ITextSharp”已停止”。 iTextSharpGeneric is my projoect name. iTextSharpGeneric是我的项目名称。

i found this excpetion in Adnroid device logging window:- 我在Adnroid设备日志记录窗口中发现了此异常:-

"java.lang.RunttimeException: Unable to instantiate activity ComponentInfo{com.iTextSharpGenericTest/iTextSharpGenericTest..TestActivity2}.java.lang.ClassNotFoundException" “ java.lang.RunttimeException:无法实例化活动ComponentInfo {com.iTextSharpGenericTest / iTextSharpGenericTest..TestActivity2} .java.lang.ClassNotFoundException”

Here is the scenari i am doing. 这是我正在做的场景。 In my application 在我的申请中

ITextSharpGeneric--> Opening a pdf(using adobe reader)-> After Editing pdf In Adobe reader-> Selecting Share option-> Showing list of application-> I am selecting "iTextSharpGeneric" n the list of applications(to save that edited pdf details)-> "Application Crashes here" ITextSharpGeneric->打开pdf(使用Adobe Reader)->编辑pdf后,在Adobe Reader中->选择“共享”选项->“显示应用程序列表”->我在应用程序列表中选择“ iTextSharpGeneric”(以保存已编辑的pdf详细信息)->“应用程序在此处崩溃”

I tried using the save OnSaveInstanceState() and OnRestoreInstanceState() for retaining the acitivity state. 我尝试使用save OnSaveInstanceState()和OnRestoreInstanceState()保留活动状态。 But still getting the same issue. 但是仍然遇到同样的问题。

Here is my intent filters tags in AndroidManifest.xml 这是我在AndroidManifest.xml中的意图过滤器标签

activity android:name="com.iTextSharpGenericTest.Activity2" android:label="iTextSharp"
intent-filter
action android:name="android.intent.action.MAIN" 
action android:name="android.intent.action.SEND" 
action android:name="android.intent.action.VIEW"
category android:name="android.intent.category.DEFAULT" 
category android:name="android.intent.category.BROWSABLE"       
data android:mimeType="application/pdf"             
intent-filter
activity  

What's wrong i am doing? 我在做什么错? Let me know you valueble suggesstions. 让我知道您的宝贵建议。

Here is the detailed log of exception, I just selected filter option"Android Runtime" in Android Device Logging Window. 这是异常的详细日志,我刚刚在Android设备日志窗口中选择了过滤器选项“ Android运行时”。

02-21 14:31:33.000 E/AndroidRuntime( 5614): FATAL EXCEPTION: main 02-21 14:31:33.000 E/AndroidRuntime( 5614): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.iTextSharpGenericTest/iTextSharpGenericTest.Activity2}: java.lang.ClassNotFoundException: iTextSharpGenericTest.Activity2 02-21 14:31:33.000 E/AndroidRuntime( 5614): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1884) 02-21 14:31:33.000 E/AndroidRuntime( 5614): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1985) 02-21 14:31:33.000 E/AndroidRuntime( 5614): at android.app.ActivityThread.access$600(ActivityThread.java:127) 02-21 14:31:33.000 E/AndroidRuntime( 5614): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1151) 02-21 14:31:33.000 E/AndroidRuntime( 5614): at android.os.Handler.dispatchMessage(Handler.java:99) 02-21 14:31:33.000 E/AndroidRuntime( 5614): at android.os.Looper.loop(Looper.java:137) 02-21 14:31:33.000 E/AndroidRuntime( 02-21 14:31:33.000 E / AndroidRuntime(5614):致命异常:主02-21 14:31:33.000 E / AndroidRuntime(5614):java.lang.RuntimeException:无法实例化活动ComponentInfo {com.iTextSharpGenericTest / iTextSharpGenericTest.Activity2}:java.lang.ClassNotFoundException:iTextSharpGenericTest.Activity2 02-21 14:31:33.000 E / AndroidRuntime(5614):在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1884)02-21 14:31 :33.000 E / AndroidRuntime(5614):在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1985)02-21 14:31:33.000 E / AndroidRuntime(5614):在android.app.ActivityThread.access $ 600(ActivityThread .java:127)02-21 14:31:33.000 E / AndroidRuntime(5614):位于android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1151)02-21 14:31:33.000 E / AndroidRuntime(5614) ):在android.os.Handler.dispatchMessage(Handler.java:99)02-21 14:31:33.000 E / AndroidRuntime(5614):在android.os.Looper.loop(Looper.java:137)02-21 14:31:33.000 E / AndroidRuntime( 5614): at android.app.ActivityThread.main(ActivityThread.java:4447) 02-21 14:31:33.000 E/AndroidRuntime( 5614): at java.lang.reflect.Method.invokeNative(Native Method) 02-21 14:31:33.000 E/AndroidRuntime( 5614): at java.lang.reflect.Method.invoke(Method.java:511) 02-21 14:31:33.000 E/AndroidRuntime( 5614): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) 02-21 14:31:33.000 E/AndroidRuntime( 5614): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 02-21 14:31:33.000 E/AndroidRuntime( 5614): at dalvik.system.NativeStart.main(Native Method) 02-21 14:31:33.000 E/AndroidRuntime( 5614): Caused by: java.lang.ClassNotFoundException: iTextSharpGenericTest.Activity2 02-21 14:31:33.000 E/AndroidRuntime( 5614): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61) 02-21 14:31:33.000 E/AndroidRuntime( 5614): at java.lang.ClassLoader.loadClass(ClassLoader.java:501) 02-21 14:31:33.000 E/AndroidRuntime( 5614): at java.lang.ClassLoade 5614):在android.app.ActivityThread.main(ActivityThread.java:4447)02-21 14:31:33.000 E / AndroidRuntime(5614):在java.lang.reflect.Method.invokeNative(本机方法)02-21 14:31:33.000 E / AndroidRuntime(5614):at java.lang.reflect.Method.invoke(Method.java:511)02-21 14:31:33.000 E / AndroidRuntime(5614):at com.android.internal .os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:784)02-21 14:31:33.000 E / AndroidRuntime(5614):在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)02 -21 14:31:33.000 E / AndroidRuntime(5614):在dalvik.system.NativeStart.main(本机方法)02-21 14:31:33.000 E / AndroidRuntime(5614):原因:java.lang.ClassNotFoundException: iTextSharpGenericTest.Activity2 02-21 14:31:33.000 E / AndroidRuntime(5614):在dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)02-21 14:31:33.000 E / AndroidRuntime(5614):在Java .lang.ClassLoader.loadClass(ClassLoader.java:501)02-21 14:31:33.000 E / AndroidRuntime(5614):at java.lang.ClassLoade r.loadClass(ClassLoader.java:461) 02-21 14:31:33.000 E/AndroidRuntime( 5614): at android.app.Instrumentation.newActivity(Instrumentation.java:1066) 02-21 14:31:33.000 E/AndroidRuntime( 5614): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1875) 02-21 14:31:33.000 E/AndroidRuntime( 5614): ... 11 more 02-21 14:31:33.010 W/ActivityManager( 169): Force finishing activity com.iTextSharpGenericTest/iTextSharpGenericTest.Activity2 02-21 14:31:33.520 W/ActivityManager( 169): Activity pause timeout for ActivityRecord{4163ed28 com.iTextSharpGenericTest/iTextSharpGenericTest.Activity2} 02-21 14:31:33.650 D/OpenGLRenderer( 5215): Flushing caches (mode 0) 02-21 14:31:43.820 W/ActivityManager( 169): Activity destroy timeout for ActivityRecord{4163ed28 com.iTextSharpGenericTest/iTextSharpGenericTest.Activity2} 02-21 14:31:46.360 I/Process ( 5614): Sending signal. r.loadClass(ClassLoader.java:461)02-21 14:31:33.000 E / AndroidRuntime(5614):at android.app.Instrumentation.newActivity(Instrumentation.java:1066)02-21 14:31:33.000 E / AndroidRuntime(5614):位于android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1875)02-21 14:31:33.000 E / AndroidRuntime(5614):... 11更多02-21 14:31:33.010 W / ActivityManager(169):强制完成活动com.iTextSharpGenericTest / iTextSharpGenericTest.Activity2 02-21 14:31:33.520 W / ActivityManager(169):ActivityRecord {4163ed28 com.iTextSharpGenericTest / iTextSharpGenericTest.Activity2}的活动暂停超时02-21 14: 31:33.650 D / OpenGLRenderer(5215):刷新缓存(模式0)02-21 14:31:43.820 W / ActivityManager(169):ActivityRecord {4163ed28 com.iTextSharpGenericTest / iTextSharpGenericTest.Activity2}的活动销毁超时时间02-21 14 :31:46.360 I / Process(5614):正在发送信号 PID: 5614 SIG: 9 02-21 14:31:46.380 W/InputDispatcher( 169): channel '414cb888 com.iTextSharpGenericTest/itextsharpgenerictest.Activity1 (server)' ~ Consumer closed input channel or an error occurred. PID:5614 SIG:9 02-21 14:31:46.380 W / InputDispatcher(169):通道'414cb888 com.iTextSharpGenericTest / itextsharpgenerictest.Activity1(server)'〜使用者关闭输入通道或发生错误。 events=0x8 02-21 14:31:46.380 E/InputDispatcher( 169): channel '414cb888 com.iTextSharpGenericTest/itextsharpgenerictest.Activity1 (server)' ~ Channel is unrecoverably broken and will be disposed! events = 0x8 02-21 14:31:46.380 E / InputDispatcher(169):通道'414cb888 com.iTextSharpGenericTest / itextsharpgenerictest.Activity1(server)'〜通道已损坏且无法恢复! 02-21 14:31:46.380 W/InputDispatcher( 169): Attempted to unregister already unregistered input channel '414cb888 com.iTextSharpGenericTest/itextsharpgenerictest.Activity1 (server)' 02-21 14:31:46.380 I/ActivityManager( 169): Process com.iTextSharpGenericTest (pid 5614) has died. 02-21 14:31:46.380 W / InputDispatcher(169):尝试注销已注销的输入通道'414cb888 com.iTextSharpGenericTest / itextsharpgenerictest.Activity1(server)'02-21 14:31:46.380 I / ActivityManager(169):进程com.iTextSharpGenericTest(pid 5614)已死。 02-21 14:31:46.380 V/TabletStatusBar( 250): setLightsOn(true) 02-21 14:31:46.380 I/WindowManager( 169): WIN DEATH: Window{414cb888 com.iTextSharpGenericTest/itextsharpgenerictest.Activity1 paused=false} 02-21 14:31:46.390 I/WindowManager( 169): WINDOW DIED Window{414cb888 com.iTextSharpGenericTest/itextsharpgenerictest.Activity1 paused=false} 02-21 14:31:46.630 D/AndroidRuntime( 5645): 02-21 14:31:46.630 D/AndroidRuntime( 5645): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<< 02-21 14:31:46.630 D/AndroidRuntime( 5645): CheckJNI is OFF 02-21 14:31:46.870 D/AndroidRuntime( 5645): Calling main entry com.android.commands.am.Am 02-21 14:31:46.880 D/AndroidRuntime( 5645): Shutting down VM 02-21 14:31:46.880 I/AndroidRuntime( 5645): NOTE: attach of thread 'Binder Thread #3' failed 02-21 14:31:46.880 I/ActivityManager( 169): Force stopping package com.iTextSharpGenericTest uid=10086 02-21 14:31:46.880 I/ActivityManager( 169): Force finishing activity ActivityRecord{41291 02-21 14:31:46.380 V / TabletStatusBar(250):setLightsOn(true)02-21 14:31:46.380 I / WindowManager(169):WIN DEATH:Window {414cb888 com.iTextSharpGenericTest / itextsharpgenerictest.Activity1 paused = false } 02-21 14:31:46.390 I / WindowManager(169):WINDOW DIED Window {414cb888 com.iTextSharpGenericTest / itextsharpgenerictest.Activity1 paused = false} 02-21 14:31:46.630 D / AndroidRuntime(5645):02-21 14:31:46.630 D / AndroidRuntime(5645):>>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<< 02-21 14:31:46.630 D / AndroidRuntime(5645): CheckJNI为OFF 02-21 14:31:46.870 D / AndroidRuntime(5645):调用主条目com.android.commands.am.Am 02-21 14:31:46.880 D / AndroidRuntime(5645):关闭VM 02- 21 14:31:46.880 I / AndroidRuntime(5645):注意:线程'Binder线程#3'的附加失败02-21 14:31:46.880 I / ActivityManager(169):强制停止软件包com.iTextSharpGenericTest uid = 10086 02 -21 14:31:46.880 I / ActivityManager(169):强制完成活动ActivityRecord {41291 510 com.iTextSharpGenericTest/itextsharpgenerictest.Activity1} 02-21 14:31:46.890 D/dalvikvm( 5645): GC_CONCURRENT freed 96K, 83% free 450K/2560K, paused 1ms+0ms 02-21 14:32:29.770 D/dalvikvm( 250): GC_CONCURRENT freed 422K, 73% free 8194K/30151K, paused 2ms 510 510 com.iTextSharpGenericTest / itextsharpgenerictest.Activity1} 02/21 14:31:46.890 D / dalvikvm(5645):GC_CONCURRENT释放了96K,83%释放了450K / 2560K,暂停了1ms + 0ms 02-21 14:32:29.770 D / dalvikvm (250):GC_CONCURRENT释放422K,73%释放8194K / 30151K,暂停2ms

Thanks Sreeni 谢谢斯雷尼

"iTextSharpGenericTest..TestActivity2}" As you can see, you are actually passing your Intentfilter for you class wrong. “ iTextSharpGenericTest..TestActivity2}”如您所见,您实际上为类错误传递了Intentfilter。 There are 2 dots between iTextSharpGenericTest and TestActivity2 . iTextSharpGenericTestTestActivity2之间有两个点。

May be that's the case why it is not able to detect your TestActivity2 class and hence throwing that error java.lang.ClassNotFoundException . 可能就是这种情况,为什么它无法检测到您的TestActivity2类并因此引发该错误java.lang.ClassNotFoundException

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从我的Android应用程序中打开其他应用程序 - Open other applications from my application in android Android:如何拒绝从其他应用程序访问我的应用程序的组件? - Android: how to deny access to the components of my application from other applications? Android 将字符串从我的应用程序发送到任何其他应用程序 - Android sending string from my application to any other applications 阻止其他 android 应用程序识别我的应用程序的方法? - Ways to stop other android applications from identifying my application? Android - 从我的应用程序启动其他应用程序时,我可以传递参数吗? - Android - can I pass a parameter when launch other applications from my application? 当我的android应用程序崩溃时获取通知 - Get Notification when my android application crashes 从Android中的Google Map拨打电话时返回我的应用程序 - Back to my application when call direction from google map in Android 当我的 Android 应用程序的启动画面打开时,应用程序崩溃 - When the splash screen of my Android application opens the application crashes Android setContentView使我的应用程序崩溃 - Android setContentView crashes my application 突然我的Android应用程式当机 - suddenly my android application crashes
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM