I'm coming across problems uploading a native android app from the device/emulator to the MTW. The scenario is this:
- User builds a mobile app using Android Studio and the CLI
- Deploys the mobile app to the emulator or device
- Tests the functionality and it works ok
- Create a Test Workbench Project in eclipse
- Launches the MTW Client on the emulator and connects to the Test Workbench Project
- Uploads the application from the Android emulator to the Test Workbench
It is at this point that it fails and I get an error uploading it. it seems to be some sort of align problem again but I don't know how to solve it.
Now If I upload a hybrid Android app, then it works, so I know that my eclipse environment is configured ok (to a certain extent at least) as I got around the initial zipalign problem.
So my initial thoughts are
- Maybe there is some additional configuration that I need to do to that is unclear to me
Maybe the apk file that I am using is invalid in some way and I need to do something special to be able to upload it Note I played around with the zipalign option in the build.gradle file. but to no avail.
. android { compileSdkVersion 19 buildToolsVersion "19.1"
defaultConfig { minSdkVersion 10 targetSdkVersion 19 versionCode 1 versionName "1.0" } buildTypes { release { runProguard false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' zipAlign true } }
} ...
The logs show the following
!ENTRY com.ibm.rational.test.lt.models.behavior.moeb 1 0 2014-08-26 21:37:08.540
!MESSAGE CRRTWM6013I from component Android-BuildChain: configuration: {cache.dir=C:\Work\Worklight_v62\Test\.metadata\.plugins\com.ibm.rational.test.lt.models.behavior.moeb\cache, android.runtime.dir=C:\IBM\WorklightStudio_v62\eclipse\eclipse\plugins\com.ibm.rational.test.mobile.android.runtime_1.2.100.v20140603_1426, ibm.jdk.install.dir=C:\Program Files\Java\jdk1.7.0_25, android.sdk.install.dir=C:\Utils\Android\android-sdk, runtime.cache.dir=C:\Work\Worklight_v62\Test\.metadata\.plugins\com.ibm.rational.test.lt.models.behavior.moeb\builds\runtimes}
!ENTRY com.ibm.cic.licensing.common.util 4 0 2014-08-26 21:37:19.161
!MESSAGE LicenseCheck returned FALSE!
!ENTRY com.ibm.rational.test.lt.models.behavior.moeb 4 0 2014-08-26 21:37:35.694
!MESSAGE CRRTWM6012E exception thrown from component Android-BuildChain while building from '0-com.example.ibmbankapp.app-1.apk'
!STACK 0
brut.androlib.AndrolibException: com.ibm.rational.test.mobile.android.buildchain.utils.ProcessExec$ProcessExecException: Cannot exec command: [C:\Utils\Android\ANDROI~1\build-tools\20.0.0\aapt.exe, p, --no-crunch, -F, C:\Users\mmalc\AppData\Local\Temp\APKTOOL6016720483897094701.tmp, -0, arsc, -I, C:\Work\WORKLI~4\Test\METADA~1\PLUGIN~1\COMIBM~1.MOE\cache\apktool\framework\1.apk, -S, C:\Work\WORKLI~4\Test\METADA~1\PLUGIN~1\COMIBM~1.MOE\builds\C2278B~1\0-com.example.ibmbankapp.app-1\res, -M, C:\Work\WORKLI~4\Test\METADA~1\PLUGIN~1\COMIBM~1.MOE\builds\C2278B~1\0-com.example.ibmbankapp.app-1\AndroidManifest.xml]
Exit code: 1
Process output stream:
Process error stream:
C:\Work\WORKLI~4\Test\METADA~1\PLUGIN~1\COMIBM~1.MOE\builds\C2278B~1\0-com.example.ibmbankapp.app-1\res\values\styles.xml:9: error: Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Base'.
C:\Work\WORKLI~4\Test\METADA~1\PLUGIN~1\COMIBM~1.MOE\builds\C2278B~1\0-com.example.ibmbankapp.app-1\res\values\styles.xml:118: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Base'.
C:\Work\WORKLI~4\Test\METADA~1\PLUGIN~1\COMIBM~1.MOE\builds\C2278B~1\0-com.example.ibmbankapp.app-1\res\values\styles.xml:327: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
C:\Work\WORKLI~4\Test\METADA~1\PLUGIN~1\COMIBM~1.MOE\builds\C2278B~1\0-com.example.ibmbankapp.app-1\res\values\styles.xml:368: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
C:\Work\WORKLI~4\Test\METADA~1\PLUGIN~1\COMIBM~1.MOE\builds\C2278B~1\0-com.example.ibmbankapp.app-1\res\values\styles.xml:382: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
C:\Work\WORKLI~4\Test\METADA~1\PLUGIN~1\COMIBM~1.MOE\builds\C2278B~1\0-com.example.ibmbankapp.app-1\res\values\styles.xml:389: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
C:\Work\WORKLI~4\Test\METADA~1\PLUGIN~1\COMIBM~1.MOE\builds\C2278B~1\0-com.example.ibmbankapp.app-1\res\values-v14\styles.xml:84: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
C:\Work\WORKLI~4\Test\METADA~1\PLUGIN~1\COMIBM~1.MOE\builds\C2278B~1\0-com.example.ibmbankapp.app-1\res\values\styles.xml:401: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base.DropDownItem'.
C:\Work\WORKLI~4\Test\METADA~1\PLUGIN~1\COMIBM~1.MOE\builds\C2278B~1\0-com.example.ibmbankapp.app-1\res\values\styles.xml:407: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
C:\Work\WORKLI~4\Test\METADA~1\PLUGIN~1\COMIBM~1.MOE\builds\C2278B~1\0-com.example.ibmbankapp.app-1\res\values\styles.xml:429: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
C:\Work\WORKLI~4\Test\METADA~1\PLUGIN~1\COMIBM~1.MOE\builds\C2278B~1\0-com.example.ibmbankapp.app-1\res\values\styles.xml:502: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Light.Base'.
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:444)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:376)
at brut.androlib.Androlib.buildResources(Androlib.java:320)
at brut.androlib.Androlib.build(Androlib.java:237)
at brut.androlib.Androlib.build(Androlib.java:203)
at com.ibm.rational.test.mobile.android.buildchain.tools.build.BuildWrapper.build(BuildWrapper.java:213)
at com.ibm.rational.test.mobile.android.buildchain.AndroidBuildChain.build(AndroidBuildChain.java:289)
at com.ibm.rational.test.lt.models.behavior.moeb.utils.BuildChainManager$Build.run(BuildChainManager.java:198)
at java.lang.Thread.run(Unknown Source)
Caused by: com.ibm.rational.test.mobile.android.buildchain.utils.ProcessExec$ProcessExecException: Cannot exec command: [C:\Utils\Android\ANDROI~1\build-tools\20.0.0\aapt.exe, p, --no-crunch, -F, C:\Users\mmalc\AppData\Local\Temp\APKTOOL6016720483897094701.tmp, -0, arsc, -I, C:\Work\WORKLI~4\Test\METADA~1\PLUGIN~1\COMIBM~1.MOE\cache\apktool\framework\1.apk, -S, C:\Work\WORKLI~4\Test\METADA~1\PLUGIN~1\COMIBM~1.MOE\builds\C2278B~1\0-com.example.ibmbankapp.app-1\res, -M, C:\Work\WORKLI~4\Test\METADA~1\PLUGIN~1\COMIBM~1.MOE\builds\C2278B~1\0-com.example.ibmbankapp.app-1\AndroidManifest.xml]
Exit code: 1
Process output stream:
Process error stream:
C:\Work\WORKLI~4\Test\METADA~1\PLUGIN~1\COMIBM~1.MOE\builds\C2278B~1\0-com.example.ibmbankapp.app-1\res\values\styles.xml:9: error: Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Base'.
C:\Work\WORKLI~4\Test\METADA~1\PLUGIN~1\COMIBM~1.MOE\builds\C2278B~1\0-com.example.ibmbankapp.app-1\res\values\styles.xml:118: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Base'.
C:\Work\WORKLI~4\Test\METADA~1\PLUGIN~1\COMIBM~1.MOE\builds\C2278B~1\0-com.example.ibmbankapp.app-1\res\values\styles.xml:327: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
C:\Work\WORKLI~4\Test\METADA~1\PLUGIN~1\COMIBM~1.MOE\builds\C2278B~1\0-com.example.ibmbankapp.app-1\res\values\styles.xml:368: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
C:\Work\WORKLI~4\Test\METADA~1\PLUGIN~1\COMIBM~1.MOE\builds\C2278B~1\0-com.example.ibmbankapp.app-1\res\values\styles.xml:382: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
C:\Work\WORKLI~4\Test\METADA~1\PLUGIN~1\COMIBM~1.MOE\builds\C2278B~1\0-com.example.ibmbankapp.app-1\res\values\styles.xml:389: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
C:\Work\WORKLI~4\Test\METADA~1\PLUGIN~1\COMIBM~1.MOE\builds\C2278B~1\0-com.example.ibmbankapp.app-1\res\values-v14\styles.xml:84: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
C:\Work\WORKLI~4\Test\METADA~1\PLUGIN~1\COMIBM~1.MOE\builds\C2278B~1\0-com.example.ibmbankapp.app-1\res\values\styles.xml:401: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base.DropDownItem'.
C:\Work\WORKLI~4\Test\METADA~1\PLUGIN~1\COMIBM~1.MOE\builds\C2278B~1\0-com.example.ibmbankapp.app-1\res\values\styles.xml:407: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
C:\Work\WORKLI~4\Test\METADA~1\PLUGIN~1\COMIBM~1.MOE\builds\C2278B~1\0-com.example.ibmbankapp.app-1\res\values\styles.xml:429: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
C:\Work\WORKLI~4\Test\METADA~1\PLUGIN~1\COMIBM~1.MOE\builds\C2278B~1\0-com.example.ibmbankapp.app-1\res\values\styles.xml:502: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Light.Base'.
at com.ibm.rational.test.mobile.android.buildchain.utils.ProcessExec.exec(ProcessExec.java:102)
at com.ibm.rational.test.mobile.android.buildchain.utils.ProcessExec.exec(ProcessExec.java:77)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:442)
... 8 more
!ENTRY com.ibm.rational.test.lt.models.behavior.moeb 4 0 2014-08-26 21:37:35.704
!MESSAGE CRRTWM6010E exception thrown while building from '0-com.example.ibmbankapp.app-1.apk'
!STACK 0
java.lang.Error: Playback-ready package build/sign/align failed
at com.ibm.rational.test.mobile.android.buildchain.AndroidBuildChain.build(AndroidBuildChain.java:290)
at com.ibm.rational.test.lt.models.behavior.moeb.utils.BuildChainManager$Build.run(BuildChainManager.java:198)
at java.lang.Thread.run(Unknown Source)
I'm using WL v6.2.0.00-20140801-1709 MTWW v 8.5.100.v20131024_1533
I've also already looked at another post regarding the zipalign problem and not had any joy as I don't have Android API 20 - 22 installed
Appreciate any pointers.