Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13944] Android: build: TypeError: argument of type 'NoneType' is not iterable

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2013-05-24T19:02:44.000+0000
Affected Version/sRelease 3.1.0
Fix Version/s2013 Sprint 11 Core, 2013 Sprint 11, Release 3.1.1, Release 3.2.0
ComponentsAndroid
Labelsqe-3.1.1, qe-closed-3.1.1, qe-testadded
ReporterAriel Gelbard
AssigneeAllen Yeung
Created2013-05-21T06:10:21.000+0000
Updated2014-02-24T23:38:55.000+0000

Description

*Steps to Reproduce* Compiling a Simple App with Mac OS X 10.8.3 and all current updates, Latest Version of Titanium Studio SDK, Android SDK with API level 8 I have also put a proper id: com.whatever.whatever *Actual Result* First Time Run:
[ERROR] Exception occured while building Android project:
[ERROR] Traceback (most recent call last):
[ERROR]   File '/Users/akzes/Library/Application Support/Titanium/mobilesdk/osx/3.1.0.GA/android/builder.py', line 2528, in <module>
[ERROR]     builder.build_and_run(False, avd_id, debugger_host=debugger_host, profiler_host=profiler_host)
[ERROR]   File '/Users/akzes/Library/Application Support/Titanium/mobilesdk/osx/3.1.0.GA/android/builder.py', line 2264, in build_and_run
[ERROR]     self.manifest_changed = self.generate_android_manifest(compiler)
[ERROR]   File '/Users/akzes/Library/Application Support/Titanium/mobilesdk/osx/3.1.0.GA/android/builder.py', line 1404, in generate_android_manifest
[ERROR]     '-I', self.android_jar], warning_regex=r'skipping')
[ERROR]   File '/Users/akzes/Library/Application Support/Titanium/mobilesdk/osx/3.1.0.GA/android/run.py', line 38, in run
[ERROR]     print '[DEBUG] %s' % subprocess.list2cmdline(args_to_log)
[ERROR]   File '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py', line 587, in list2cmdline
[ERROR] TypeError: argument of type 'NoneType' is not iterable
[ERROR] :  Build process exited with code 1
[ERROR] :  Project failed to build after 1s 448ms

Second Time Run:
[ERROR] Error generating R.java from manifest
[ERROR] :  Build process exited with code 1
[ERROR] :  Project failed to build after 1s 7ms
*Expected Result* Should Compile and Run on Android Simulator

Attachments

FileDateSize
.log2013-05-21T06:10:22.000+000026027
android-build-console.txt2013-05-22T00:35:47.000+000012049
android-build-log.txt2013-05-22T00:35:47.000+00003697
diagnostic7382522774409293807.log2013-05-21T06:10:26.000+00007978
diagnostic-log.txt2013-05-22T00:35:47.000+000010805
ti-info.txt2013-05-22T00:35:47.000+000022423

Comments

  1. Ingo Muschenetz 2013-05-21

    Chris, thoughts?
  2. Chris Barber 2013-05-21

    Unless this is a stop ship bug for 3.1.1 (which I don't believe it is), I vote for never fixing this specific issue since it's going away in 3.2.
  3. Ingo Muschenetz 2013-05-21

    [~dsefton] I don't believe we are going to be able to diagnose this issue. I would suggest having the user write out some of the parameters to the function in line 38 of run.py. That will give us more information on what's going on.
  4. Daniel Sefton 2013-05-22

    Hi Ariel, Do you have an Android device that you can try running it on instead of the emulator? If not, can you try tweaking the emulator type by heading to "Run -> Run Configurations..." and selecting the appropriate config under "Titanium Android Emulator". Let me know what Android API and Screen you have set. And I'm guessing this occurs for any project at all, can you let us know the project type? You've tried a clean build (Project -> Clean...) -> build? Lastly, you can try Ingo's suggestion if you understand what he's asking. Let us know if not. You might also want to check out any potential solutions in the issues I linked. Cheers.
  5. Dustin Hyde 2013-05-22

    I am seeing this on a default Titanium project in Android Emulator 2.3.3. This seems related to the r22 toolset changes. Attaching logs.
  6. Ariel Gelbard 2013-05-22

    Hi Daniel, Thanks so much for the response. Here is my configuration: -Google APIs (Android 2.2) [armeabi] -Screen: WVGA8541 The project type I use is a Mobile Project. When I got these errors, I actually did a fresh install of my macbook computer, performed all the current updates, then installed titanium studio and installed xcode and android sdk. I made a new project, and clicked run android emulator, and it still gave me the errors...so I confirmed that it doesn't have to do with any other programs interfering with the titanium or the sdk. If I am provided with the command lines that you would want me to add to run.py, I would be glad to add the code to run.py to help you understand the problem further I checked out the other issues that were linked...no dice :(
  7. Sean McCleary 2013-05-22

    I am also effected by this issue. I experience the same error listed. I have tried multiple Android SDKs and they all fail on every project template without modifying the code. I get the error with the Android emulator or my Android phone. The code has no problems running on the iPhone simulator. I don't understand how any Android development can be done using Titanium Studio with this bug.
  8. Allen Yeung 2013-05-22

    It looks like in r22 tools, google moved a lot of tools to build-tools. Here are brief steps I did to reproduce the issue: 1. Upgrade to the latest r22 sdk tools. Also make sure you download the new build-tools as well. 2. Create a new titanium project 3. Run the project on simulator (I used android 2.2, but I don't think it matters) Expected Result: The project should build fine. Actual Result: You get the NoneType error as mentioned in this ticket. NOTE: I occasionally ran into the missing appicon error, but to get around this, just do a clean rebuild.
  9. Allen Yeung 2013-05-22

    PR: https://github.com/appcelerator/titanium_mobile/pull/4315
  10. Allen Yeung 2013-05-22

    3_1_X backport: https://github.com/appcelerator/titanium_mobile/pull/4316
  11. brian wells 2013-05-22

    This fixed it for me: http://developer.appcelerator.com/question/152497/titanium-sdk-310-error-typeerror-argument-of-type-nonetype-is-not-iterable-on-building-android-app
  12. Matt Langston 2013-05-22

    FR passed for https://github.com/appcelerator/titanium_mobile/pull/4315. PR merged to master. FR passed for https://github.com/appcelerator/titanium_mobile/pull/4316. PR merged to 3_1_X.
  13. Eric Wing 2013-05-24

    I just tried applying the fix on my Windows 8 machine (in Virtualbox) by following the announced directions here: http://developer.appcelerator.com/blog/2013/05/updating-to-android-r22-tools.html (I grabbed 3.1.1.v20130523170057 and also tried against a special 3_1_X_lanica branch Matt made for us which should have incorporated this fix.) Unfortunately, this does not seem to fix the problem for me. I think Android/Windows may be using a different naming scheme based on the symlink description in the public announcement. Instead of seeing something like: /Applications/Android-sdk/build-tools/17.0.0/aapt or /Applications/Android-sdk/build-tools/17.0.0/dx my Windows file structure is like: C:\Android\adt-bundle-windows-x86_64-20130514\sdk\build-tools\android-4.2.2 where there is both a aapt.exe and a dx.bat in this directory. This is a fresh install of Windows 8 (64-bit x86) as of yesterday, and a fresh grab/install of the Android SDK (ADT bundle 64-bit) and NDK. This is also a fresh download/install of Titanium Studio. Below is the console output I get when I create a new Single Window project from the template and try to build it. Titanium Command-Line Interface, CLI version 3.1.0, Titanium SDK version 3.1.1.v20130523170057 Copyright (c) 2012-2013, Appcelerator, Inc. All Rights Reserved. [INFO] : Running emulator process: python "C:\Users\lanica\AppData\Roaming\Titanium\mobilesdk\win32\3.1.1.v20130523170057\android\builder.py" "emulator" "SingleWindowTemplate2" "C:\Android\adt-bundle-windows-x86_64-20130514\sdk" "C:\Users\lanica\Documents\Titanium_Studio_Workspace\SingleWindowTemplate2" "com.test.singlewindowtemplate2" "3" "HVGA" "armeabi-v7a" [INFO] : Running build process: python "C:\Users\lanica\AppData\Roaming\Titanium\mobilesdk\win32\3.1.1.v20130523170057\android\builder.py" "simulator" "SingleWindowTemplate2" "C:\Android\adt-bundle-windows-x86_64-20130514\sdk" "C:\Users\lanica\Documents\Titanium_Studio_Workspace\SingleWindowTemplate2" "com.test.singlewindowtemplate2" "3" "HVGA" [INFO] logfile = C:\Users\lanica\Documents\Titanium_Studio_Workspace\SingleWindowTemplate2\build.log [INFO] : Emulator is running [INFO] Building SingleWindowTemplate2 for Android ... one moment [INFO] Titanium SDK version: 3.1.1 (05/23/13 17:00 f99319d) [INFO] Fastdev server running, deploying in Fastdev mode [INFO] Copying CommonJS modules... [INFO] Copying project resources.. [INFO] Detected change in tiapp.xml, or assets deleted. Forcing full re-build... [INFO] Force including all modules... [INFO] Force including all modules... [INFO] Compiling Javascript Resources ... [INFO] Compiling localization files [ERROR] Exception occured while building Android project: [ERROR] Traceback (most recent call last): [ERROR] File "C:\Users\lanica\AppData\Roaming\Titanium\mobilesdk\win32\3.1.1.v20130523170057\android\builder.py", line 2534, in [ERROR] builder.build_and_run(False, avd_id, debugger_host=debugger_host, profiler_host=profiler_host) [ERROR] File "C:\Users\lanica\AppData\Roaming\Titanium\mobilesdk\win32\3.1.1.v20130523170057\android\builder.py", line 2270, in build_and_run [ERROR] self.manifest_changed = self.generate_android_manifest(compiler) [ERROR] File "C:\Users\lanica\AppData\Roaming\Titanium\mobilesdk\win32\3.1.1.v20130523170057\android\builder.py", line 1410, in generate_android_manifest [ERROR] '-I', self.android_jar], warning_regex=r'skipping') [ERROR] File "C:\Users\lanica\AppData\Roaming\Titanium\mobilesdk\win32\3.1.1.v20130523170057\android\run.py", line 38, in run [ERROR] print "[DEBUG] %s" % subprocess.list2cmdline(args_to_log) [ERROR] File "C:\TitaniumStudio\plugins\com.appcelerator.titanium.python.win32_1.0.0.1338515509\python\lib\subprocess.py", line 580, in list2cmdline [ERROR] needquote = (" " in arg) or ("\t" in arg) or not arg [ERROR] TypeError: argument of type 'NoneType' is not iterable [ERROR] : Build process exited with code 1 [ERROR] : Project failed to build after 11s 605ms
  14. Allen Yeung 2013-05-24

    Second PR to fix this for windows: Master: https://github.com/appcelerator/titanium_mobile/pull/4329 3_1_X: https://github.com/appcelerator/titanium_mobile/pull/4330 When testing, please make sure this works on linux, windows, and osx. Note: You can build the sdk for multiple platforms by doing 'scons package_all=1'
  15. Ariel Gelbard 2013-05-24

    I copied and pasted the master code from github into androidsdk.py and is now working for me! thanks so much for your help :)
  16. Matt Langston 2013-05-24

    FR passed for https://github.com/appcelerator/titanium_mobile/pull/4329 for all platforms: Mac OSX, Linux and Windows 8 (Windows 7 not tested). FR passed for https://github.com/appcelerator/titanium_mobile/pull/4330 for all platforms: Mac OSX, Linux and Windows 8 (Windows 7 not tested).
  17. Eric Merriman 2013-05-30

    Verified fixed with r22 and r22.01 with: Mac OS 10.8.3 Safari: 6.0.4 Xcode 4.6.2 CLI: 3.1.1-alpha titanium-code-processor: 1.0.1-alpha Alloy: 1.1.3-alpha Appcelerator Studio, build: 3.1.1.201305292130 Titanium SDK version 3.1.1.v20130529114554
  18. Fred App 2013-07-15

  19. AvtarSingh Suchariya 2013-07-17

  20. Allen Yeung 2013-07-17

    Hi [~fred] and [~a.suchariya], These errors are different from the one mentioned in the ticket. If you could file a separate jira ticket for these issues with all the relevant information (repro steps, environment info, and logs), we would be happy to take a look at it then. Thanks

JSON Source