有人可以帮我解决这些错误。我说我的应用程序的火力点,做了试运行。我得到了这些错误。我是新来的Android应用程序开发。我还没有明确的想法,我应该从哪里开始修复这些错误。
Fatal exception
android.os.FileUriExposedException: file:///storage/emulated/0/QR%20and%20Barcode/text.png exposed beyond app through ClipData.Item.getUri()
FATAL EXCEPTION: ControllerMessenger
Process: one.teqtoapps.barqr, PID: 9659
android.os.FileUriExposedException: file:///storage/emulated/0/QR%20and%20Barcode/text.png exposed beyond app through ClipData.Item.getUri()
at android.os.StrictMode.onFileUriExposed(StrictMode.java:1958)
at android.net.Uri.checkFileUriExposed(Uri.java:2348)
at android.content.ClipData.prepareToLeaveProcess(ClipData.java:941)
at android.content.Intent.prepareToLeaveProcess(Intent.java:9735)
at android.content.Intent.prepareToLeaveProcess(Intent.java:9741)
at android.content.Intent.prepareToLeaveProcess(Intent.java:9720)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1609)
at androidx.test.runner.MonitoringInstrumentation.execStartActivity(MonitoringInstrumentation.java:152)
at android.app.Activity.startActivityForResult(Activity.java:4472)
at android.support.v4.app.BaseFragmentActivityApi16.startActivityForResult(BaseFragmentActivityApi16.java:54)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:68)
at android.app.Activity.startActivityForResult(Activity.java:4430)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:751)
at android.app.Activity.startActivity(Activity.java:4791)
at android.app.Activity.startActivity(Activity.java:4759)
at one.teqtoapps.barqr.utility.AppUtils.share(AppUtils.java:83)
at one.teqtoapps.barqr.fragment.GenerateFragment$6.onSaved(GenerateFragment.java:183)
at one.teqtoapps.barqr.utility.SaveImage.onPostExecute(SaveImage.java:41)
at one.teqtoapps.barqr.utility.SaveImage.onPostExecute(SaveImage.java:16)
at android.os.AsyncTask.finish(AsyncTask.java:695)
at android.os.AsyncTask.-wrap1(Unknown Source:0)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:712)
at android.os.Handler.dispatchMessage(Handler.java:105)
at androidx.test.espresso.base.Interrogator.a(Interrogator.java:19)
at androidx.test.espresso.base.UiControllerImpl.a(UiControllerImpl.java:142)
at androidx.test.espresso.base.UiControllerImpl.a(UiControllerImpl.java:96)
at androidx.test.espresso.base.UiControllerImpl.a(UiControllerImpl.java:37)
at androidx.test.espresso.action.MotionEvents.a(MotionEvents.java:74)
at androidx.test.espresso.action.MotionEvents.a(MotionEvents.java:52)
at androidx.test.espresso.action.Tap.c(Tap.java:9)
at androidx.test.espresso.action.Tap.a(Tap.java:19)
at androidx.test.espresso.action.Tap$1.b(Tap.java:2)
at androidx.test.espresso.action.GeneralClickAction.perform(GeneralClickAction.java:22)
at androidx.test.espresso.ViewInteraction$SingleExecutionViewAction.perform(ViewInteraction.java:9)
at androidx.test.espresso.ViewInteraction.a(ViewInteraction.java:78)
at androidx.test.espresso.ViewInteraction.a(ViewInteraction.java:94)
at androidx.test.espresso.ViewInteraction$1.call(ViewInteraction.java:3)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
我得到了相同的崩溃在谷歌播放测试期间的一些设备我认为这将帮助您:https://issuetracker.google.com/issues/113164874
在我的情况下,显示日志
未能采取截图:takeScreenshot返回null
复制4个字节
六月一日至29日:27:43.544:I /机器人(11035):---------开始崩溃
六月一日至29日:27:43.545:E / AndroidRuntime(11035):致命异常:ControllerMessenger
六月一日至29日:27:43.545:E / AndroidRuntime(11035):进程:PID:11035
六月一日至29日:27:43.545:E / AndroidRuntime(11035):显示java.lang.NullPointerException:尝试上的空对象引用调用虚拟方法 '无效android.graphics.Bitmap.recycle()'
因为我的屏幕上有安全标志,采取截屏和测试框架试图采取截屏,将在回收返回null和投掷NullPointerException异常。
如需更多帮助,您可以在这里回复我。