Github user daserge commented on the pull request:

    https://github.com/apache/cordova-android/pull/273#issuecomment-196445988
  
    I've tested this way:
    - `created project, added master android platform`
    - `λ cordova run android --release` ->
    ```
    Built the following apk(s):
            
f:/coho/CB-10600/test/platforms/android/build/outputs/apk/android-release-unsigned.apk
    Using apk: 
f:/coho/CB-10600/test/platforms/android/build/outputs/apk/android-release-unsigned.apk
    Error: Failed to install apk to emulator: WARNING: linker: libdvm.so has 
text relocations. This is wasting memory and is a security risk. Please fix.
    
            pkg: /data/local/tmp/android-release-unsigned.apk
    
    Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]
    ```
    - `λ cordova run android --release -- 
--keystore=../my-release-key.keystore --storePassword=password 
--alias=alias_name --password=password` ->
    ```
    BUILD SUCCESSFUL
    
    Total time: 6.286 secs
    Built the following apk(s):
            
f:/coho/CB-10600/test/platforms/android/build/outputs/apk/android-release-unsigned.apk
            
f:/coho/CB-10600/test/platforms/android/build/outputs/apk/android-release.apk
    Using apk: 
f:/coho/CB-10600/test/platforms/android/build/outputs/apk/android-release-unsigned.apk
    Error: Failed to install apk to emulator: WARNING: linker: libdvm.so has 
text relocations. This is wasting memory and is a security risk. Please fix.
    
            pkg: /data/local/tmp/android-release-unsigned.apk
    
    Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]
    ```
    So the first issue is that even though it has built a signed apk it uses an 
unsigned one because of last modification time sorting probably.
    
    If we do `cordova clean android` and run `-- --keystore` again it will 
succeed (`--buildConfig` option works the same way).
    
    Using your PR version makes `unsigned` apk to not be listed so that 
successive builds after `cordova run android --release` work although I would 
better change the sorting logic to prefer a signed build and output a message 
about signing requirement in case of `run` command if the filter has returned 
`unsigned` apk.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to