tastelessjolt/youtube-dl-android

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getAbsolutePath()' on a null object reference

ledux6 opened this issue · 1 comments

When clicking on any of the ways to download the video I get this error:

12-28 17:36:43.620 22533-22533/me.harshithgoka.youtubedl E/AndroidRuntime: FATAL EXCEPTION: main
Process: me.harshithgoka.youtubedl, PID: 22533
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getAbsolutePath()' on a null object reference
at me.harshithgoka.youtubedl.Activities.MainActivity.download(MainActivity.java:525)
at me.harshithgoka.youtubedl.Adapters.FormatAdapter$MyViewHolder.onClick(FormatAdapter.kt:51)
at android.view.View.performClick(View.java:5184)
at android.view.View$PerformClick.run(View.java:20893)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5938)
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:1400)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)

Hi, I'm sorry as I was busy with other things. This happened because there was no Movies or Videos folder known to the Android System on your phone. So, I'll create a temp folder and use that folder. I'll fix it in sometime.