2
votes

i have some problems with my ionic project.

I wrote something like

ionic build android --release

And got mistake like:

:compileDebugJava D:\myApps\mobileApp\shymbulak\platforms\android\src\org\apache\cordova\camera\CordovaUri.java:78: error: cannot find symbol

    if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
                                                   ^

symbol: variable M location: class VERSION_CODES

Note: D:\myApps\mobileApp\shymbulak\platforms\android\src\jp\phi\cordova\plugin\videoplayer\VideoPlayerPlugin.java uses or overrides a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

1 error

FAILED

FAILURE: Build failed with an exception.

  • What went wrong:

Execution failed for task ':compileDebugJava'.

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.

BUILD FAILED

Total time: 3.078 secs

D:\myApps\mobileApp\shymbulak\platforms\android\cordova\node_modules\q\q.js:126 throw e; ^ Error code 1 for command: cmd with args: /s /c "D:\myApps\mobileApp\shymbulak\platforms\android\gradlew cdvBuildDebug -b D:\myApps\mobileApp\shymbulak\platforms\android\build.gradle - Dorg.gradle.daemon=true"

Error: cmd: Command failed with exit code 1

2

2 Answers

1
votes

I think you may be used the wrong version of the plug-in.

2
votes

I have got the same problem. As a workaround, you can configure a fix dependecy for the camera plugin.

in package.json:

"cordovaPlugins": [
...
    "[email protected]",
...