cordova-plugin-code-push icon indicating copy to clipboard operation
cordova-plugin-code-push copied to clipboard

Could this be a gradle problem?

Open alpaygunes opened this issue 7 years ago • 10 comments

Sory for my English.

Description

Steps

1 - # ionic start test1 blank 2 - # ionic cordova platform add android 3 - # ionic cordova run android ( I'm having trouble not with you here ) ...

  • Where: Build file '/home/alpay/Code/deneme0/test1/platforms/android/CordovaLib/build.gradle' line: 41 ... for fix : I change this classpath 'com.android.tools.build:gradle:3.3.0' TO classpath 'com.android.tools.build:gradle:3.0.1' IN test1/platforms/android/build.gradle AND proble fixed

4 - # cordova plugin add cordova-plugin-code-push@latest

5 - # ionic cordova run android Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/4.10.3/userguide/command_line_interface.html#sec:command_line_warnings

BUİLD SUCCESSFUL in 5s 47 actionable tasks: 16 executed, 31 up-to-date Built the following apk(s): /home/alpay/Code/deneme0/test1/platforms/android/app/build/outputs/apk/debug/app-debug.apk Checking Java JDK and Android SDK versions ANDROID_SDK_ROOT=undefined (recommended setting) ANDROID_HOME=/home/alpay/Programlar/sdk-tools-linux-3859397/ (DEPRECATED) No target specified and no devices found, deploying to emulator No emulator specified, defaulting to Nexus_5X_API_27_x86 Waiting for emulator to start... PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT Failed to execute shell command "getprop,dev.bootcomplete"" on device: Error: adb: Command failed with exit code 1 Error output: error: insufficient permissions for device: user in plugdev group; are your udev rules wrong? See [http://developer.android.com/tools/device.html] for more information [ERROR] An error occurred while running subprocess cordova.

    cordova run android exited with exit code 1.
    
    Re-running this command with the --verbose flag may provide more information.

6 - # cordova plugin remove cordova-plugin-code-push 7 - # ionic cordova run android AND no problem if I install plugin it again. I am getting an error

Reproduction

[FILL THIS OUT: If possible try to reproduce your bug on our basic sample: https://github.com/Microsoft/cordova-plugin-code-push/tree/master/samples/basic. If you can't reproduce the bug on it, provide us as much info as possible about your project.]

Additional Information

  • "cordova-plugin-code-push": "^1.11.18",

  • List of installed plugins: code-push 2.0.6 "CodePushAcquisition" cordova-plugin-code-push 1.11.18 "CodePush" cordova-plugin-compat 1.2.0 "Compat" cordova-plugin-device 2.0.2 "Device" cordova-plugin-dialogs 2.0.1 "Notification" cordova-plugin-file 4.3.3 "File" cordova-plugin-file-transfer 1.6.3 "File Transfer" cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard" cordova-plugin-ionic-webview 4.0.1 "cordova-plugin-ionic-webview" cordova-plugin-splashscreen 5.0.2 "Splashscreen" cordova-plugin-statusbar 2.4.2 "StatusBar" cordova-plugin-whitelist 1.3.3 "Whitelist" cordova-plugin-zip 3.1.0 "cordova-plugin-zip"

  • Cordova version: 9.0.0 ([email protected])

  • iOS/Android/Windows version: android sdk 28
    OS : pardus ( debian 9 ) Gradle 5.2.1 ionic 4.12.0

  • Does this reproduce on a simulator, or only on a physical device? On build time

Requirements check results for android: Java JDK: installed 1.8.0 Android SDK: installed true Android target: installed android-28 Gradle: installed /opt/gradle/gradle-5.2.1/bin/gradle

alpaygunes avatar May 27 '19 13:05 alpaygunes

This is not related to cordova-plugin-code-push, that error:

No target specified and no devices found, deploying to emulator
No emulator specified, defaulting to Nexus_5X_API_27_x86
Waiting for emulator to start...
PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT
Failed to execute shell command "getprop,dev.bootcomplete"" on device: Error: adb: Command failed with exit code 1 Error output:

Says that u have no default emulator as target.. Ando no, there isn't problem with ur gradle, or code-push.

dann95 avatar May 27 '19 13:05 dann95

This is not related to cordova-plugin-code-push, that error:

No target specified and no devices found, deploying to emulator
No emulator specified, defaulting to Nexus_5X_API_27_x86
Waiting for emulator to start...
PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT
Failed to execute shell command "getprop,dev.bootcomplete"" on device: Error: adb: Command failed with exit code 1 Error output:

Says that u have no default emulator as target.. Ando no, there isn't problem with ur gradle, or code-push.

But my device is always plugged in. And I'm always trying.

:(

alpaygunes avatar May 27 '19 13:05 alpaygunes

as You read "build success", just copy the apk from: BUİLD SUCCESSFUL in 5s 47 actionable tasks: 16 executed, 31 up-to-date Built the following apk(s): /home/alpay/Code/deneme0/test1/platforms/android/app/build/outputs/apk/debug/app-debug.apk

and copy it to device and run, cordova run is for emulator on PC, to use emulator u must change some settings on AVD.

To run in real device, do "cordova build", with: "ionic cordova build android" , copy on same path above, and run the file in the device, to install debug app u must change ur device settings to "developer options".

dann95 avatar May 27 '19 14:05 dann95

as You read "build success", just copy the apk from: BUİLD SUCCESSFUL in 5s 47 actionable tasks: 16 executed, 31 up-to-date Built the following apk(s): /home/alpay/Code/deneme0/test1/platforms/android/app/build/outputs/apk/debug/app-debug.apk

and copy it to device and run, cordova run is for emulator on PC, to use emulator u must change some settings on AVD.

To run in real device, do "cordova build", with: "ionic cordova build android" , copy on same path above, and run the file in the device, to install debug app u must change ur device settings to "developer options".

Thank you for your interest. I will try at the first opportunity

alpaygunes avatar May 27 '19 14:05 alpaygunes

https://stackoverflow.com/questions/41274830/panic-cannot-find-avd-system-path-please-define-android-sdk-root

dann95 avatar May 27 '19 14:05 dann95

Hi @alpaygunes , Thanks for reporting!

@dann95 , Thanks for help!

@alpaygunes, could you please clarify your issue is fixed or still here?

alexandergoncharov-zz avatar May 29 '19 12:05 alexandergoncharov-zz

could you please clarify your issue is fixed or still here?

I couldn't solve the problem. I migrate my code to ionic4. Because I hope I don't have any problems with ionic4.

Thank you for your interest.

alpaygunes avatar May 29 '19 22:05 alpaygunes

@alpaygunes, oh, I see. Got it. Is there anything else that I can help you with?

alexandergoncharov-zz avatar May 30 '19 14:05 alexandergoncharov-zz

@alpaygunes, oh, I see. Got it. Is there anything else that I can help you with?

It makes me happy to know you're here. Thanks

alpaygunes avatar May 30 '19 18:05 alpaygunes

Great! So, I'm going to close this issue for now. Please feel free o reopen it if you have any questions.

alexandergoncharov-zz avatar May 31 '19 10:05 alexandergoncharov-zz