-
open current titanium project (e.g. TestTabIcon/build/android/AndroidManifest.xml)
-
update the app name
android:label="TestTabIcon" to android:label="什麼都好"
-
press cmd + i on AndroidManifest.xml
-
change sharing & permissions
all Names should be Read Only
/Library/Application Support/Titanium/mobilesdk/osx/1.7.0.RC1/android
Find (Line. 1060)
if new_manifest_contents != old_contents:
trace("Writing out AndroidManifest.xml")
amf = open(android_manifest,'w')
amf.write(new_manifest_contents)
amf.close()
manifest_changed = True
Change to
if new_manifest_contents != old_contents:
pass
#trace("Writing out AndroidManifest.xml")
#amf = open(android_manifest,'w')
#amf.write(new_manifest_contents)
#amf.close()
#manifest_changed = True
Find (Line. 102)
def render(self, template_dir, template_file, dest, dest_file, **kwargs):
tmpl = self.load_template(os.path.join(template_dir, 'templates', template_file))
f = None
try:
print "[TRACE] Generating %s" % os.path.join(dest, dest_file)
f = open(os.path.join(dest, dest_file), "w")
f.write(tmpl.render(config = self.config, **kwargs))
finally:
if f!=None: f.close
Change to
def render(self, template_dir, template_file, dest, dest_file, **kwargs):
tmpl = self.load_template(os.path.join(template_dir, 'templates', template_file))
f = None
if dest_file != "AndroidManifest.xml":
try:
print "[TRACE] Generating %s" % os.path.join(dest, dest_file)
f = open(os.path.join(dest, dest_file), "w")
f.write(tmpl.render(config = self.config, **kwargs))
finally:
if f!=None: f.close
else:
print "[TRACE] Skip AndroidManifest.xml ..................................";
Try to build on device again
-
Can not found AndroidManifest.xml
Please recovery all step and build once after to try again
-
Can not found the direcotry
In this case, it is 1.7.0 RC1, please change your current titanium version and try again
-
Can not see the change on emulator
Please try to install on device
-
Can not see the change on device
Please try to install on device and make sure the exists app was deleted first