- Step 1 1. 打開專案 (例如. TestTabIcon/build/android/AndroidManifest.xml)2. 找到以下句子並更改檔案 App 名稱 android:label="TestTabIcon" to android:label="什麼都好"3. 按下 cmd + i 在 AndroidManifest.xml 之上4. 改變權限 "sharing & permissions" 所有用戶群集都是 "只讀"Step 2 1. 打開目錄 (注: 這裡為 1.7.0 RC1) /Library/Application Support/Titanium/mobilesdk/osx/1.7.0.RC1/android2. 打開 builder.py 找到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改為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 = True3. 打開 android.py 找到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改為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 ..................................";Step 3 1. 重新安裝到模擬器上*** 註意地方 1. 找不到 AndroidManifest.xml 請還原以上步驟,先 Build 出第一次2. 找不到 Step 2 目錄 請將 1.7.0 RC 換成你的 SDK 版本再試3. 在模擬器看不到已經變更 請再嘗試安裝到真機上4. 在真機上看不到已變更 請移除原有的 App 再安裝試試
文章评论