Titanium SDK 3.1.0 [ERROR] TypeError: argument of type 'NoneType' is not iterable on building android app

You must Login before you can answer or comment on any questions.

Hi,

I´m trying to run an android app with Alloy framework and got this error:

[TRACE] Writing out AndroidManifest.xml
[ERROR] Exception occured while building Android project:
[ERROR] Traceback (most recent call last):
[ERROR]   File "C:\Users\Paulo\AppData\Roaming\Titanium\mobilesdk\win32\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 "C:\Users\Paulo\AppData\Roaming\Titanium\mobilesdk\win32\3.1.0.GA\android\builder.py", line 2264, in build_and_run
[ERROR]     self.manifest_changed = self.generate_android_manifest(compiler)
[ERROR]   File "C:\Users\Paulo\AppData\Roaming\Titanium\mobilesdk\win32\3.1.0.GA\android\builder.py", line 1404, in generate_android_manifest
[ERROR]     '-I', self.android_jar], warning_regex=r'skipping')
[ERROR]   File "C:\Users\Paulo\AppData\Roaming\Titanium\mobilesdk\win32\3.1.0.GA\android\run.py", line 38, in run
[ERROR]     print "[DEBUG] %s" % subprocess.list2cmdline(args_to_log)
[ERROR]   File "C:\Users\Paulo\AppData\Local\Titanium Studio\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 9s 904ms
I found some questions about the same issue for the SDK 1.8.0, but none for the 3.1.0, so here I am.

I'm on Windows 7 32bits and all the android SDK's are correctly installed and the emulator runs normally.

Can someone help me?

Thank you!

— asked 12 months ago by Paulo Silva
5 Comments
  • Since updating the android sdk and titanium yesterday I have been unable to build either. And it results in the same error.

    — commented 12 months ago by rowan smith

  • this seems to be a very frustrating bug!

    — commented 12 months ago by Keith Levi Lumanog

  • I am also having this exact same issue... any guidance would be appreciated.

    — commented 12 months ago by Vissu Sri

  • Show 2 more comments

14 Answers

Accepted Answer

Seems build tools got moved to another directory with the latest Android SDK update. Created symlinks to aapt and dx in /Applications/Android-sdk/platform-tools:

ln -s /Applications/Android-sdk/build-tools/17.0.0/aapt aapt ln -s /Applications/Android-sdk/build-tools/17.0.0/dx dx

This solved it for me (after some digging in their Python code).

— answered 12 months ago by Andrey Chirikba
answer permalink
18 Comments
  • Should read "Create symlinks"

    — commented 12 months ago by Andrey Chirikba

  • works fine

    — commented 12 months ago by Vissu Sri

  • Hello, adding Andrey commands worked well. Thank you very much.

    — commented 12 months ago by Andres Ortega

  • Show 15 more comments

I simply copied all the files from build-tool/17.0.0/ to platform-tools

This worked for me :)

— answered 12 months ago by Kunal Sagar
answer permalink
12 Comments
  • Also possible, you would only need to do this every time you update the build tools ;)

    — commented 12 months ago by Andrey Chirikba

  • Hi all, I have created two links for aapt and dx from build-tool/17.0.0/ in platform-tools directory

    All is ok for me no more erros during compilation :-)

    — commented 12 months ago by Jean-Charles KHALIFA

  • I made same, and working, 10x

    — commented 11 months ago by Florin Colotin

  • Show 9 more comments

I have had the issue described here. I am running on windows 7 so linking to the missing files was not an option. My Android SDK is located in c:\android. So based on Andrey's post above I copied the following files:

C:\Android\build-tools\17.0.0\aapt.exe to C:\Android\platform-tools\aapt.exe
C:\Android\build-tools\17.0.0\dx.bat  to  C:\Android\platform-tools\dx.bat
C:\Android\build-tools\17.0.0\lib  to  C:\Android\platform-tools\lib
I then cleaned the project and rebuilt and everything is now working.

— answered 11 months ago by John Comerford
answer permalink
8 Comments
  • Yes, moving the files work to, but like Andrey said, you gonna need do this again every time you update your Android SDK, so you can follow this link http://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/ to make syslinks on windows

    — commented 11 months ago by Paulo Silva

  • Thanks a lot!!

    I had the same problem on my mac, desprately i installed windows in virtualbox and also the same problem, but this solution fixed it for me :-) !!

    — commented 11 months ago by Erik Eisinga

  • Hi, I just follow as you mentioned and it works for me. Thanks

    — commented 11 months ago by Nouman Arshad

  • Show 5 more comments

I used symlinks under windows, this works to. I guess symlink.exe is available for cli, but I used the Link Shell Extension: http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html

When installed, just

  • go to build-tools\17.0.0,
  • select lib, aapt AND dx,
  • right click and choose 'Pick link source'
  • go to platform-tools
  • right click in this window
  • choose drop as -> symbolic link
— answered 11 months ago by Jelmer Jellema
answer permalink
2 Comments
  • worked for me! Thanks Jelmer. These problems make the platform lose stability. I lost a day's work for an Android update. I think I'll have to stop being lazy and get me to the world of java: P

    — commented 11 months ago by soporte loco

  • I had Titanium installed for a while and made my Hello World. But now i suddenly had to fix someone elses project. Took me two days to get the app started in the emulator. Of course Titanium builds 'native' apps, but it should have a one click installer (like sencha architect does). I don't want to wrestle with all the different components. Those are open source, right? Include them!

    But well, bit off topic.

    — commented 11 months ago by Jelmer Jellema

Hello. Yesterday Android actualize it offered updates since then to run any application with the Android emulator does not work and the console shows the following error:

Titanium Command-Line Interface, CLI version 3.1.0, Titanium SDK version 3.1.0.GA Copyright (c) 2012-2013 Appcelerator, Inc. All Rights Reserved. Please report bugs to http://jira.appcelerator.org/ [INFO]: Running emulator process: python "/ Users / AOH / Library / Application Support/Titanium/mobilesdk/osx/3.1.0.GA/android/builder.py" "emulator" "gpvComercial" "/ Users / AOH / Documents/SDK/Android/adt-bundle-mac-x86_64/sdk "" / Users / AOH / Documents / Titanium Studio Workspace AOH / gpvComercial "" com.appcelerator.gpvComercial "" 12 "" QVGA "" armeabi-v7a " [INFO]: Running build process: python "/ Users / AOH / Library / Application Support/Titanium/mobilesdk/osx/3.1.0.GA/android/builder.py" "simulator" "gpvComercial" "/ Users / AOH / Documents/SDK/Android/adt-bundle-mac-x86_64/sdk "" / Users / AOH / Documents / Titanium Studio Workspace AOH / gpvComercial "" com.appcelerator.gpvComercial "" 12 "" QVGA " [INFO] logfile = / Users / AOH / Documents / Titanium Studio Workspace AOH / gpvComercial / build.log [INFO] Building gpvComercial for Android ... one moment [INFO]: Emulator is running [INFO] Titanium SDK version: 3.1.0 (04/15/13 18:45 57634ef) [INFO] Copying ... CommonJS modules [INFO] Copying project resources .. [INFO] Tiapp.xml unchanged, skipping class generation [INFO] Compiling Javascript Resources ... [ERROR] Error generating R.java from manifest [ERROR]: Build process exited with code 1 [ERROR]: Project failed to build after 959ms

I guess we can not run applications until this situation can be corrected.

How can you go back to the previous situation?.

Greetings.

— answered 12 months ago by Andres Ortega
answer permalink
1 Comment
  • I got this "Error generating R.java from manifest" too when runing the project without "clean" it, guess it's a side effect of the original error.

    — commented 12 months ago by Paulo Silva

I have the same problem friends

WINDOWS 7-

uild_and_run(True, avd_id, device_args=device_args, debugger_host=debugger_host, profiler_host=profiler_host) [ERROR] File "E:\Users\WRL\AppData\Roaming\Titanium\mobilesdk\win32\3.1.0.GA\android\builder.py", line 2264, in build_and_run [ERROR] self.manifest_changed = self.generate_android_manifest(compiler) [ERROR] File "E:\Users\WRL\AppData\Roaming\Titanium\mobilesdk\win32\3.1.0.GA\android\builder.py", line 1404, in generate_android_manifest [ERROR] '-I', self.android_jar], warning_regex=r'skipping') [ERROR] File "E:\Users\WRL\AppData\Roaming\Titanium\mobilesdk\win32\3.1.0.GA\android\run.py", line 38, in run [ERROR] print "[DEBUG] %s" % subprocess.list2cmdline(args_to_log) [ERROR] File "E:\Python27\lib\subprocess.py", line 587, 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 12s 646ms

— answered 11 months ago by soporte loco
answer permalink
2 Comments
  • Read my comment on the accepted answer, it should work!

    — commented 11 months ago by Paulo Silva

  • I had the same issue on windows 7, I have posted a list of files to copy for windows on this thread

    — commented 11 months ago by John Comerford

any solution available for windows 8 (Pro 64bit). done all above advices without success. node.0.8.22 was installed, android sdk most ecent ones and all 2.x installed. did test it with .lnk within explorer and also from cli with mklink /D to create symlinks as Admin. all no success. will uninstall all now and try it with default installation but without any update... ;-(

To be honest its an absolut nonstarter if I have to struggle for days now to get a bloody simple helo world sample up and running - which I now it was running 4 days ago. It is stated in the starting do to keep you installation always uptodate... thanks ... it seems that this is equivalent to play beta tester.

Georg

— answered 11 months ago by Georg Kaefer
answer permalink
1 Comment
  • ok: the solution for me was: primary the tip of copying the files. symlinks did not work on my win8. AND I had to copy all content of the mentioned directory inclkuding all subdir and overwriting existing files too.

    — commented 11 months ago by Georg Kaefer

I am having the same issue with MAC 10.8.4 . I tried all the steps mentioned above but not able to fix the issue.

Titanium Command-Line Interface, CLI version 3.1.1, Titanium SDK version 3.0.2.GA
Copyright (c) 2012-2013, Appcelerator, Inc.  All Rights Reserved.
Please report bugs to http://jira.appcelerator.org/
[INFO] logfile = /Volumes/Data/IDE_Workspaces/Titanium_Studio_Workspace/TestApp/build.log
[INFO] Building TestApp for Android ... one moment
[INFO] Titanium SDK version: 3.0.2 (02/15/13 19:02 5a77fe7)
[INFO] Waiting for the Android Emulator to become available
[INFO] Fastdev server running, deploying in Fastdev mode
[INFO] Copying CommonJS modules...
[INFO] Copying project resources..
[INFO] Tiapp.xml unchanged, skipping class generation
[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 "/Users/XXX/Library/Application Support/Titanium/mobilesdk/osx/3.0.2.GA/android/builder.py", line 2392, in <module>
[ERROR]     builder.build_and_run(False, avd_id, debugger_host=debugger_host)
[ERROR]   File "/Users/XXX/Library/Application Support/Titanium/mobilesdk/osx/3.0.2.GA/android/builder.py", line 2141, in build_and_run
[ERROR]     self.manifest_changed = self.generate_android_manifest(compiler)
[ERROR]   File "/Users/XXX/Library/Application Support/Titanium/mobilesdk/osx/3.0.2.GA/android/builder.py", line 877, in generate_android_manifest
[ERROR]     self.generate_localizations()
[ERROR]   File "/Users/XXX/Library/Application Support/Titanium/mobilesdk/osx/3.0.2.GA/android/builder.py", line 1404, in generate_localizations
[ERROR]     doc = parseString(contents.encode("utf-8"))
[ERROR]   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/dom/minidom.py", line 1924, in parseString
[ERROR]     return expatbuilder.parseString(string)
[ERROR]   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/dom/expatbuilder.py", line 940, in parseString
[ERROR]     return builder.parseString(string)
[ERROR]   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
[ERROR]     parser.Parse(string, True)
[ERROR] ExpatError: not well-formed (invalid token): line 126, column 122
[ERROR] :  Project failed to build after 26s 826ms
Android SDK having folder ANDROID_SDK/build-tools/android-4.2.2.

Again I tried to created all the Symbolic link to ANDROID_SDK/platform-tools/ , I also tried to copy all the files from android-4.2.2 to platform-tools but none of them was working.

Can any one help me in this.

Thanks a lot in advance.

— answered 10 months ago by AvtarSingh Suchariya
answer permalink
1 Comment
  • Resolved the issue. Description of that as following.

    The same issue I was facing and resolved. The problem was I added Projct > i18n > en > string.xml file and one of the string contains & sign. I removed and the project was running smoothly.

    — commented 10 months ago by AvtarSingh Suchariya

For W7 see: http://developer.appcelerator.com/question/159218/python-type-error-w7

For W7 see: http://developer.appcelerator.com/question/159218/python-type-error-w7

Hi Paulo, Can you Check your Node.JS and NMP version, make sure it is 0.8.xx not the latest one. as latest one is not compatible with titanium SDK 3.1.GA and create issue like this.

Hello, I am having the same problem yesterday after downloading a new update of android sdk. Already tried everything and so far nothing!!

My boss does not understand! Think it's my fault!

If someone can please post here! grateful

— answered 12 months ago by Celio Azevedo
answer permalink
9 Comments
  • See my answer above, it should solve it.

    — commented 12 months ago by Andrey Chirikba

  • works fine for me

    — commented 12 months ago by Vissu Sri

  • I try but....

    Unable to access jarfile Andorid\platform-tools\lib\dx.jar

    — commented 12 months ago by Celio Azevedo

  • Show 6 more comments

Your Answer

Think you can help? Login to answer this question!