dpa99c / phonegap-launch-navigator

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

Can't install plugin #170

Closed ikishanoza closed 6 years ago

ikishanoza commented 6 years ago
C:\Users\pcq38\Desktop\chat>ionic cordova plugin add uk.co.workingedge.phonegap.plugin.launchnavigator
> cordova plugin add uk.co.workingedge.phonegap.plugin.launchnavigator --save
Installing "uk.co.workingedge.phonegap.plugin.launchnavigator" for android
Installing "cordova-plugin-actionsheet" for android
ANDROID_HOME=C:\Users\pcq38\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_101
Subproject Path: CordovaLib
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
        at build_73omi38adyjj9bi8aszds8883.run(C:\Users\pcq38\Desktop\chat\platforms\android\build.gradle:141)
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.

Incremental java compilation is an incubating feature.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
:clean

FAILED

FAILURE: Build failed with an exception.

BUILD FAILED

Total time: 11.0 secs
* What went wrong:
Execution failed for task ':clean'.
> Unable to delete directory: C:\Users\pcq38\Desktop\chat\platforms\android\build\outputs\apk

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Failed to install 'cordova-plugin-actionsheet': Error: cmd: Command failed with exit code 1
    at ChildProcess.whenDone (C:\Users\pcq38\Desktop\chat\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:891:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

Failed to install 'uk.co.workingedge.phonegap.plugin.launchnavigator': Error: cmd: Command failed with exit code 1
    at ChildProcess.whenDone (C:\Users\pcq38\Desktop\chat\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:891:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
Error: cmd: Command failed with exit code 1

[ERROR] An error occurred while running cordova plugin add uk.co.workingedge.phonegap.plugin.launchnavigator --save
dpa99c commented 6 years ago

That build failure has nothing to do with this plugin: it occurred because cordova was unable to remove the Android build directory:

* What went wrong:
Execution failed for task ':clean'.
> Unable to delete directory: C:\Users\pcq38\Desktop\chat\platforms\android\build\outputs\apk
ikishanoza commented 6 years ago

look this 👍

[16:16:11]  typescript: C:/Users/pcq38/Desktop/chat/src/pages/maps/maps.ts, line: 35
            Property 'APPS' does not exist on type 'typeof LaunchNavigator'.

      L34:    app: LaunchNavigator.APPS.UBER
      L35:  };

any idea ??

ikishanoza commented 6 years ago

this is my ys file :

options: LaunchNavigatorOptions = {
    start: 'London, ON',
    app: LaunchNavigator.APPS.UBER
  };
  constructor(public navCtrl: NavController,private geolocation: Geolocation,private launchNavigator: LaunchNavigator) {

    this.launchNavigator.navigate('Toronto, ON', this.options)
      .then(
        success => console.log('Launched navigator'),
        error => console.log('Error launching navigator', error)
      );
  }
dpa99c commented 6 years ago

That JS variable is defined in the TS definition of this plugin, however if you're using the Ionic Native warpper , you'll need to follow their documentation or report the issue to them (as it's not part of this plugin).