当我尝试从我的android设备运行此React本机应用程序时遇到此错误,我浏览了许多现有问题以找到解决方案,但到目前为止没有任何效果。工作正常,但是当我安装
react-native-svg
并自动链接它,然后开始出现此问题,此后我取消链接并卸载了它,但问题仍然存在。
> Task :app:compileDebugJavaWithJavac FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.5/userguide/command_line_interface.html#sec:command_line_warnings
108 actionable tasks: 2 executed, 106 up-to-date
D:\dipanjan\react-native\practices\athlexa\app\athlexa\android\app\src\main\java\com\athlexa\MainActivity.java:25: error: reached end of file while parsing
}
^
1 error
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 12s
error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
D:\dipanjan\react-native\practices\athlexa\app\athlexa\android\app\src\main\java\com\athlexa\MainActivity.java:25: error: reached end of file while parsing
}
^
1 error
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 12s
at checkExecSyncError (child_process.js:629:11)
at execFileSync (child_process.js:647:13)
at runOnAllDevices (D:\dipanjan\react-native\practices\athlexa\app\athlexa\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:39)
at buildAndRun (D:\dipanjan\react-native\practices\athlexa\app\athlexa\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
at then.result (D:\dipanjan\react-native\practices\athlexa\app\athlexa\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12)
at process._tickCallback (internal/process/next_tick.js:68:7)
PS D:\dipanjan\react-native\practices\athlexa\app\athlexa>