Skip to content
This repository has been archived by the owner on Jul 27, 2019. It is now read-only.

Compilation error on v3.3.0 with cordova-android 6.4.0 #17

Open
esmiralha opened this issue Jun 19, 2019 · 6 comments
Open

Compilation error on v3.3.0 with cordova-android 6.4.0 #17

esmiralha opened this issue Jun 19, 2019 · 6 comments

Comments

@esmiralha
Copy link

esmiralha commented Jun 19, 2019

Describe the bug

We are getting compilation errors when building for Android.

To Reproduce

Steps to reproduce the behavior:

  1. cordova build android
  2. We get a compilation error.

Expected behavior

Build should be successful.

Console Logs

/Users/jonatansouza/projects/tecnico-virtual/front-end/platforms/android/src/org/apache/cordova/firebase/FirebasePlugin.java:578: error: local variable message is accessed from within inner class; needs to be declared final
                        Exception e = new JavaScriptException(message, stackTrace);
                                                              ^
/Users/jonatansouza/projects/tecnico-virtual/front-end/platforms/android/src/org/apache/cordova/firebase/FirebasePlugin.java:581: error: local variable message is accessed from within inner class; needs to be declared final
                        Crashlytics.logException(new JavaScriptException(message));
                                                                         ^
/Users/jonatansouza/projects/tecnico-virtual/front-end/platforms/android/src/org/apache/cordova/firebase/FirebasePlugin.java:585: error: local variable message is accessed from within inner class; needs to be declared final
                    Crashlytics.log("logError errored. Orig error: " + message);
                                                                       ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/jonatansouza/projects/tecnico-virtual/front-end/platforms/android/src/com/crypho/plugins/SharedPreferencesHandler.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 errors
:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':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.

* Get more help at https://help.gradle.org

BUILD FAILED in 30s
40 actionable tasks: 40 executed
Command finished with error code 1: /Users/jonatansouza/projects/tecnico-virtual/front-end/platforms/android/gradlew cdvBuildDebug,-b,/Users/jonatansouza/projects/tecnico-virtual/front-end/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Dorg.gradle.jvmargs=-Xmx2048m,-Pandroid.useDeprecatedNdk=true
(node:12379) UnhandledPromiseRejectionWarning: Error: /Users/jonatansouza/projects/tecnico-virtual/front-end/platforms/android/gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/Users/jonatansouza/projects/tecnico-virtual/front-end/platforms/android/src/org/apache/cordova/firebase/FirebasePlugin.java:578: error: local variable message is accessed from within inner class; needs to be declared final
                        Exception e = new JavaScriptException(message, stackTrace);
                                                              ^
/Users/jonatansouza/projects/tecnico-virtual/front-end/platforms/android/src/org/apache/cordova/firebase/FirebasePlugin.java:581: error: local variable message is accessed from within inner class; needs to be declared final
                        Crashlytics.logException(new JavaScriptException(message));
                                                                         ^
/Users/jonatansouza/projects/tecnico-virtual/front-end/platforms/android/src/org/apache/cordova/firebase/FirebasePlugin.java:585: error: local variable message is accessed from within inner class; needs to be declared final
                    Crashlytics.log("logError errored. Orig error: " + message);
                                                                       ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/jonatansouza/projects/tecnico-virtual/front-end/platforms/android/src/com/crypho/plugins/SharedPreferencesHandler.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':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.

* Get more help at https://help.gradle.org

BUILD FAILED in 30s
    at ChildProcess.whenDone (/Users/jonatansouza/projects/tecnico-virtual/front-end/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Socket.stream.socket.on (internal/child_process.js:346:11)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at Pipe._handle.close [as _onclose] (net.js:557:12)

Plugin Version

3.3.0

Desktop (please complete the following information):

  • OS: MacOS Mojave
@Steco17
Copy link

Steco17 commented Jun 21, 2019

Hi guys. am having the same issue here with android 6.4 when building with cordova

@sagrawal31
Copy link
Member

I'll take a look for cordova-android 6. Seems to be working fine for cordova-android 7 & cordova-android 8.

@jonatangall
Copy link

I'll take a look for cordova-android 6. Seems to be working fine for cordova-android 7 & cordova-android 8.

Thanks in advance.

@sagrawal31
Copy link
Member

sagrawal31 commented Jun 25, 2019

Can you please Confirm your Cordova environment versions?

@jonatangall
Copy link

Collecting Data...
Node version: v8.11.3
Cordova version: 8.0.0
Config.xml file:

...
<plugin name="cordova-plugin-firebase-lib" spec="3.3.0" />
<engine name="android" spec="6.4.0" />
<engine name="ios" spec="4.5.5" />
...

Android platform:
Available Android targets:==============] 100% Fetch remote repository...

id: 1 or "android-26"
Name: Android API 26
Type: Platform
API level: 26
Revision: 2

Thanks in advance.

@sagrawal31
Copy link
Member

We are looking into the problem!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants