I\'m trying to do an insert test data in my database, but is not working.
Follow this video as a reference, but it did not work: https://www.youtube.com/watch?v=RPi7
Android Studio throws that error when you have code out of the class declaration.
Your public ArrayAdapter<String> buscaCadastro
is out of the class right now. Remove the extra closing curly brace after testeInserirCadastro
, that should fix it.
I found this with an encoding problem.
copy your source code somewhere and make it is in UTF-8. Then, use the applied code to your project again.
You can also change the encoding format at the bottom of the Android Studio. In this case, you need to change it to UTF-16 and save then again to UTF-8 and save.