Software Archive
Read-only legacy content
17061 Discussions

Android Build Fail

Victor_H_1
Beginner
525 Views

I don´t know why I can´t build any proyect. please help me, is urgent!!!

there is my log:

Installing "org.apache.cordova.device" for android
Installing "org.apache.cordova.splashscreen" for android
Installing "org.apache.cordova.file" for android
Installing "org.apache.cordova.media" for android
Generating config.xml from defaults for platform "android"
Calling plugman.prepare for platform "android"
Preparing android project
Processing configuration changes for plugins.
Iterating over installed plugins: [ 'org.apache.cordova.device',
  'org.apache.cordova.splashscreen',
  'org.apache.cordova.file',
  'org.apache.cordova.media' ]
Writing out cordova_plugins.js...
Wrote out Android application name to "LibroDeSaludLocalDBAudio"
This app does not have launcher icons defined
Wrote out Android package name to "com.mercadeoonlinepanama.librodesalud.utp"
************* Processing the main config.xml file (after_prepare)  *****************
App Directory = [.../LibroDeSaludLocalDBAudio]
Will process and update the following config files:
    Config.xml = [.../LibroDeSaludLocalDBAudio/config.xml]
Namespaces:
    prefix/uri ''/'http://www.w3.org/ns/widgets'
    prefix/uri 'intelxdk'/'http://xdk.intel.com/ns/v1'
Android Manifest Namespaces:
    prefix/uri 'android'/'http://schemas.android.com/apk/res/android'
Name of the app is [LibroDeSaludLocalDBAudio]
Updating full app name to [LibroDeSaludLocalDBAudio]
Processing preference android-minSdkVersion [10]
Processing preference android-targetSdkVersion [19]
Processing preference android-installLocation [auto]
Processing preference permissions
Updating the versionCode
Updating the versionName
Processing debuggable
Added [{http://schemas.android.com/apk/res/android}debuggable] with [false]
Processing config file values
No splash screen supplied for drawable-land-mdpi.  Cleaning up.
Removing unused density: .../LibroDeSaludLocalDBAudio/platforms/android/res/drawable-land-mdpi
No splash screen supplied for drawable-port-xhdpi.  Cleaning up.
Removing unused density: .../LibroDeSaludLocalDBAudio/platforms/android/res/drawable-port-xhdpi
No splash screen supplied for drawable-port-ldpi.  Cleaning up.
Removing unused density: .../LibroDeSaludLocalDBAudio/platforms/android/res/drawable-port-ldpi
No splash screen supplied for drawable-land-ldpi.  Cleaning up.
Removing unused density: .../LibroDeSaludLocalDBAudio/platforms/android/res/drawable-land-ldpi
No splash screen supplied for drawable-port-hdpi.  Cleaning up.
Removing unused density: .../LibroDeSaludLocalDBAudio/platforms/android/res/drawable-port-hdpi
No splash screen supplied for drawable-land-xhdpi.  Cleaning up.
Removing unused density: .../LibroDeSaludLocalDBAudio/platforms/android/res/drawable-land-xhdpi
No splash screen supplied for drawable-land-hdpi.  Cleaning up.
Removing unused density: .../LibroDeSaludLocalDBAudio/platforms/android/res/drawable-land-hdpi
No splash screen supplied for drawable-port-mdpi.  Cleaning up.
Removing unused density: .../LibroDeSaludLocalDBAudio/platforms/android/res/drawable-port-mdpi
Saving config.xml to [.../LibroDeSaludLocalDBAudio/config.xml]
************* Completed processing the main config.xml file (after_prepare)  *****************
Running command: .../LibroDeSaludLocalDBAudio/platforms/android/cordova/build --release
Buildfile: .../LibroDeSaludLocalDBAudio/platforms/android/build.xml

-set-mode-check:

-set-release-mode:

-release-obfuscation-check:
     [echo] proguard.config is ${proguard.config}

-pre-build:

-check-env:
 [checkenv] Android SDK Tools Revision 22.3.0
 [checkenv] Installed at /Developer/android-sdk-linux

-setup:
     [echo] Project Name: CordovaApp
  [gettype] Project Type: Application

-build-setup:
[getbuildtools] Using latest Build Tools: 19.0.0
     [echo] Resolving Build Target for CordovaApp...
[gettarget] Project Target:   Android 4.4
[gettarget] API level:        19
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: .../LibroDeSaludLocalDBAudio/platforms/android/ant-build
    [mkdir] Created dir: .../LibroDeSaludLocalDBAudio/platforms/android/ant-build/res
    [mkdir] Created dir: .../LibroDeSaludLocalDBAudio/platforms/android/ant-build/rsObj
    [mkdir] Created dir: .../LibroDeSaludLocalDBAudio/platforms/android/ant-build/rsLibs
    [mkdir] Created dir: .../LibroDeSaludLocalDBAudio/platforms/android/ant-gen
    [mkdir] Created dir: .../LibroDeSaludLocalDBAudio/platforms/android/ant-build/classes
    [mkdir] Created dir: .../LibroDeSaludLocalDBAudio/platforms/android/ant-build/dexedLibs
     [echo] ----------
     [echo] Resolving Dependencies for CordovaApp...
[dependency] Library dependencies:
[dependency] 
[dependency] ------------------
[dependency] Ordered libraries:
[dependency] 
[dependency] ------------------
     [echo] ----------
     [echo] Building Libraries with 'release'...

nodeps:

-set-mode-check:

-set-release-mode:

-release-obfuscation-check:
     [echo] proguard.config is ${proguard.config}

-pre-build:

-check-env:
 [checkenv] Android SDK Tools Revision 22.3.0
 [checkenv] Installed at /Developer/android-sdk-linux

-setup:
     [echo] Project Name: CordovaApp
  [gettype] Project Type: Android Library

-build-setup:
[getbuildtools] Using latest Build Tools: 19.0.0
     [echo] Resolving Build Target for CordovaApp...
[gettarget] Project Target:   Android 4.4
[gettarget] API level:        19
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: .../LibroDeSaludLocalDBAudio/platforms/android/CordovaLib/res
    [mkdir] Created dir: .../LibroDeSaludLocalDBAudio/platforms/android/CordovaLib/libs
    [mkdir] Created dir: .../LibroDeSaludLocalDBAudio/platforms/android/CordovaLib/ant-build
    [mkdir] Created dir: .../LibroDeSaludLocalDBAudio/platforms/android/CordovaLib/ant-build/res
    [mkdir] Created dir: .../LibroDeSaludLocalDBAudio/platforms/android/CordovaLib/ant-build/rsObj
    [mkdir] Created dir: .../LibroDeSaludLocalDBAudio/platforms/android/CordovaLib/ant-build/rsLibs
    [mkdir] Created dir: .../LibroDeSaludLocalDBAudio/platforms/android/CordovaLib/ant-gen
    [mkdir] Created dir: .../LibroDeSaludLocalDBAudio/platforms/android/CordovaLib/ant-build/classes
    [mkdir] Created dir: .../LibroDeSaludLocalDBAudio/platforms/android/CordovaLib/ant-build/dexedLibs
     [echo] ----------
     [echo] Resolving Dependencies for CordovaApp...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency] 
[dependency] ------------------

-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [aapt] Generating resource IDs...
     [echo] ----------
     [echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.

-pre-compile:

-compile:
    [javac] Compiling 93 source files to .../LibroDeSaludLocalDBAudio/platforms/android/CordovaLib/ant-build/classes
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
     [echo] Creating library output jar file...
      [jar] Building jar: .../LibroDeSaludLocalDBAudio/platforms/android/CordovaLib/ant-build/classes.jar

-post-compile:

-obfuscate:

-dex:
     [echo] Library project: do not convert bytecode...

-crunch:
   [crunch] Crunching PNG Files in source dir: .../LibroDeSaludLocalDBAudio/platforms/android/CordovaLib/res
   [crunch] To destination dir: .../LibroDeSaludLocalDBAudio/platforms/android/CordovaLib/ant-build/res
   [crunch] Crunched 0 PNG files to update cache

-package-resources:
     [echo] Library project: do not package resources...

-package:
     [echo] Library project: do not package apk...

-post-package:

-release-prompt-for-password:

-release-nosign:
     [echo] 
[propertyfile] Creating new property file: .../LibroDeSaludLocalDBAudio/platforms/android/CordovaLib/ant-build/build.prop
[propertyfile] Updating property file: .../LibroDeSaludLocalDBAudio/platforms/android/CordovaLib/ant-build/build.prop
[propertyfile] Updating property file: .../LibroDeSaludLocalDBAudio/platforms/android/CordovaLib/ant-build/build.prop
[propertyfile] Updating property file: .../LibroDeSaludLocalDBAudio/platforms/android/CordovaLib/ant-build/build.prop

-release-sign:

-post-build:

release:

-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [aapt] Generating resource IDs...
     [echo] ----------
     [echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.

-pre-compile:
     [echo] Set jars path to: .../LibroDeSaludLocalDBAudio/platforms/android/CordovaLib/ant-build/classes.jar

-compile:
    [javac] Compiling 20 source files to .../LibroDeSaludLocalDBAudio/platforms/android/ant-build/classes
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: .../LibroDeSaludLocalDBAudio/platforms/android/src/org/apache/cordova/file/ContentFilesystem.java uses unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.

-post-compile:

-obfuscate:

-dex:
      [dex] input: .../LibroDeSaludLocalDBAudio/platforms/android/ant-build/classes
      [dex] input: .../LibroDeSaludLocalDBAudio/platforms/android/CordovaLib/ant-build/classes.jar
      [dex] Pre-Dexing .../LibroDeSaludLocalDBAudio/platforms/android/CordovaLib/ant-build/classes.jar -> classes-aad815b245a10e912a5bfb01fac25e7f.jar
      [dex] Converting compiled files and external libraries into .../LibroDeSaludLocalDBAudio/platforms/android/ant-build/classes.dex...
       [dx] Merged dex A (57 defs/70.6KiB) with dex B (209 defs/317.3KiB). Result is 266 defs/471.4KiB. Took 0.7s

-crunch:
   [crunch] Crunching PNG Files in source dir: .../LibroDeSaludLocalDBAudio/platforms/android/res
   [crunch] To destination dir: .../LibroDeSaludLocalDBAudio/platforms/android/ant-build/res
   [crunch] Processing image to cache: .../LibroDeSaludLocalDBAudio/platforms/android/res/drawable-hdpi/icon.png => .../LibroDeSaludLocalDBAudio/platforms/android/ant-build/res/drawable-hdpi/icon.png
   [crunch]   (processed image to cache entry .../LibroDeSaludLocalDBAudio/platforms/android/ant-build/res/drawable-hdpi/icon.png: 67% size of source)
   [crunch] Processing image to cache: .../LibroDeSaludLocalDBAudio/platforms/android/res/drawable-ldpi/icon.png => .../LibroDeSaludLocalDBAudio/platforms/android/ant-build/res/drawable-ldpi/icon.png
   [crunch]   (processed image to cache entry .../LibroDeSaludLocalDBAudio/platforms/android/ant-build/res/drawable-ldpi/icon.png: 0% size of source)
   [crunch] Processing image to cache: .../LibroDeSaludLocalDBAudio/platforms/android/res/drawable-mdpi/icon.png => .../LibroDeSaludLocalDBAudio/platforms/android/ant-build/res/drawable-mdpi/icon.png
   [crunch]   (processed image to cache entry .../LibroDeSaludLocalDBAudio/platforms/android/ant-build/res/drawable-mdpi/icon.png: 0% size of source)
   [crunch] Processing image to cache: .../LibroDeSaludLocalDBAudio/platforms/android/res/drawable-xhdpi/icon.png => .../LibroDeSaludLocalDBAudio/platforms/android/ant-build/res/drawable-xhdpi/icon.png
   [crunch]   (processed image to cache entry .../LibroDeSaludLocalDBAudio/platforms/android/ant-build/res/drawable-xhdpi/icon.png: 53% size of source)
   [crunch] Processing image to cache: .../LibroDeSaludLocalDBAudio/platforms/android/res/drawable/icon.png => .../LibroDeSaludLocalDBAudio/platforms/android/ant-build/res/drawable/icon.png
   [crunch]   (processed image to cache entry .../LibroDeSaludLocalDBAudio/platforms/android/ant-build/res/drawable/icon.png: 53% size of source)
   [crunch] Crunched 5 PNG files to update cache

-package-resources:
     [aapt] Creating full resource package...

-package:
[apkbuilder] Current build type is different than previous build: forced apkbuilder run.
[apkbuilder] Creating CordovaApp-release-unsigned.apk for release...

-post-package:

-release-prompt-for-password:

-release-nosign:
     [echo] No key.store and key.alias properties found in build.properties.
     [echo] Please sign .../LibroDeSaludLocalDBAudio/platforms/android/ant-build/CordovaApp-release-unsigned.apk manually
     [echo] and run zipalign from the Android SDK tools.
[propertyfile] Creating new property file: .../LibroDeSaludLocalDBAudio/platforms/android/ant-build/build.prop
[propertyfile] Updating property file: .../LibroDeSaludLocalDBAudio/platforms/android/ant-build/build.prop
[propertyfile] Updating property file: .../LibroDeSaludLocalDBAudio/platforms/android/ant-build/build.prop
[propertyfile] Updating property file: .../LibroDeSaludLocalDBAudio/platforms/android/ant-build/build.prop

-release-sign:

-post-build:
     [move] Moving 1 file to .../LibroDeSaludLocalDBAudio/platforms/android/ant-build
     [move] Moving 1 file to .../LibroDeSaludLocalDBAudio/platforms/android/CordovaLib/ant-build

release:

BUILD SUCCESSFUL
Total time: 15 seconds
Built the following apk(s):
    .../LibroDeSaludLocalDBAudio/platforms/android/ant-build/CordovaApp-release-unsigned.apk
Command finished with error code 0: .../LibroDeSaludLocalDBAudio/platforms/android/cordova/build --release
0 Kudos
1 Solution
John_H_Intel2
Employee
525 Views

Can you create a sample/demo from the ones provided and see if you can build that?

Also, It seems that your apps is over 100mb, can you try reducing the size and see if that helps?

View solution in original post

0 Kudos
5 Replies
John_H_Intel2
Employee
526 Views

Can you create a sample/demo from the ones provided and see if you can build that?

Also, It seems that your apps is over 100mb, can you try reducing the size and see if that helps?

0 Kudos
Victor_H_1
Beginner
525 Views

I do it, Thanks a lot, the problem was the size, I had to convert the .wav  to .mp3 files, but when I try to play the .mp3 audio in the emulator I can't listen anything, and I don't know why I can't test my app in my phone with your testing app wifi way.

I use Cordova media to do the audio thing. Can you tell me if there is any way to listen the mp3 audio by your emulator? or is my code?

I use an example that I find in the web to do that... there is the code:

function btnAudioCordova(adioUrl) {
    "use strict" ;
    var fName = "btnBarkCordova():" ;
    console.log(fName, "entry") ;

    try {
        var w = window.device && window.device.platform ;
        var x = navigator.userAgent ;
        var y = getWebPath() ;
        var z = getWebRoot() ;
        console.log(fName, "platform = ", w) ;
        console.log(fName, "userAgent = ", x) ;
        console.log(fName, "getWebPath() => ", y) ;
        console.log(fName, "getWebRoot() => ", z) ;

        var media = adioUrl;
//        if( z.match(/\/emulator.*\/ripple\/userapp/i) ) {           // if in the Ripple emulator
        if( window.tinyHippos ) {                                   // if in the Ripple emulator
            media = z + "/" + media;
        }
        else if( x.match(/(ios)|(iphone)|(ipod)|(ipad)/ig) ) {      // if on a real iOS device
            media = "/" + media;
        }
        else {                                                      // everything else...
            media = z + "/" + media;
        }

        media = new Media(media, mediaSuccess, mediaError, mediaStatus) ;
        console.log(fName, "media.src = ", media.src) ;
        media.play() ;
        console.log(fName, "try, success") ;
    }
    catch(e) {
        console.log(fName, "catch, failure") ;
    }

// private functions for our media object

    function mediaSuccess() {
        media.stop() ;
        media.release() ;
        console.log(fName, "mediaSuccess") ;
    }
    function mediaError(err) {
        media.stop() ;
        media.release() ;
        console.log(fName, "mediaError:err.code: " + err.code + " ; " + "mediaError:err.message: " + err.message) ;
    }
    function mediaStatus(status) {
        var msg = "undefined" ;
        switch(status) {
            case 0:     msg = "MEDIA_NONE" ;        break ;
            case 1:     msg = "MEDIA_STARTING" ;    break ;
            case 2:     msg = "MEDIA_RUNNING" ;     break ;
            case 3:     msg = "MEDIA_PAUSED" ;      break ;
            case 4:     msg = "MEDIA_STOPPED" ;     break ;
            default:    msg = "MEDIA_undefined" ;
        }
        console.log(fName, "mediaStatus: " + status + " = " + msg) ;
    }

    console.log(fName, "exit") ;
}

when I used with .wav file everithing is ok, but when I try to use the .mp3 file with the emulator I don't listen anithig.

 

0 Kudos
Victor_H_1
Beginner
525 Views

I do it, Thanks a lot, the problem was the size, I had to convert the .wav  to .mp3 files, but when I try to play the .mp3 audio in the emulator I can't listen anything, and I don't know why I can't test my app in my phone with your testing app wifi way.

I use Cordova media to do the audio thing. Can you tell me if there is any way to listen the mp3 audio by your emulator? or is my code?

I use an example that I find in the web to do that... there is the code:

function btnAudioCordova(adioUrl) {
    "use strict" ;
    var fName = "btnBarkCordova():" ;
    console.log(fName, "entry") ;

    try {
        var w = window.device && window.device.platform ;
        var x = navigator.userAgent ;
        var y = getWebPath() ;
        var z = getWebRoot() ;
        console.log(fName, "platform = ", w) ;
        console.log(fName, "userAgent = ", x) ;
        console.log(fName, "getWebPath() => ", y) ;
        console.log(fName, "getWebRoot() => ", z) ;

        var media = adioUrl;
//        if( z.match(/\/emulator.*\/ripple\/userapp/i) ) {           // if in the Ripple emulator
        if( window.tinyHippos ) {                                   // if in the Ripple emulator
            media = z + "/" + media;
        }
        else if( x.match(/(ios)|(iphone)|(ipod)|(ipad)/ig) ) {      // if on a real iOS device
            media = "/" + media;
        }
        else {                                                      // everything else...
            media = z + "/" + media;
        }

        media = new Media(media, mediaSuccess, mediaError, mediaStatus) ;
        console.log(fName, "media.src = ", media.src) ;
        media.play() ;
        console.log(fName, "try, success") ;
    }
    catch(e) {
        console.log(fName, "catch, failure") ;
    }

// private functions for our media object

    function mediaSuccess() {
        media.stop() ;
        media.release() ;
        console.log(fName, "mediaSuccess") ;
    }
    function mediaError(err) {
        media.stop() ;
        media.release() ;
        console.log(fName, "mediaError:err.code: " + err.code + " ; " + "mediaError:err.message: " + err.message) ;
    }
    function mediaStatus(status) {
        var msg = "undefined" ;
        switch(status) {
            case 0:     msg = "MEDIA_NONE" ;        break ;
            case 1:     msg = "MEDIA_STARTING" ;    break ;
            case 2:     msg = "MEDIA_RUNNING" ;     break ;
            case 3:     msg = "MEDIA_PAUSED" ;      break ;
            case 4:     msg = "MEDIA_STOPPED" ;     break ;
            default:    msg = "MEDIA_undefined" ;
        }
        console.log(fName, "mediaStatus: " + status + " = " + msg) ;
    }

    console.log(fName, "exit") ;
}

when I used with .wav file everithing is ok, but when I try to use the .mp3 file with the emulator I don't listen anithig.

 

0 Kudos
Anusha_M_Intel1
Employee
525 Views

Hi Victor,

The emulator doesn't play .mp3 files. It plays .wav and .ogg file formats only. If you are using .mp3 files, you can try testing your app on device or use app preview.

0 Kudos
Victor_H_1
Beginner
525 Views

Thanks for the info Anusha, It works on the device. thanks.

0 Kudos
Reply