I installed the Android SDK and Eclipse on OSX. When I check my ~/.android folder there is no debug.keystore. My understanding though is that it gets created when you run, build, or clean. I create a simple HelloWorld project and set up my run configurations. When I try to run I see the following error:
Error generating final archive: Unable t开发者_如何学Co get debug signature key HelloAndroid Unknown Android Packaging Problem
I then see that the debug.keystore still isn't created.
For anyone else out there that this happens to... it was a permissions problem on the .android folder. For some reason I didn't have write access to the folder and subfolders set.
I too had the error
Error generating final archive: Unable to get debug signature key
It seemed I did not have a default keystore. So I created one.
It still didn't work even though I noticed in my Eclipse Preferences
in Android > Build
that my default keystore was recognized.
When I chose it AGAIN as my custom
keystore, I got an error saying
can't find debug key in keystore
which then brought to my attention although I created the key store, I had not created the debug key that is contained within.
I went back to my terminal application and entered:
keytool -keygen -v -keystore debug.keystore -alias androiddebugkey -storepass android
from within my .android
directory, and all was good.
Macintosh OSX 10.8.2 Mountain Lion, Eclipse v3.7.2 Juno Android
I had a similar issue, and Jody G's fix pointed me in the right direction. In my case, debug.keystore existed, but it was a symlink pointing to a file that had been deleted. Getting rid of the symlink forced Eclipse to regenerate the file.
Make sure you have the following:
- keystore is in .android/debug.keystore and is readable
- .android is writtable
- keystore password is "android"
- key alias is androiddebugkey
- no password on the key (to remove a password on a key, set the password to the same password as the keystore itself, here: "android").
精彩评论