Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

Build failure #129

Open
scdyn opened this issue Sep 18, 2018 · 12 comments
Open

Build failure #129

scdyn opened this issue Sep 18, 2018 · 12 comments

Comments

@scdyn
Copy link

scdyn commented Sep 18, 2018

Bug Report

Current behavior
Can't build using
JDK 1.8,
Gradle 2.10
Node version: v6.14.3
Cordova version: 7.1.0

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

Steps to reproduce

Example Project
https://github.com/opentok/opentok-cordova-samples/tree/master/Basic-Video-Chat

What is the current bug behavior?
The build fails.

What is the expected correct behavior?
The build shall succeed.

Relevant logs and/or screenshots

BUILD FAILED in 9s
28 actionable tasks: 4 executed, 24 up-to-date
Error: /src/platforms/android/gradlew: Command failed with exit code 1 Error output:
/src/platforms/android/src/com/tokbox/cordova/OpenTokAndroidPlugin.java:673: error: local variable callbackContext is accessed from within inner class; needs to be declared final
                      myPublisher.getImgData(callbackContext);
                                             ^
/src/platforms/android/src/com/tokbox/cordova/OpenTokAndroidPlugin.java:682: error: local variable runsub is accessed from within inner class; needs to be declared final
                         runsub.getImgData(callbackContext);
                         ^
/src/platforms/android/src/com/tokbox/cordova/OpenTokAndroidPlugin.java:682: error: local variable callbackContext is accessed from within inner class; needs to be declared final
                         runsub.getImgData(callbackContext);
                                           ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use 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 9s
@msach22
Copy link

msach22 commented Sep 18, 2018

@scdyn This looks like an issue with the samples repo because the samples haven't been updated to use the latest plugin.

I just create a sample video chat and added this plugin as a dependency and am able to publish and subscribe successfully. I am not seeing any build failures.

@bpowell15
Copy link

bpowell15 commented Sep 18, 2018 via email

@msach22
Copy link

msach22 commented Sep 19, 2018

Hmm, can you create a basic sample application using cordova create and then add the plugin? I did the following and didn't have to modify anything in the plugin to make it work:

  • cordova create sampleapp
  • cordova plugin add cordova-plugin-opentok
  • cordova platform add android
  • Add the script tag with opentok.js to the index.html file
  • Add the basic code from Basic-Video-Chat Sample
  • cordova prepare android
  • Open the project in the Android Studio and run on a Pixel 2 with API 27

@msach22
Copy link

msach22 commented Sep 19, 2018

@scdyn @bpowell15 Can you share any feedback that you have? Would love to see how I can reproduce it so we can patch it if needed.

@bpowell15
Copy link

bpowell15 commented Sep 19, 2018 via email

@bpowell15
Copy link

bpowell15 commented Sep 19, 2018 via email

@scdyn
Copy link
Author

scdyn commented Sep 20, 2018

@msach22 Can't try this before the end of the week, I'll get back to you by then. I don't build through Android Studio, do you think it can make the difference ?

@bpowell15
Copy link

bpowell15 commented Sep 20, 2018 via email

@phyr0s
Copy link

phyr0s commented Oct 5, 2018

Same error here

@msach22
Copy link

msach22 commented Oct 10, 2018

@bpowell15 and @videmort Could you folks please share your Java version?

@brad
Copy link

brad commented Oct 25, 2018

@msach22

java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)

@brad brad mentioned this issue Oct 25, 2018
@brad
Copy link

brad commented Oct 25, 2018

@scdyn I managed to get the build working again in my PR #130 in case you want to try it

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

5 participants