Skip to content Skip to sidebar Skip to footer

Android Studio Error: Class, Interface, Or Enum Expeted

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=RPi7ueKwEXg See belo

Solution 1:

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.

Solution 2:

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.

enter image description here

Post a Comment for "Android Studio Error: Class, Interface, Or Enum Expeted"