Software Archive
Read-only legacy content
17061 Discussions

App Preview VS .APK file

Ganesh_B_
Beginner
623 Views

Hello,

ISSUE 1

I had a great joy testing my app on XDK app preview. It was running fine and looking as expected on Intel App Preview. 

However, when I compiled it into .APK file, it appeared very different to the app preview. 

Am I doing anything wrong when building .APK file? The look on App Preview is correct one.

ISSUE 2

I can only compile with 'Legacy Hybrid Mobile App Platforms'. It crashes with an error when I compile with 'Cordova Hybrid Mobile App Platforms'

screen_comparison_0.jpg

Thanks for your help.

Kind Regards,

Ganesh

 

0 Kudos
5 Replies
John_H_Intel2
Employee
623 Views

The reason your app looks different is because the app preview you are using to test with is based off the Cordova builds. The legacy builds are not based off of Cordova. They are legacy and will soon be removed all together.

I can not access the link of your build log, please upload a txt file of the log for us to look at.

0 Kudos
Ganesh_B_
Beginner
623 Views

Thank you. It will be very nice if you can guide me through this error and make my app working. Here is the log file.

 

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: []
Writing out cordova_plugins.js...
Wrote out Android application name to "TravelAppMob"
This app does not have launcher icons defined
Wrote out Android package name to "xdk.intel.blank.ad.template"
************* Processing the main config.xml file (after_prepare)  *****************
App Directory = [.../TravelAppMob]
Will process and update the following config files:
    Config.xml = [.../TravelAppMob/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 [TravelAppMob]
Updating full app name to [TravelAppMob]
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: .../TravelAppMob/platforms/android/res/drawable-land-mdpi
No splash screen supplied for drawable-port-xhdpi.  Cleaning up.
Removing unused density: .../TravelAppMob/platforms/android/res/drawable-port-xhdpi
No splash screen supplied for drawable-port-ldpi.  Cleaning up.
Removing unused density: .../TravelAppMob/platforms/android/res/drawable-port-ldpi
No splash screen supplied for drawable-land-ldpi.  Cleaning up.
Removing unused density: .../TravelAppMob/platforms/android/res/drawable-land-ldpi
No splash screen supplied for drawable-port-hdpi.  Cleaning up.
Removing unused density: .../TravelAppMob/platforms/android/res/drawable-port-hdpi
No splash screen supplied for drawable-land-xhdpi.  Cleaning up.
Removing unused density: .../TravelAppMob/platforms/android/res/drawable-land-xhdpi
No splash screen supplied for drawable-land-hdpi.  Cleaning up.
Removing unused density: .../TravelAppMob/platforms/android/res/drawable-land-hdpi
No splash screen supplied for drawable-port-mdpi.  Cleaning up.
Removing unused density: .../TravelAppMob/platforms/android/res/drawable-port-mdpi
Saving config.xml to [.../TravelAppMob/config.xml]
************* Completed processing the main config.xml file (after_prepare)  *****************
Running command: .../TravelAppMob/platforms/android/cordova/build --release
Buildfile: .../TravelAppMob/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 24.3.3
 [checkenv] Installed at /Developer/android-sdk-linux

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

-build-setup:
[getbuildtools] Using latest Build Tools: 22.0.1
     [echo] Resolving Build Target for CordovaApp...
[gettarget] Project Target:   Android 4.4.2
[gettarget] API level:        19
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: .../TravelAppMob/platforms/android/ant-build
    [mkdir] Created dir: .../TravelAppMob/platforms/android/ant-build/res
    [mkdir] Created dir: .../TravelAppMob/platforms/android/ant-build/rsObj
    [mkdir] Created dir: .../TravelAppMob/platforms/android/ant-build/rsLibs
    [mkdir] Created dir: .../TravelAppMob/platforms/android/ant-gen
    [mkdir] Created dir: .../TravelAppMob/platforms/android/ant-build/classes
    [mkdir] Created dir: .../TravelAppMob/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 24.3.3
 [checkenv] Installed at /Developer/android-sdk-linux

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

-build-setup:
[getbuildtools] Using latest Build Tools: 22.0.1
     [echo] Resolving Build Target for CordovaApp...
[gettarget] Project Target:   Android 4.4.2
[gettarget] API level:        19
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: .../TravelAppMob/platforms/android/CordovaLib/res
    [mkdir] Created dir: .../TravelAppMob/platforms/android/CordovaLib/libs
    [mkdir] Created dir: .../TravelAppMob/platforms/android/CordovaLib/ant-build
    [mkdir] Created dir: .../TravelAppMob/platforms/android/CordovaLib/ant-build/res
    [mkdir] Created dir: .../TravelAppMob/platforms/android/CordovaLib/ant-build/rsObj
    [mkdir] Created dir: .../TravelAppMob/platforms/android/CordovaLib/ant-build/rsLibs
    [mkdir] Created dir: .../TravelAppMob/platforms/android/CordovaLib/ant-gen
    [mkdir] Created dir: .../TravelAppMob/platforms/android/CordovaLib/ant-build/classes
    [mkdir] Created dir: .../TravelAppMob/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 .../TravelAppMob/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: .../TravelAppMob/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: .../TravelAppMob/platforms/android/CordovaLib/res
   [crunch] To destination dir: .../TravelAppMob/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: .../TravelAppMob/platforms/android/CordovaLib/ant-build/build.prop
[propertyfile] Updating property file: .../TravelAppMob/platforms/android/CordovaLib/ant-build/build.prop
[propertyfile] Updating property file: .../TravelAppMob/platforms/android/CordovaLib/ant-build/build.prop
[propertyfile] Updating property file: .../TravelAppMob/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: .../TravelAppMob/platforms/android/CordovaLib/ant-build/classes.jar

-compile:
    [javac] Compiling 3 source files to .../TravelAppMob/platforms/android/ant-build/classes

-post-compile:

-obfuscate:

-dex:
      [dex] input: .../TravelAppMob/platforms/android/ant-build/classes
      [dex] input: .../TravelAppMob/platforms/android/CordovaLib/ant-build/classes.jar
      [dex] Pre-Dexing .../TravelAppMob/platforms/android/CordovaLib/ant-build/classes.jar -> classes-089dd77176c7619309badaff0823e6c0.jar
      [dex] Converting compiled files and external libraries into .../TravelAppMob/platforms/android/ant-build/classes.dex...
       [dx] Merged dex A (7 defs/2.2KiB) with dex B (209 defs/317.2KiB). Result is 216 defs/389.1KiB. Took 0.3s

-crunch:
   [crunch] Crunching PNG Files in source dir: .../TravelAppMob/platforms/android/res
   [crunch] To destination dir: .../TravelAppMob/platforms/android/ant-build/res
   [crunch] Processing image to cache: .../TravelAppMob/platforms/android/res/drawable-hdpi/icon.png => .../TravelAppMob/platforms/android/ant-build/res/drawable-hdpi/icon.png
   [crunch]   (processed image to cache entry .../TravelAppMob/platforms/android/ant-build/res/drawable-hdpi/icon.png: 67% size of source)
   [crunch] Processing image to cache: .../TravelAppMob/platforms/android/res/drawable-ldpi/icon.png => .../TravelAppMob/platforms/android/ant-build/res/drawable-ldpi/icon.png
   [crunch]   (processed image to cache entry .../TravelAppMob/platforms/android/ant-build/res/drawable-ldpi/icon.png: 0% size of source)
   [crunch] Processing image to cache: .../TravelAppMob/platforms/android/res/drawable-mdpi/icon.png => .../TravelAppMob/platforms/android/ant-build/res/drawable-mdpi/icon.png
   [crunch]   (processed image to cache entry .../TravelAppMob/platforms/android/ant-build/res/drawable-mdpi/icon.png: 0% size of source)
   [crunch] Processing image to cache: .../TravelAppMob/platforms/android/res/drawable-xhdpi/icon.png => .../TravelAppMob/platforms/android/ant-build/res/drawable-xhdpi/icon.png
   [crunch]   (processed image to cache entry .../TravelAppMob/platforms/android/ant-build/res/drawable-xhdpi/icon.png: 53% size of source)
   [crunch] Processing image to cache: .../TravelAppMob/platforms/android/res/drawable/icon.png => .../TravelAppMob/platforms/android/ant-build/res/drawable/icon.png
   [crunch]   (processed image to cache entry .../TravelAppMob/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...
     [aapt]     (skipping file '.editorconfig' due to ANDROID_AAPT_IGNORE pattern '.*')
     [aapt]     (skipping file '.jshintrc' due to ANDROID_AAPT_IGNORE pattern '.*')
     [aapt]     (skipping file '.editorconfig' due to ANDROID_AAPT_IGNORE pattern '.*')
     [aapt]       Unable to add '.../TravelAppMob/platforms/android/assets/www/components/bower_components/web-animations-js/web-animations.min.js.gz': file already in archive (try '-u'?)
     [aapt] ERROR: unable to process assets while packaging '.../TravelAppMob/platforms/android/ant-build/CordovaApp.ap_'
     [aapt] ERROR: packaging of '.../TravelAppMob/platforms/android/ant-build/CordovaApp.ap_' failed

BUILD FAILED
/Developer/android-sdk-linux/tools/ant/build.xml:928: The following error occurred while executing this line:
/Developer/android-sdk-linux/tools/ant/build.xml:946: null returned: 1

Total time: 9 seconds

.../TravelAppMob/platforms/android/cordova/node_modules/q/q.js:126
                    throw e;
                          ^
Error code 1 for command: ant with args: release,-f,.../TravelAppMob/platforms/android/build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
Command finished with error code 8: .../TravelAppMob/platforms/android/cordova/build --release
Error: .../TravelAppMob/platforms/android/cordova/build: Command failed with exit code 8
    at ChildProcess.whenDone (/Developer/cordova/4.1.2/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:743:16)
    at Process.ChildProcess._handle.onexit (child_process.js:810:5)

 

 

 

0 Kudos
Ganesh_B_
Beginner
623 Views

Hello There,

I've fixed the error now.

 

     [aapt]       Unable to add '.../TravelAppMob/platforms/android/assets/www/components/bower_components/web-animations-js/web-animations.min.js.gz': file already in archive (try '-u'?)

 

As per the above message, I deleted a zip file, 'web-animations.min.js.gz', inside bower_components. And it all started compiling fine. And the look and feel is also as expected.

Thanks.

Ganesh

0 Kudos
John_H_Intel2
Employee
623 Views

Glad to see you got it working :)

0 Kudos
Reply