Skip to content

New project > Task :app:compileDebugJavaWithJavac FAILED #8

@kot7kz

Description

@kot7kz

Hey guys, im new to react native and i'm trying to make an app that is connected to phone via bluetooth so i tried using the react-native-ble-plx.

I created a new project so i could try to run the demo, followed all the tutorials of "react-native getting started", and even the installation guide of ble-plx with all the jetifier commands.

In the end i can't get past this error:

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.4.1/userguide/command_line_interface.html#sec:command_line_warnings
23 actionable tasks: 2 executed, 21 up-to-date
C:\Users\stron\Documents\HexoBlue\android\app\src\main\java\com\hexoblue\MainApplication.java:19: error: cannot find symbol
return BuildConfig.DEBUG;
^
symbol: variable BuildConfig
C:\Users\stron\Documents\HexoBlue\android\app\src\main\java\com\hexoblue\MainApplication.java:55: error: cannot find symbol
if (BuildConfig.DEBUG) {
^
symbol: variable BuildConfig
location: class MainApplication
C:\Users\stron\Documents\HexoBlue\android\app\src\main\java\com\hexoblue\MainApplication.java:55: error: illegal start of type
if (BuildConfig.DEBUG) {
^
3 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 7s

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
C:\Users\stron\Documents\HexoBlue\android\app\src\main\java\com\hexoblue\MainApplication.java:19: error: cannot find symbol
return BuildConfig.DEBUG;
^
symbol: variable BuildConfig
C:\Users\stron\Documents\HexoBlue\android\app\src\main\java\com\hexoblue\MainApplication.java:55: error: cannot find symbol
if (BuildConfig.DEBUG) {
^
symbol: variable BuildConfig
location: class MainApplication
C:\Users\stron\Documents\HexoBlue\android\app\src\main\java\com\hexoblue\MainApplication.java:55: error: illegal start of type
if (BuildConfig.DEBUG) {
^
3 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 7s

at checkExecSyncError (child_process.js:603:11)
at execFileSync (child_process.js:621:15)
at runOnAllDevices (C:\Users\stron\Documents\HexoBlue\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:74:39)
at buildAndRun (C:\Users\stron\Documents\HexoBlue\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
at C:\Users\stron\Documents\HexoBlue\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Command.handleAction (C:\Users\stron\Documents\HexoBlue\node_modules\react-native\node_modules\@react-native-community\cli\build\cliEntry.js:160:7)

please help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions