-
-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conflict with cordova-hot-code-push-local-dev-addon #193
Comments
Looking at the plugin.xml and gradle config file for So it's possibly a downstream dependency of the In the next release, I will add a plugin variable to make to the OKHTTP library version requested by this plugin configurable, but you'd still need to know what version to set it to (i.e. what is being requested by the other plugin). |
Fix published in v4.2.1 |
Thanks for your quick response and fix.
I created a project from scratch and added this plugin and the same error occurred. It seems the variable
|
It seems to work fine when I tested it - see console output below. console output
|
So, most probably this is related to cordova version. Because I'm using cordova Build output
. . .
With cordova@6.5.0, in the build.gradle, we have:
In cordova@8.0.0:
|
hello, i use phonegap build and the plugin on IOS build correct, but on ANDROID not found. The error is "Could not get unknown property 'OKHTTP_VERSION' for object of type..." with cli-6.5.0 |
@juanmarinelli use the latest PGB CLI version cli-6.5.0 is old |
thanks @dpa99c , I solved it using version 8.0.0 |
I created a before_build hook for solving this issue for cordova@6.x build-extras.gradle: ext.OKHTTP_VERSION = '3.0.1' copy-gradle-extra.js (before_build hook): /**
* This hook is ONLY required for cordova@<8.x (or even maybe cordova@<7.x)
* We can safely remove it when migrated to latest versions of Cordova.
* More info: https://github.com/dpa99c/phonegap-launch-navigator/issues/193
* @param ctx
* @returns {PromiseLike<void>}
*/
module.exports = function (ctx) {
const fs = ctx.requireCordovaModule('fs');
const path = ctx.requireCordovaModule('path');
const deferral = ctx.requireCordovaModule('q').defer();
const platformRoot = path.join(ctx.opts.projectRoot, 'platforms/android');
const readStream = fs.createReadStream(__dirname + '/build-extras.gradle');
const writeStream = fs.createWriteStream(path.join(platformRoot, 'build-extras.gradle'));
readStream.on('error', deferral.reject);
writeStream.on('error', deferral.reject);
writeStream.on('finish', () => {
console.log('build-extras.gradle copied to android platform')
deferral.resolve();
});
try {
readStream.pipe(writeStream);
}
catch (e) {
readStream.destroy();
writeStream.end();
deferral.reject(e);
}
return deferral.promise;
}; copy-gradle-extra.js and build-extras.gradle are assumed to be in the same directory. In config.xml: <platform name="android">
<hook type="before_build" src="path/to/the/hook/copy-gradle-extra.js"/>
</platform> |
I solved it using phonegap build 7.1.0 (rather than 8) from 6.5 |
hello, i use ionic cordova build The error is "Could not get unknown property 'OKHTTP_VERSION' for object of type..."
|
@cikcoh try updating to |
with cordova 8 |
There's no indication in that cordova@8 error message that this plugin is the cause |
I'm submitting a ... (check one with "x"):
Bug report
Current behavior:
If both plugins are added, build fails. It seems it's a version clash of OkHttp
Expected behavior:
Successful build
Steps to reproduce:
Environment information
Cordova CLI version
cordova -v
: 6.5.0Cordova platform version
cordova platform ls
:android 6.2.3
browser 4.1.0
ios 4.3.1
Plugins & versions installed in project (including this plugin):
cordova plugin ls
cordova-hot-code-push-local-dev-addon 0.4.2 "Hot Code Push Local Development Addon"cordova-hot-code-push-plugin 1.5.3 "Hot Code Push Plugin"
cordova-plugin-actionsheet 2.3.3 "ActionSheet"
cordova-plugin-camera 2.3.1 "Camera"
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-customurlscheme 4.2.0 "Custom URL scheme"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-dialogs 2.0.1 "Notification"
cordova-plugin-file 4.3.3 "File"
cordova-plugin-geolocation 2.4.3 "Geolocation"
cordova-plugin-inappbrowser 1.6.1 "InAppBrowser"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.2.3 "StatusBar"
cordova-plugin-whitelist 1.3.2 "Whitelist"
ionic-plugin-keyboard 2.2.1 "Keyboard"
nl.madebymark.share 0.1.1 "Share"
onesignal-cordova-plugin 2.1.2 "OneSignal Push Notifications"
uk.co.workingedge.phonegap.plugin.launchnavigator 4.2.0 "Launch Navigator"
Ubuntu
console output
FAILURE: Build failed with an exception.Execution failed for task ':transformClassesWithJarMergingForDebug'.
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 6.16 secs
Error: 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.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Recompile with -Xlint:unchecked for details.
FAILURE: Build failed with an exception.
Execution failed for task ':transformClassesWithJarMergingForDebug'.
The text was updated successfully, but these errors were encountered: