所以我点击Run,这就是我得到的错误:
[INFO] : Determining signature algorithm: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/keytool "-J-Duser.language=en" "-v" "-list" "-keystore" "/Users/johndoe/Library/Application Support/Titanium/mobilesdk/osx/3.2.2.GA/android/dev_keystore" "-storepass" "*******" "-alias" "tidev"
[INFO] : Using MD5withRSA signature algorithm
[INFO] : Signing apk: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/jarsigner "-sigalg" "MD5withRSA" "-digestalg" "SHA1" "-keystore" "/Users/johndoe/Library/Application Support/Titanium/mobilesdk/osx/3.2.2.GA/android/dev_keystore" "-storepass" "*******" "-signedjar" "/Users/johndoe/Documents/Titanium_Studio_Workspace/TestApp/build/android/bin/TestApp.apk" "/Users/johndoe/Documents/Titanium_Studio_Workspace/TestApp/build/android/bin/app-unsigned.apk" "tidev"
[ERROR] Application Installer abnormal process termination. Process exit value was 8
[INFO] : Aligning zip file: null "-v" "4" "/Users/johndoe/Documents/Titanium_Studio_Workspace/TestApp/build/android/bin/TestApp.apk" "/Users/johndoe/Documents/Titanium_Studio_Workspace/TestApp/build/android/bin/TestApp.apkz"
/usr/local/lib/node_modules/titanium/node_modules/longjohn/dist/longjohn.js:185
throw e;
^
TypeError: Bad argument
at ChildProcess.spawn (child_process.js:915:24)
at exports.spawn (child_process.js:715:9)
at Object.run (/Users/johndoe/Library/Application Support/Titanium/mobilesdk/osx/3.2.2.GA/node_modules/node-appc/lib/subprocess.js:47:14)
at AndroidBuilder.<anonymous> (/Users/johndoe/Library/Application Support/Titanium/mobilesdk/osx/3.2.2.GA/android/cli/commands/_build.js:3954:20)
at /usr/local/lib/node_modules/titanium/lib/hook.js:256:13
at /usr/local/lib/node_modules/titanium/node_modules/async/li
我尝试手动执行有问题的语句,但是我得到了同样的错误。
起初我认为我的密钥库已损坏,因此我使用此测试:
keytool -list -keystore "/Users/johndoe/Library/Application Support/Titanium/mobilesdk/osx/3.2.2.GA/android/dev_keystore"
我输入密码&#34; tirocks&#34;,并列出1个条目。所以它不是密码问题或密钥库已损坏。
任何人都知道发生了什么?
答案 0 :(得分:3)
圣洁的抽烟,我解决了它,我把所有的头发拉出来试图解决它。
问题不在于签署apk,而是在下一行,使用zipalign工具。
在执行开始时它给了我一条错误信息,但我一直在忽略这条信息。
最后我决定处理它,结果证明这是问题的原因。
所以基本上,我将zipalign文件从平台工具(它在几个文件夹中,只是搜索它)复制到SDK中的/ tools文件夹。
现在它正在工作!
并且非常高兴......