Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2599] Cannot build for Android with SDK 3.2.1.v20140121132444 (beta)

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionCannot Reproduce
Resolution Date2014-01-28T19:13:33.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAppcelerator CLI
Labels3.2.1, android, build, triage
ReporterFokke Zandbergen
AssigneeChris Barber
Created2014-01-26T09:31:15.000+0000
Updated2016-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.

Comments

  1. Lokesh Choudhary 2014-01-27

    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
  2. Fokke Zandbergen 2014-01-28

    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:
       paths.commands             = ["/Users/zandbergen/dev/forks/TiShadow/plugin/yy.tishadow/1.0/commands"]
       paths.hooks                = ["/Applications/Appcelerator_Studio/plugins/com.appcelerator.titanium.liveview.core_1.1.0.1387250774/node_modules/liveview/hook","/usr/local/lib/node_modules/rapiddev/plugin/rapiddev/hooks","/Users/zandbergen/dev/forks/TiShadow/plugin/yy.tishadow/1.0/hooks"]
       paths.modules              = ["/usr/local/lib/node_modules/rapiddev/module"]
       
  3. Chris Barber 2014-01-28

    [~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!
  4. Fokke Zandbergen 2014-01-29

    Got the same problem again [~cbarber], now solved it by simply:
       sudo npm uninstall -g titanium
       sudo npm install -g titanium
       ti sdk select 3.2.0.GA
       
    Somehow not all files from the Resources directory are copied to build/android/assets.
  5. Fokke Zandbergen 2014-01-29

    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.
  6. Chris Barber 2014-01-29

    [~fokke] Can you verify that ti config cli.logLevel is set to trace? I'm not sure why reinstalling the SDK fixes things. Do you happen to have the Soasta Touchtest CLI plugins and modules installed?
  7. Fokke Zandbergen 2014-01-29

    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.
  8. Chris Barber 2014-01-29

    [~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.
  9. Fokke Zandbergen 2014-01-29

    Ah, well that explains :)

JSON Source