zetbaitsu / Compressor

An android image compression library.
7.08k stars 963 forks source link

Caused by java.io.FileNotFoundException /storage/emulated/0/Pictures (Is a directory) #140

Open kldMohammed opened 4 years ago

kldMohammed commented 4 years ago

this crash happens to many users and this is stack trace

Caused by java.io.FileNotFoundException: /storage/emulated/0/Pictures (Is a directory) at java.io.FileOutputStream.open0(FileOutputStream.java) at java.io.FileOutputStream.open(FileOutputStream.java:308) at java.io.FileOutputStream.<init>(FileOutputStream.java:238) at java.io.FileOutputStream.<init>(FileOutputStream.java:119) at id.zelory.compressor.ImageUtil.compressImage(ImageUtil.java:13) at id.zelory.compressor.Compressor.compressToFile(Compressor.java:13) at id.zelory.compressor.Compressor.compressToFile(Compressor.java:13) at app.cartech.user.ui.home.HomeActivity.sendRequest(HomeActivity.java:13) at app.cartech.user.ui.home.HomeActivity.hasActiveComplaint(HomeActivity.java:13) at app.cartech.user.ui.home.HomeActivity.onCreate(HomeActivity.java:13) at android.app.Activity.performCreate(Activity.java:7327) at android.app.Activity.performCreate(Activity.java:7318) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3094) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3257) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1948) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7050) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)

i used version 2.1.0

vnhjdh commented 4 years ago

Have the same issue.

Nikunj2505 commented 4 years ago

Any solution to resolve this issue?