Android Studio Error: class, interface, or enum expeted

后端 未结 2 1492
余生分开走
余生分开走 2020-12-07 04:02

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

相关标签:
2条回答
  • 2020-12-07 04:30

    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.

    0 讨论(0)
  • 2020-12-07 04:33

    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.

    0 讨论(0)
提交回复
热议问题