My projects worked fine until today. Now when I compile them I get the following:
[ERROR] Exception occured while building Android project: [ERROR] Traceback (most recent call last): [ERROR] File "C:\ProgramData\Titanium\mobilesdk\win32\1.6.2\android\builder.py", line 1646, in <module> [ERROR] s.build_and_run(False, avd_id) [ERROR] File "C:\ProgramData\Titanium\mobilesdk\win32\1.6.2\android\builder.py", line 1407, in build_and_run [ERROR] compiler.compile() [ERROR] File "C:\ProgramData\Titanium\mobilesdk\win32\1.6.2\android\compiler.py", line 239, in compile [ERROR] js_contents = self.make_function_from_file(fullpath, pack=False) [ERROR] File "C:\ProgramData\Titanium\mobilesdk\win32\1.6.2\android\compiler.py", line 183, in make_function_from_file [ERROR] file_contents = codecs.open(path,'r',encoding='utf-8').read() [ERROR] File "C:\ProgramData\Titanium\modules\win32\python\1.0.0\lib\codecs.py", line 618, in read [ERROR] return self.reader.read(size) [ERROR] File "C:\ProgramData\Titanium\modules\win32\python\1.0.0\lib\codecs.py", line 424, in read [ERROR] newchars, decodedbytes = self.decode(data, self.errors) [ERROR] UnicodeDecodeError: 'utf8' codec can't decode byte 0x92 in position 549: unexpected code byte
The really strange part is that if I make a new project it compiles. Then, I moved the files from the used to work project over to the new project one at a time to see which one is causing Titanium to crash. Once it crashes, I removed the possibly bad file from the project directory. It still does not compile.
I even reverted the code and file structure of the new project back to the starter code which should work perfectly and I still get this crash. Has anyone experienced something like this before?
BTW I don't have any crazy libraries or extensions installed. Just the Titanium and Android SDK. Yes I already copied the adb file over to tools.
1 Answer
Accepted Answer
Okay I just got this fixed. I think the secret was simply to calm down first. My problem was indeed an illegal utf-8 character.
I suggest you either comb your files for suspect characters or convert your files to utf-8 in your IDE. If it doesn't work after conversion you'll need to go through all of your files manually.
Hope you get it fixed.
Your Answer
Think you can help? Login to answer this question!