The code doesn't run in my device, please help...!
G:\React\blawblaW>react-native run-android
info JS server already running.
info Building and installing the app on the device (cd android && gradlew.bat app:installDebug)...
Task :app:compileDebugJavaWithJavac FAILED
G:\React\blawblaW\android\app\src\main\java\com\blawblaw\MainActivity.java:23: error: class, interface, or enum expected
protected ReactActivityDelegate createReactActivityDelegate() {
^
G:\React\blawblaW\android\app\src\main\java\com\blawblaw\MainActivity.java:26: error: class, interface, or enum expected
protected ReactRootView createRootView() {
^
G:\React\blawblaW\android\app\src\main\java\com\blawblaw\MainActivity.java:28: error: class, interface, or enum expected
}
^
G:\React\blawblaW\android\app\src\main\java\com\blawblaw\MainActivity.java:30: error: class, interface, or enum expected
}
^
4 errors
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'.
Compilation failed; see the compiler error output for details.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 1s 24 actionable tasks: 1 executed, 23 up-to-date error Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment: https://facebook.github.io/react-native/docs/getting-started.html error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.
adb devices
and see if it lists your device there? – blazadb unistall [package.name]
Replace package name with your package name for example com.test.app etc. It may have a previously installed version lying around somewhere. – JRK