java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) Caused by: java.io.FileNotFoundException: qpon.csv: open failed: EROFS (Read-only file system) at libcore.io.IoBridge.open(IoBridge.java:492) at java.io.FileOutputStream.(FileOutputStream.java:236) at java.io.FileOutputStream.(FileOutputStream.java:125) at java.io.FileWriter.(FileWriter.java:63) at com.ivandlrapp.virtualenconder.ui.history.HistoryBottomSheetDialog.exportCSV(HistoryBottomSheetDialog.kt:64) at com.ivandlrapp.virtualenconder.ui.history.HistoryBottomSheetDialog.onViewCreated$lambda-3(HistoryBottomSheetDialog.kt:55) at com.ivandlrapp.virtualenconder.ui.history.HistoryBottomSheetDialog.$r8$lambda$XOD8CuZgBTVKrUm_EEK1Lis60e0(Unknown Source:0) at com.ivandlrapp.virtualenconder.ui.history.HistoryBottomSheetDialog$$ExternalSyntheticLambda3.onClick(Unknown Source:4) at android.view.View.performClick(View.java:7448) at android.view.View.performClickInternal(View.java:7425) at android.view.View.access$3600(View.java:810) at android.view.View$PerformClick.run(View.java:28305) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:223) at android.app.ActivityThread.main(ActivityThread.java:7656) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) Caused by: android.system.ErrnoException: open failed: EROFS (Read-only file system) at libcore.io.Linux.open(Native Method) at libcore.io.ForwardingOs.open(ForwardingOs.java:166) at libcore.io.BlockGuardOs.open(BlockGuardOs.java:254) at libcore.io.ForwardingOs.open(ForwardingOs.java:166) at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7542) at libcore.io.IoBridge.open(IoBridge.java:478) at java.io.FileOutputStream.(FileOutputStream.java:236) at java.io.FileOutputStream.(FileOutputStream.java:125) at java.io.FileWriter.(FileWriter.java:63) at com.ivandlrapp.virtualenconder.ui.history.HistoryBottomSheetDialog.exportCSV(HistoryBottomSheetDialog.kt:64) at com.ivandlrapp.virtualenconder.ui.history.HistoryBottomSheetDialog.onViewCreated$lambda-3(HistoryBottomSheetDialog.kt:55) at com.ivandlrapp.virtualenconder.ui.history.HistoryBottomSheetDialog.$r8$lambda$XOD8CuZgBTVKrUm_EEK1Lis60e0(Unknown Source:0) at com.ivandlrapp.virtualenconder.ui.history.HistoryBottomSheetDialog$$ExternalSyntheticLambda3.onClick(Unknown Source:4) at android.view.View.performClick(View.java:7448) at android.view.View.performClickInternal(View.java:7425) at android.view.View.access$3600(View.java:810) at android.view.View$PerformClick.run(View.java:28305) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:223) at android.app.ActivityThread.main(ActivityThread.java:7656) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.io.FileNotFoundException: qpon.csv: open failed: EROFS (Read-only file system)
at libcore.io.IoBridge.open(IoBridge.java:492)
at java.io.FileOutputStream.<init>(FileOutputStream.java:236)
at java.io.FileOutputStream.<init>(FileOutputStream.java:125)
at java.io.FileWriter.<init>(FileWriter.java:63)
at com.ivandlrapp.virtualenconder.ui.history.HistoryBottomSheetDialog.exportCSV(HistoryBottomSheetDialog.kt:64)
at com.ivandlrapp.virtualenconder.ui.history.HistoryBottomSheetDialog.onViewCreated$lambda-3(HistoryBottomSheetDialog.kt:55)
at com.ivandlrapp.virtualenconder.ui.history.HistoryBottomSheetDialog.$r8$lambda$XOD8CuZgBTVKrUm_EEK1Lis60e0(Unknown Source:0)
at com.ivandlrapp.virtualenconder.ui.history.HistoryBottomSheetDialog$$ExternalSyntheticLambda3.onClick(Unknown Source:4)
at android.view.View.performClick(View.java:7448)
at android.view.View.performClickInternal(View.java:7425)
at android.view.View.access$3600(View.java:810)
at android.view.View$PerformClick.run(View.java:28305)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
**Caused by: android.system.ErrnoException: open failed: EROFS (Read-only file system)**
at libcore.io.Linux.open(Native Method)
at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:254)
at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7542)
at libcore.io.IoBridge.open(IoBridge.java:478)
at java.io.FileOutputStream.<init>(FileOutputStream.java:236)
at java.io.FileOutputStream.<init>(FileOutputStream.java:125)
at java.io.FileWriter.<init>(FileWriter.java:63)
at com.ivandlrapp.virtualenconder.ui.history.HistoryBottomSheetDialog.exportCSV(HistoryBottomSheetDialog.kt:64)
at com.ivandlrapp.virtualenconder.ui.history.HistoryBottomSheetDialog.onViewCreated$lambda-3(HistoryBottomSheetDialog.kt:55)
at com.ivandlrapp.virtualenconder.ui.history.HistoryBottomSheetDialog.$r8$lambda$XOD8CuZgBTVKrUm_EEK1Lis60e0(Unknown Source:0)
at com.ivandlrapp.virtualenconder.ui.history.HistoryBottomSheetDialog$$ExternalSyntheticLambda3.onClick(Unknown Source:4)
at android.view.View.performClick(View.java:7448)
at android.view.View.performClickInternal(View.java:7425)
at android.view.View.access$3600(View.java:810)
at android.view.View$PerformClick.run(View.java:28305)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="com.ivandlrapp.virtualenconder.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
<paths>
<external-cache-path name="images" path="/"/>
<cache-path name="docs" path="/"/>
</paths>