[AC-2599] Cannot build for Android with SDK 3.2.1.v20140121132444 (beta)
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Cannot Reproduce |
Resolution Date | 2014-01-28T19:13:33.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Appcelerator CLI |
Labels | 3.2.1, android, build, triage |
Reporter | Fokke Zandbergen |
Assignee | Chris Barber |
Created | 2014-01-26T09:31:15.000+0000 |
Updated | 2016-03-08T07:41:41.000+0000 |
Description
The following builds fine if the project uses 3.2.0.GA, but not with the 3.2.1 beta linked from the blog:
ti create -p android -n testb321 --id test.b321 -d .
cd testb321
ti build -p android -T device
[INFO] Creating unsigned apk
[INFO] Processing /Users/zandbergen/dev/tests/testb321/build/android/src
[INFO] Writing unsigned apk: /Users/zandbergen/dev/tests/testb321/build/android/bin/app-unsigned.apk
[INFO] Determining signature algorithm: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/keytool "-J-Duser.language=en" "-v" "-list" "-keystore" "/Users/zandbergen/Library/Application Support/Titanium/mobilesdk/osx/3.2.1.v20140121132444/android/dev_keystore" "-storepass" "*******" "-alias" "tidev"
[INFO] Using MD5withRSA signature algorithm
[INFO] Signing apk: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/jarsigner "-sigalg" "MD5withRSA" "-digestalg" "SHA1" "-keystore" "/Users/zandbergen/Library/Application Support/Titanium/mobilesdk/osx/3.2.1.v20140121132444/android/dev_keystore" "-storepass" "*******" "-signedjar" "/Users/zandbergen/dev/tests/testb321/build/android/bin/testb321.apk" "/Users/zandbergen/dev/tests/testb321/build/android/bin/app-unsigned.apk" "tidev"
[INFO] Aligning zip file: /Users/zandbergen/dev/android-sdk/tools/zipalign "-v" "4" "/Users/zandbergen/dev/tests/testb321/build/android/bin/testb321.apk" "/Users/zandbergen/dev/tests/testb321/build/android/bin/testb321.apkz"
[INFO] Writing build manifest: /Users/zandbergen/dev/tests/testb321/build/android/build-manifest.json
[ERROR] Project failed to build after 27s 193ms
But even though the build succeeds with the project set to 3.2.0.GA, the build is corrupted somehow. Files are reported missing when the app runs. Sometimes even the app.js
is missing.
Tried to reproduce with the steps & environment mentioned in above but was not able to reproduce, I will investigate into it more. For me the app builds & launches successfully on the android device using the CLI. @Fokke Zandbergen - You can try setting your log level to trace so that we can have more logging data & attach the logs. Environment: Appc Studio : 3.2.1.201401241158 Ti SDK : 3.2.1.v20140121132444 Mac OSX : 10.8.5 Alloy : 1.3.1-beta3 CLI - 3.2.1 beta3 Samsung Galaxy S4 running android 4.2.2
Well, don't ask why.. but I fixed it by removing all CLI command and hook plugins and then adding them again, having identical config before and after, but now working:
[~fokke] Crazy. That's weird. I'll resolve this as cannot reproduce. If this issue crops back up, reopen this ticket or create a new one and we'll take a peek. Thanks!
Got the same problem again [~cbarber], now solved it by simply:
Somehow not all files from the Resources directory are copied to
build/android/assets
.Also strange, even if I set --log-level "trace" while also having it set with
ti setup
I only see[TRACE]
messages in the Alloy compile part.[~fokke] Can you verify that
ti config cli.logLevel
is set totrace
? I'm not sure why reinstalling the SDK fixes things. Do you happen to have the Soasta Touchtest CLI plugins and modules installed?Well, I don't reinstall the SDK, but just rollback to the 3.2.0 CLI and select the 3.2.0.GA SDK. That fixes it inmediately. No, I don't use Soasta, only have the LiveView hook installed. The thing is, first when I upgrade the CLI to 3.2.1 and select the 3.2.1 SDK it just works, but then after a day or so (or when I do something I'm not aware of what it is), it will stop working. Making it very hard to reproduce.
[~fokke] The latest stable LiveView hook is NOT compatible with Titanium CLI 3.2.1. If you want to use LiveView, downgrade to Titanium CLI 3.2.0. If you want to use 3.2.1, you need to remove the LiveView hook from your
paths.hooks
.Ah, well that explains :)