dpa99c / phonegap-launch-navigator

Phonegap/Cordova plugin which launches native route navigation apps for Android, iOS and Windows
369 stars 129 forks source link

Install Error: Could not get unknown property 'OKHTTP_VERSION' #195

Closed adan92 closed 6 years ago

adan92 commented 6 years ago

I'm submitting a ... (check one with "x"):

Bug report

Cannot build Ionic App it throw error with _OKHTTPVERSION

Current behavior:

When using this command :

ionic cordova run android

I'm getting this error response:


* What went wrong:
A problem occurred evaluating root project 'android'.
> Could not get unknown property 'OKHTTP_VERSION' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

* 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 1s

[ERROR] An error occurred while running cordova run android (exit code 1).

But When I run the same project without plugin works fine.

I've try:

But nothing I do works

Expected behavior:

Should install application in device.

Steps to reproduce:

Run this command in a cordova project : ionic cordova run android

Environment information

global packages:

cordova (Cordova CLI) : 7.0.0

local packages:

@ionic/app-scripts : 3.1.10
Cordova Platforms  : android 6.4.0
Ionic Framework    : ionic-angular 3.9.2

System:

Node : v6.14.3
npm  : 3.10.10
OS   : macOS High Sierra

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : pro
- Installed Ionic Native modules and versions

├── @ionic-native/android-permissions@4.8.0 ├── @ionic-native/background-mode@4.8.0 ├── @ionic-native/camera@4.8.0 ├── @ionic-native/core@4.8.0 ├── @ionic-native/device@4.8.0 ├── @ionic-native/fcm@4.8.0 ├── @ionic-native/geolocation@4.8.0 ├── @ionic-native/launch-navigator@4.8.0 ├── @ionic-native/qr-scanner@4.8.0 ├── @ionic-native/splash-screen@4.8.0 ├── @ionic-native/status-bar@4.8.0

Snowbunny commented 6 years ago

I have the same issue with phonegap build. Is there a fix or workaround ?

dpa99c commented 6 years ago

You need to specify a newer version of the Phonegap Build CLI which supports plugin variables:

<preference name="phonegap-version" value="cli-7.1.0" />

If you omit this preference, the current default version is cli-6.5.0 with cordova-android@6.1.2 which is old and doesn't support plugin variables.

adan92 commented 6 years ago

@dpa99c I've add preference in config.xml however I still a problem Could not get unknown property 'OKHTTP_VERSION

Snowbunny commented 6 years ago

It worked for me with Phonegap build and the latest plugin version.

I also had to remove the console plugin from config because it's included by default in 7.1.

adan92 commented 6 years ago

@Snowbunny I've change of cordova-android version of 6.4.0 to 7.0.0 and 7.0.0 to 7.1.0 there is still the problem.

dpa99c commented 6 years ago

@adan92 Have you updated the Cordova CLI (cordova) to latest v8.0.0 ?

adan92 commented 6 years ago

@dpa99c thanks, I was using Cordova CLI 7.0.0. it's work fine :D

matteobortolazzo commented 5 years ago

Hi, I have the same error with cordova-cli 8 and cordova-android 7.0.0, what can I do? I'm using Ionic

cayau commented 5 years ago

Hi, I have the same error