Problem
I have option _JAVA_OPTIONS set to -Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel to make all java apps looks like GTK apps
That gives some grave probems when trying to build any android (or probably any java related project).
After that variable set any java app would give this info message:
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
which breaks python parser inside android/avd.py. (See logs)
Usetting _JAVA_OPTIONS fixes problem.
That's pretty infamous " AttributeError: 'NoneType' object has no attribute 'split' " problem, that show weakness of python parsers written
Logs
[ERROR] Exception occured while building Android project:
[ERROR] Traceback (most recent call last):
[ERROR] File "/home/khades/.titanium/mobilesdk/linux/3.1.1.GA/android/builder.py", line 2604, in <module>
[ERROR] builder.build_and_run(True, avd_id, device_args=device_args, debugger_host=debugger_host, profiler_host=profiler_host)
[ERROR] File "/home/khades/.titanium/mobilesdk/linux/3.1.1.GA/android/builder.py", line 2321, in build_and_run
[ERROR] for avd_props in avd.get_avds(self.sdk):
[ERROR] File "/home/khades/.titanium/mobilesdk/linux/3.1.1.GA/android/avd.py", line 23, in get_avds
[ERROR] for line in run.run([sdk.get_android(),'list','target'],debug=False).split("\n"):
[ERROR] AttributeError: 'NoneType' object has no attribute 'split'
PR: https://github.com/appcelerator/titanium_mobile/pull/4781
@ Chris, Allen --- Can you please provide any test steps ?
To test: 1) create an Android app 2) create an environment variable "_JAVA_OPTIONS" and set to "-Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel" 3) build the app for any target
Verified fixed on: Ubuntu 12.04 LTS Linux Titanium SDK, build: 3.2.0.v20131212122847 CLI: 3.2.0-cr3 Alloy: 1.3.0-cr Followed test instructions provided by [~cbarber]. Created Android App and added _JAVA_OPTIONS to the .bashrc with the set variables provided. Running adb from terminal shows that the _JAVA_OPTIONS variables are being detected. Built and installed the application to device and emulator successfully. Closing.