Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14322] CLI: Setting _JAVA_OPTIONS global variable breaks building of project

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-10-19T01:24:06.000+0000
Affected Version/sRelease 3.1.1
Fix Version/s2013 Sprint 21, 2013 Sprint 21 Core, Release 3.2.0
ComponentsAndroid, Tooling
Labelsandroid, androidbuild, ay-verified, cb-verified, qe-closed-3.2.0
ReporterKhadisov Alexandr
AssigneeChris Barber
Created2013-06-20T07:29:07.000+0000
Updated2014-06-19T12:43:22.000+0000

Description

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'

Comments

  1. Allen Yeung 2013-10-19

    PR: https://github.com/appcelerator/titanium_mobile/pull/4781
  2. Lokesh Choudhary 2013-12-18

    @ Chris, Allen --- Can you please provide any test steps ?
  3. Chris Barber 2013-12-18

    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
  4. Samuel Dowse 2013-12-18

    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.

JSON Source