audio: th-cam.com/video/ge00ac8xFg4/w-d-xo.html Due to copyright reasons I had to remove the music from the Video. Which also removed the audio. But here I am giving a link of the audio. Really sorry for the inconvenience.
Can you please suggest what to do?? at 3:57 it is giving error while syncing Please remove usages of `jcenter()` Maven repository from your build scripts and migrate your build to other Maven repositories.
15:40 If you click on "Allow" and if the app has been crashed, do this code change: old code: items[i] = mySongs.get(i).getName().toString().replace(".mp3", null).replace(".wav", null); new code: items[i] = mySongs.get(i).getName().toString().replace(".mp3", ".mp3").replace(".wav", ".wav"); Because Java thinks it should change the extention from .mp3 to null (I don't know), then it errors like "java.lang.NullPointerException: replacement == null " So, I thought and saw that the problem is the beause of " replacement==null" statement Use new code, then pass the error with success. You will see your songs have listed. Note: Use your music.mp3 and music.wav files into both SD card > Musics folder and Internal Memory > Musics folder. (No need, your app will find them all) I can now see the musics in the list.
@@KgFamily123 Use Try-Catch-Exception and look for build errors, save and restart your app, clean, build project e.t.c. try again. Or, ask to the video owner.
Thats good to see that you are making a music player. I also trying to make a music player app. Your video will help me a lot this time. I saw your videos before and it is so much helpful for all.
If your app crashes after allowing permissions then do this (it worked for me) change your findSong() method to this public ArrayList findSong(File file) { ArrayList arrayList = new ArrayList(); File [] files = file.listFiles(); if(files != null) { for (File singlefile : files) { if (singlefile.isDirectory() && !singlefile.isHidden()) { arrayList.addAll(findSong(singlefile)); } else { if (singlefile.getName().endsWith(".wav")) { arrayList.add(singlefile); } else if (singlefile.getName().endsWith(".mp3")) { arrayList.add(singlefile); } } } } return arrayList; } This was fixed by Wasif izar in the comments I'm just pasting his code so people can see it better.
Hi, good tutorial, I have a problem and I cannot fix it when I build the project as an apk file and install it on my phone and run it, it asks me to access the files and I accept and then it closes the application and nothing happens and I don’t know why, is the problem from the code or from the phone Please put the project files in order to match my work with yours to see where the problem is
At 15 :49 when i installed the app on my smartphone.. And i gave the permission it automatically closed and a pop up appears on my notifications bar that the app has crashed Now please help me in this what would i do now ??
bro I got issues at 15:40 I'm using my device{Redmi9) n successfully installed but when I press allow button the app close immediately but if press deny I can open the app but song list won't come out
idk but why my app keeps crashing, and in the error it is showing that attempt to get null lenght of array. everything is working properly but it is not displaying the song i guess. brother can you please help? i am doing it for my college project.
@@siddharthadubey1103 I tried 3-4 music player coding, all fails : so you must try to make BMI CALCULATOR.. for your project.. Or you follow ForMyScholar TH-cam , she made simple Music Player.. I think that's work for you
In any case, your application is not opening use This:- if (singleFile.isDirectory() && !singleFile.isHidden()) { if (!singleFile.getName().equals("Android")) { arrayList.addAll(findSongs(singleFile)); } } because in my opinion, "Android" file is very huge to scan
The time on the end of the seek bar is not updating as we change the song using the next button or previous button so how to change the song time as we click the button to change the song
hello, I am a absolute beginner to developing apps, and for some reason, in 15:06 I typed exactly what you did, _listView = findViewById(R.id.ListViewSong)_, but android studio in my case says "Cannot resolve symbol 'ListViewSong'", why?
I got error when i tried to open it with Redmi Note 8 Pro & Galaxy Tab A [Android-Version 10](Error: App keeps stopping). but it worked with Samsung Galaxy A3 android-Version 6.0.1 . Please i need Help
For those all whose AVD is crashing change your findsong method with this public ArrayList findSong(File file) { ArrayList arrayList = new ArrayList(); File [] files = file.listFiles(); if(files != null) { for (File singlefile : files) { if (singlefile.isDirectory() && !singlefile.isHidden()) { arrayList.addAll(findSong(singlefile)); } else { if (singlefile.getName().endsWith(".wav")) { arrayList.add(singlefile); } else if (singlefile.getName().endsWith(".mp3")) { arrayList.add(singlefile); } } } } return arrayList; }
sir i have created the app as per your instruction. but when i install the app on my phone and give permission of storage it autmotically closes and when i denied the permission it runs, but does not show any thing it was total black screen.what should i do now?
For those all whose App is crashing after granting permissions, replace your findsong() method with the following: public ArrayList findSong(File file) { ArrayList arrayList = new ArrayList(); File [] files = file.listFiles(); if(files != null) { for (File singlefile : files) { if (singlefile.isDirectory() && !singlefile.isHidden()) { arrayList.addAll(findSong(singlefile)); } else { if (singlefile.getName().endsWith(".wav")) { arrayList.add(singlefile); } else if (singlefile.getName().endsWith(".mp3")) { arrayList.add(singlefile); } } } } return arrayList; }
list view is not showing a single song even though all my songs are in internal storage , logcat showing no error . what i suppose to do now ? anyone ??
Good evening, you have the application of this video but Unfortunately not show me the result is a final also appeared you have, what is the solution and thank you
Hello im just wondering if anyone can help me please? i am trying to do a music app, i have found that the getStorageDirectory is depreciated, am i correct in thinking i need to use the getExternalStorageState? When i try get all the audio files and scan the directory my app shuts down. can anyone please help in regards to how can i finish implementing this please so my audio files on my cellphone can be accessed and used in my mp3 player im making
Caused by: com.android.builder.errors.EvalIssueException: Configuration `debugRuntimeClasspath` contains AndroidX dependencies, but the `android.useAndroidX` property is not enabled, which may cause runtime issues. when i run the code after coding till 5:35 I'm getting this error
Might be a dumb question, but does this app not read and scan the internal storage of the phone? or does it only scan and search for songs in the external storage sd card?
Sir plz..help me 🙏 sir I did the code up to 16:04 then I run it , it was working properly and showing the play list too but with play list of songs it was showing other files too plz..help 🙏🙏
items[i] = mySongs.get(i).getName().toString().replace(target:".mp3" , replacement:"").replace(target:".wav",replacement:""); line 85 is not solve this error show erroe vairiable not declare
audio: th-cam.com/video/ge00ac8xFg4/w-d-xo.html
Due to copyright reasons I had to remove the music from the Video. Which also removed the audio. But here I am giving a link of the audio. Really sorry for the inconvenience.
Can you please suggest what to do?? at 3:57 it is giving error while syncing
Please remove usages of `jcenter()` Maven repository from your build scripts and migrate your build to other Maven repositories.
Currently detected usages in: root project 'Neo Music Player', project ':app'
Affected Modules: app
Does forward and backward buttons work?
@@aaronfernandes4688 yeah it does
@@NaveenSingh-js6ts ignore it, otherwise you can update suggestion
Seriously , this UI is litt . keeep building projects and creating tutorials
15:40 If you click on "Allow" and if the app has been crashed, do this code change:
old code: items[i] = mySongs.get(i).getName().toString().replace(".mp3", null).replace(".wav", null);
new code: items[i] = mySongs.get(i).getName().toString().replace(".mp3", ".mp3").replace(".wav", ".wav");
Because Java thinks it should change the extention from .mp3 to null (I don't know), then it errors like "java.lang.NullPointerException: replacement == null "
So, I thought and saw that the problem is the beause of " replacement==null" statement
Use new code, then pass the error with success. You will see your songs have listed.
Note: Use your music.mp3 and music.wav files into both SD card > Musics folder and Internal Memory > Musics folder. (No need, your app will find them all)
I can now see the musics in the list.
Still crashing!
Can you help me, please?
@@KgFamily123 Use Try-Catch-Exception and look for build errors, save and restart your app, clean, build project e.t.c. try again. Or, ask to the video owner.
Thats good to see that you are making a music player. I also trying to make a music player app. Your video will help me a lot this time.
I saw your videos before and it is so much helpful for all.
you are really on point and video is superb, just small explanation of what adapter is and similar words would be great
@15:45
When I open the app its automatically closed and even I can't see the songs are visible or not..
have you found a solution to this?
@@parthshah1600 have you found a solution to this?
@@parthshah1600 i have the same problem, how can i check this?
I also have same problem, so now what should I do? Anyone tell me about that....
Use try catch block like below:
public ArrayList findSong(File file) {
ArrayList arraylist = new ArrayList();
File f = file;
if (file.length() > 0) {
tvresult2.setText(" not null");
tvresult3.setText(file.toString());
} else {
tvresult2.setText(" null");
}
File[] files = f.listFiles();
try {
files = f.listFiles();
for (int i = 0; i < files.length; i++) {
File singleFile = files[i];
if (singleFile.isDirectory() && !singleFile.isHidden()) {
arraylist.addAll(findSong(singleFile));
} else {
if (singleFile.getName().endsWith(".mp3") || singleFile.getName().endsWith(".wav")) {
arraylist.add(singleFile);
}
}
}
} catch (NullPointerException e) {
toastMsg("Error : " + e + " " + e.getStackTrace()[0].getLineNumber());
}
return arraylist;
}
Songs are not shows in my app like in This video at 15:44, in my app shows only app name and blank page how to fix this problem ?
bro can u solve it?
sir How to add search view in music app
If your app crashes after allowing permissions then do this (it worked for me)
change your findSong() method to this
public ArrayList findSong(File file) {
ArrayList arrayList = new ArrayList();
File [] files = file.listFiles();
if(files != null) {
for (File singlefile : files) {
if (singlefile.isDirectory() && !singlefile.isHidden()) {
arrayList.addAll(findSong(singlefile));
} else {
if (singlefile.getName().endsWith(".wav")) {
arrayList.add(singlefile);
} else if (singlefile.getName().endsWith(".mp3")) {
arrayList.add(singlefile);
}
}
}
}
return arrayList;
}
This was fixed by Wasif izar in the comments I'm just pasting his code so people can see it better.
thanks man
Thanks for the post, and it works for me. Remember to put some mp3 files on cell and re-build the apk and run again on cellphone.
thanks bro. It's working
@@omerfarukozturk9720 can you plz guide where you put your mp3 files in smartphone?
thank you so much.
This tutorial was really helpful.
Please sir, can you make a video on how to display song in the notification bar while the media player is playing.
Everything is fine but still the application won't start and keeps crashing
Hi, good tutorial, I have a problem and I cannot fix it when I build the project as an apk file and install it on my phone and run it, it asks me to access the files and I accept and then it closes the application and nothing happens and I don’t know why, is the problem from the code or from the phone
Please put the project files in order to match my work with yours to see where the problem is
Have you got the solution then pls share
Привет если нашел ответ скажи пожалуйста , у меня такая же ошибка.
Hi, if you found the answer, please tell me, I have the same error.
@@АлександрГулидов-г7у Unfortunately no, I have not been able to solve the error
@Ankita Tankariya Unfortunately no, I have not been able to solve the error
@@subhamkumar-mn9hl Unfortunately no, I have not been able to solve the error
i am using the latest koala version and here i cant add the dependency from dexter library...its not matching the version...what shall i do?
I want to eventually do this type of stuff without needing a tutorial. Hope i can do that soon
I have error message when I'm trying to start app. -> MusicPlayer keeps stopping. Could you please to help me?
Music player giving me a runtime error
It says attempt to get the length of null array
mera bi bhai agar apko solution mile to btana
@@shadows.unveiled_ Bhai 9 maheeny ho gay, solution milla k nhi ???
i have learned many things from this tutorial thank you👍👍👍
In which folder you paste the songs files
brother actually the app is not able to fetch the songs in my internal storage.....so it opens, asks for permission and then crashed
same with me
Same with me also.
same here
.......does it have any solutions??
Same i am also facing this problem pls evan bro give us solution 🥺😬
Does anyone have any solution for it?
Which version you are using because in jellyfish READ_EXTERNAL_STORAGE is not supported
At 15 :49 when i installed the app on my smartphone.. And i gave the permission it automatically closed and a pop up appears on my notifications bar that the app has crashed
Now please help me in this what would i do now ??
I have found a solution Add in manifest android: request LegacyExternalStorage="true"
@@MusicManiaYT thanks bro, its working
bro I got issues at 15:40
I'm using my device{Redmi9) n successfully installed but when I press allow button the app close immediately
but if press deny I can open the app but song list won't come out
Show me the errors from the errorlog here.
Brother make videos like this one. It really helps me
can you pley the music in 432hz?
idk but why my app keeps crashing, and in the error it is showing that attempt to get null lenght of array. everything is working properly but it is not displaying the song i guess. brother can you please help? i am doing it for my college project.
Hello , had you got the solution of apps crashing ??
@@rahulKaushal39 no !! please can you guide?
@@siddharthadubey1103 I tried 3-4 music player coding, all fails : so you must try to make BMI CALCULATOR.. for your project..
Or you follow ForMyScholar TH-cam , she made simple Music Player.. I think that's work for you
@@rahulKaushal39 thank you brother, but i have started doing it by my own learning...
Same what's up with the app crashing when its launched every thing is same as in the video
Hello sir I install app and give it the permission after app automatic close And nothing to show any error please give a solution.
Same problem bro! @Coding With Evan please help us!!!
When I open the app its automatically closed
Error : java.lang.NullPointerException: Attempt to get length of null array
Show me your onCreate methods code here.
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
listView = findViewById(R.id.listViewSong);
runTimePermission();
}
same problem with mine.
I have found a solution
Add in manifest
android: request LegacyExternalStorage="true"
@@krutikmalani3859 Thanks :D
Is there any alternative of dexter
Sir @10:49 getExternalStorageDirectory, how it didnt get deprecated for you sir?? I cant use the method , since its deprecated .
pls give me the solution ..how you you clear you error.
. getExternalStorageDirectory is deprecated. My list view not showing files please help me to solve it
In any case, your application is not opening use This:-
if (singleFile.isDirectory() && !singleFile.isHidden()) {
if (!singleFile.getName().equals("Android")) {
arrayList.addAll(findSongs(singleFile));
}
}
because in my opinion, "Android" file is very huge to scan
Thanks bro your solution is working 🤠
Hi, how can I show the duration of each song in the listView?
How to upload music and call it in main activity java file
The time on the end of the seek bar is not updating as we change the song using the next button or previous button so how to change the song time as we click the button to change the song
I am try to creating app but after installing crash app
how can we add an audio source in the media app coming from a music app like deezer, Spotify. etc...
My app doesnt show songs after i grant the permission,how can i solve this?
Bro the app getting closed right away after allowing permissions.....
What to do now ?
Can you please help me ?
I also facing the same issue ,Anybody can help me to resolve this issus
@@vk-5431 review comments you should use try catch
@@vk-5431 i also
Look at MarkoFire's comment.
getting error using tostring().,
and app is not opening it is showing ....keeps stoping
hello, I am a absolute beginner to developing apps, and for some reason, in 15:06 I typed exactly what you did, _listView = findViewById(R.id.ListViewSong)_, but android studio in my case says "Cannot resolve symbol 'ListViewSong'", why?
In your mainactivity.xml file check what is the id of listview. Then put it instead of "ListViewSong"
@@CodingWithEvan thanks!
@@CodingWithEvan i don't really understand what you said, i just started 😅
ok, now i opened it after i closed it and i shut down my laptop, now everything is showing errors, WHAT THE HELL IS GOING ON?
th-cam.com/users/CodeclubMaster
My app why crashed 🙏
Is this for complete beginners?
I got error when i tried to open it with Redmi Note 8 Pro & Galaxy Tab A [Android-Version 10](Error: App keeps stopping). but it worked with Samsung Galaxy A3 android-Version 6.0.1 .
Please i need Help
You can change the target sdk to android 10
For those all whose AVD is crashing change your findsong method with this
public ArrayList findSong(File file) {
ArrayList arrayList = new ArrayList();
File [] files = file.listFiles();
if(files != null) {
for (File singlefile : files) {
if (singlefile.isDirectory() && !singlefile.isHidden()) {
arrayList.addAll(findSong(singlefile));
} else {
if (singlefile.getName().endsWith(".wav")) {
arrayList.add(singlefile);
} else if (singlefile.getName().endsWith(".mp3")) {
arrayList.add(singlefile);
}
}
}
}
return arrayList;
}
@@wasifizar Hello bro YOU are the Legend But getExternalStorageDirectory is Decrepted plz how to replace it
@@wasifizar Solucionado gracias
@@wasifizar Thankyou! This actually worked!
Still crashing at 15:30 on Android 12
Any solutions?
I am not able to see songs list in 15:44 please help me
can you plz tell me for music player listView is better or Recycler View
For a large number of items recyclerview is better.
@@CodingWithEvan in this case ??
Does it play local music files do we can add as we download new songs?
Yes.
sir when i allow the permission my app will be crash at that time please help me to solve this error
I am getting following error and the app doesn't show anything
access denied finding property ro.vendor.df.effect.conflict
Please help me 🙏🙏
in my case ....when I opening this app in emulator it works perfect ...but when I am debugging it shows error
TELL ME SOLUTION BRO PLZ
The app is not running. It is crashing soon after I open it. Plz help me.
sir i have created the app as per your instruction. but when i install the app on my phone and give permission of storage it autmotically closes and when i denied the permission it runs, but does not show any thing it was total black screen.what should i do now?
Same problem brother 🥺
@@MohammadImran-fk9vw solution mila to bata dena bhai
Solution mila to btana bhai
@@rohanshinde196 put try/catches for NullPointer and Negative Array size
@@booba6672 can you explain more
Before starting u need to show requirements and prequiste
Pls take this as advice🥰
Hey bro in Android 11 its not working songs list are not fetch and app crash and close
any solution?
@@SidsAnalysis same stuff is happening with me
i want help with creating new project, i am new with app and i don't know which android version select, which activity and more
hello sir,
my project work with attach your code but code not work out in my project . you are help for my problem solution & provide information way.
For those all whose App is crashing after granting permissions, replace your findsong() method with the following:
public ArrayList findSong(File file) {
ArrayList arrayList = new ArrayList();
File [] files = file.listFiles();
if(files != null) {
for (File singlefile : files) {
if (singlefile.isDirectory() && !singlefile.isHidden()) {
arrayList.addAll(findSong(singlefile));
} else {
if (singlefile.getName().endsWith(".wav")) {
arrayList.add(singlefile);
} else if (singlefile.getName().endsWith(".mp3")) {
arrayList.add(singlefile);
}
}
}
}
return arrayList;
}
does this work? becuase im using this vid for my project
Gracias Hernano gracias a esta lógica ya pudo correr bien todo listo para la parte 2
How did you get the music onto the app. It wont let me attach .mp3 in a raw folder. Please Help
i have a problem.
after granting pemission the app crashes
are the dexter libraries open source / free to use?
list view is not showing a single song even though all my songs are in internal storage , logcat showing no error . what i suppose to do now ? anyone ??
Did you granted the storage permission? If yes, then show me your displaysong() and findsong() method here.
Bro same pblm how to resolve
Because of . getExternalStorageDirectory is deprecated list view not showing files
@@tusharchoudhary9861 what changes to do me plz tell bro
@@KingSteeGaming bro replace the directory
My findsong function is returning empty array list... What is problem please tell
Which software is used for these coding,can you help me
What we to do when we have to give the permission above android 10 bcoz above android 10 the app crashesh after giving permission
E/libc: Access denied finding property "ro.vendor.pref_scale_resolution" it will give an error. anyone have solution then please help me.
how can I put songs on my external storage in an emulator?
my app works in AVD but when i export and install it in my phone it crash. what to do?
Use try catch block to stop it from crashing, though you will still get error
Which version to use sdk
Plz answer quickly
what are the features of this app
What software is used make this app
Android Studio
Sir, please help me. If I change the package name of the app, the app will run but it will not work properly. How can I solve this?
may i ask why does the word stop moving when you scroll down and went back up again? and how do you fix that?
same error
I made a app. Where first song repeat every time when any list view is clicked .... Please help
my songs are not displaying in the list although there are many in the internal storage. pls help
Same
do u have the sources on githup ?
Good evening, you have the application of this video but Unfortunately not show me the result is a final also appeared you have, what is the solution and thank you
excellent presanatation. please make a video to upload audio to the server and play it in audioplayer
hey can build the mp3 app with saved mp3 files inside it. thank you.
My app crashes after getting the permissions what should I do?
Same brother
In Android 11 its not working songs list are not fetch and app crash and close
Hey man, can you upload the image background and the icon of the UI
Do this app have data base?
Android Q version didn't open...pls give solution.
Hello im just wondering if anyone can help me please? i am trying to do a music app, i have found that the getStorageDirectory is depreciated, am i correct in thinking i need to use the getExternalStorageState? When i try get all the audio files and scan the directory my app shuts down. can anyone please help in regards to how can i finish implementing this please so my audio files on my cellphone can be accessed and used in my mp3 player im making
Is this music player a proper one? Will it survive if user "minimizes" it clicking "Home" button?
Meri app ban to gai magar is me songs nahii dikha rahe ?? What should I do ?? Please help me 🙏🏻
Song show nahi karr rahe
Check if you have songs on internal storage. Not on sd card.
@@CodingWithEvan songs k folder ka name kyaa rakh na henn ?
Btw songs internal storage me hii hen so please help me out 🙏🏻
@@CodingWithEvan and music player app don't have permission for storage !
So you have a solution for that ??
Grant storage permission from settings.
Bro i created the app, the app works fine in android studio emulator but In my phone I am not even able to install it ,is it due to Sdk version?
It Will work on android devices with android version 10 or lower.
@@CodingWithEvan ok I'll try to run it on my another device.
@@CodingWithEvan how can we make it compatible for android 11?
Is there any free non copyrighted music api that I can use for commercial purpose
where is your data song ? how I can input the song into this app ?
Hey can you help me ...that I can't display the music list by this code
Which software is using you sir!!plzz tell mee!!
Caused by: com.android.builder.errors.EvalIssueException: Configuration `debugRuntimeClasspath` contains AndroidX dependencies, but the `android.useAndroidX` property is not enabled, which may cause runtime issues.
when i run the code after coding till 5:35 I'm getting this error
Might be a dumb question, but does this app not read and scan the internal storage of the phone? or does it only scan and search for songs in the external storage sd card?
Bro i am follow your Toturial iread pdf file from storage but I want to use open pdf fil in pdfviewer how do this
Sir I wrote the code as excat what u wrote but I didn't get any music in app after doing code upto 16:00 plz..help
Make sure you have mp3 files in your internal storage.
@@CodingWithEvan now it's working sir 🙏 sir how can I contact u 🙏
Plz..tell I have some doubts
th-cam.com/users/CodeclubMaster
@@devildevil873 Did you change any part of your code?
Morning sir, I face a problem here it say "cannot resolve symbol 'File':49"
After . Check ();
The following code of public ArrayList. Help
sir i have a error while running this app in real device it don't show any permission and cannot show any song of memory
plzz help me with this
Sir, I really need part-2 of it.
Part 2 is already in my channel.
Thank you I'll definitely check that out.
@@CodingWithEvan please provide link here
Sir plz..help me 🙏 sir I did the code up to 16:04 then I run it , it was working properly and showing the play list too but with play list of songs it was showing other files too plz..help 🙏🙏
Check the findsongs() method. Maybe you made a mistake there.
@@CodingWithEvan I checked code many times but no error I don't know where is the problem 🙏
Sir help me I will send u my code just check how can I send u 🙏🙏
@@CodingWithEvan sir plz...help me 😭🙏
th-cam.com/users/CodeclubMaster
can you help me fix something. it's wrong.
items[i] = mySongs.get(i).getName().toString().replace(target:".mp3" , replacement:"").replace(target:".wav",replacement:""); line 85 is not solve this error show erroe vairiable not declare
Sir i have almost making this app seeing ur tutorial , now , i want to add , shuffle and repeat button work , can i get code for that pleasee