You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/09/24 11:27:05 UTC

[jira] [Commented] (CB-9697) Cordova emulate for Android versions 4.1.1 does not work

    [ https://issues.apache.org/jira/browse/CB-9697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14906098#comment-14906098 ] 

ASF GitHub Bot commented on CB-9697:
------------------------------------

GitHub user mleoking opened a pull request:

    https://github.com/apache/cordova-android/pull/219

    Fixed CB-9697 Cordova emulate for Android versions 4.1.1 does not work

    After running 'cordova emulate android' the apk is not installed & shown on the emulator despite the log shows the app is successfully launched.
    
    This issue is related to https://issues.apache.org/jira/browse/CB-9080 and https://issues.apache.org/jira/browse/CB-8912. These two previous issues fix the problem in 'device.js' and error in 'emulator.js' is still not corrected.
    
    The `emulator.js` file try to run this command:
    
    exec, 'adb -s ' + target.target + ' install -r -d "' + apk_path + '"', os.tmpdir(), execOptions
    
    The '-d' option is not supported by Android 4.1.1
    
    Remove the '-d' option will fix this issue.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/mleoking/cordova-android mleoking-patch-1-4.1.x

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-android/pull/219.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #219
    
----
commit 682c709e96670718c30f27bda0991c6e70826d60
Author: Changwang Zhang <ml...@gmail.com>
Date:   2015-09-24T09:15:36Z

    Fixed CB-9697 Cordova emulate for Android versions 4.1.1 does not work
    
    After running 'cordova emulate android' the apk is not installed & shown on the emulator despite the log shows the app is successfully launched.
    
    This issue is related to https://issues.apache.org/jira/browse/CB-9080 and https://issues.apache.org/jira/browse/CB-8912. These two previous issues fix the problem in 'device.js' and error in 'emulator.js' is still not corrected.
    
    The `emulator.js` file try to run this command:
    
    exec, 'adb -s ' + target.target + ' install -r -d "' + apk_path + '"', os.tmpdir(), execOptions
    
    The '-d' option is not supported by Android 4.1.1
    
    Remove the '-d' option will fix this issue.

----


> Cordova emulate for Android versions 4.1.1 does not work
> --------------------------------------------------------
>
>                 Key: CB-9697
>                 URL: https://issues.apache.org/jira/browse/CB-9697
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android, CLI
>    Affects Versions: 5.3.2
>         Environment: Cordova CLI  5.3.1
> Cordova-Android 4.1.1
> Windows 7
> JDK 7
>            Reporter: Changwang Zhang
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> After running 'cordova emulate android' the apk is not installed & shown on the emulator despite the log shows the app is successfully launched.
> This issue is related to https://issues.apache.org/jira/browse/CB-9080 and https://issues.apache.org/jira/browse/CB-8912. These two previous issues fix the problem in 'device.js' and error in 'emulator.js' is still not corrected.
> The `emulator.js` file try to run this command:
>     exec, 'adb -s ' + target.target + ' install -r -d "' + apk_path + '"', os.tmpdir(), execOptions
> The '-d' option is not supported by Android 4.1.1
> Remove the '-d' option will fix this issue.
> Here is the output of the command ‘cordova emulate android’
> Running command: C:\Software\nodejs\node.exe D:\Leo\Program\ionic\ionic-test\hooks\after_prepare\010_add_platform_class.js D:/Leo/Program/ionic/ionic-test
> add to body class: platform-android
> Running command: cmd "/s /c "D:\Leo\Program\ionic\ionic-test\platforms\android\cordova\run.bat --emulator""
> ANDROID_HOME=C:\Users\Leo\AppData\Local\Android\sdk
> JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0_55
> WARNING : no emulator specified, defaulting to GN_API_16
> Waiting for emulator...
> emulator: device fd:536
> HAXM is working and emulator runs in fast virt mode
> emulator: emulator window was out of view and was recentered
> Booting up emulator (this may take a while)...BOOT COMPLETE
> Running: D:\Leo\Program\ionic\ionic-test\platforms\android\gradlew cdvBuildDebug -b D:\Leo\Program\ionic\ionic-test\platforms\android\build.gradle -PcdvBuildArch=x86 -Dorg.gradle.daemon=true
> :preBuild
> :compileDebugNdk UP-TO-DATE
> :preDebugBuild
> :checkDebugManifest
> :CordovaLib:compileLint
> :CordovaLib:copyDebugLint UP-TO-DATE
> :CordovaLib:mergeDebugProguardFiles UP-TO-DATE
> :CordovaLib:preBuild
> :CordovaLib:preDebugBuild
> :CordovaLib:checkDebugManifest
> :CordovaLib:prepareDebugDependencies
> :CordovaLib:compileDebugAidl UP-TO-DATE
> :CordovaLib:compileDebugRenderscript UP-TO-DATE
> :CordovaLib:generateDebugBuildConfig UP-TO-DATE
> :CordovaLib:generateDebugAssets UP-TO-DATE
> :CordovaLib:mergeDebugAssets UP-TO-DATE
> :CordovaLib:generateDebugResValues UP-TO-DATE
> :CordovaLib:generateDebugResources UP-TO-DATE
> :CordovaLib:packageDebugResources UP-TO-DATE
> :CordovaLib:processDebugManifest UP-TO-DATE
> :CordovaLib:processDebugResources UP-TO-DATE
> :CordovaLib:generateDebugSources UP-TO-DATE
> :CordovaLib:compileDebugJava UP-TO-DATE
> :CordovaLib:processDebugJavaRes UP-TO-DATE
> :CordovaLib:packageDebugJar UP-TO-DATE
> :CordovaLib:compileDebugNdk UP-TO-DATE
> :CordovaLib:packageDebugJniLibs UP-TO-DATE
> :CordovaLib:packageDebugLocalJar UP-TO-DATE
> :CordovaLib:packageDebugRenderscript UP-TO-DATE
> :CordovaLib:bundleDebug UP-TO-DATE
> :prepareAndroidCordovaLibUnspecifiedDebugLibrary UP-TO-DATE
> :prepareDebugDependencies
> :compileDebugAidl UP-TO-DATE
> :compileDebugRenderscript UP-TO-DATE
> :generateDebugBuildConfig UP-TO-DATE
> :generateDebugAssets UP-TO-DATE
> :mergeDebugAssets UP-TO-DATE
> :generateDebugResValues UP-TO-DATE
> :generateDebugResources UP-TO-DATE
> :mergeDebugResources UP-TO-DATE
> :processDebugManifest UP-TO-DATE
> :processDebugResources UP-TO-DATE
> :generateDebugSources UP-TO-DATE
> :compileDebugJava UP-TO-DATE
> :preDexDebug UP-TO-DATE
> :dexDebug UP-TO-DATE
> :processDebugJavaRes UP-TO-DATE
> :validateDebugSigning
> :packageDebug UP-TO-DATE
> :zipalignDebug UP-TO-DATE
> :assembleDebug UP-TO-DATE
> :cdvBuildDebug UP-TO-DATE
> BUILD SUCCESSFUL
> Total time: 3.341 secs
> Built the following apk(s):
>     D:\Leo\Program\ionic\ionic-test\platforms\android\build\outputs\apk\android-debug.apk
> Installing app on emulator...
> Using apk: D:\Leo\Program\ionic\ionic-test\platforms\android\build\outputs\apk\android-debug.apk
> Unlocking screen...
> Launching application...
> LAUNCH SUCCESS



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org