The problem comes from the fact that Android required the applications to be signed even in the debug mode. So it uses a keystore file called debug.keystore to providde keys for signing applications in debug mode. This key store file has a validity period by default 365 days from its creation date.
The First Solution:
Navigate to the .android folder in your home directory “~/.android” (Linux,Mac OS)
or c:\Documents and Settings\[User Name]\.android in windows XP
or C:\Users\.android in windows Vista or Windows 7, and delete debug.keystore file.
how to find .android folder in Linux ( UBuntu ) :
click on places menu under select home folder under then click on View Menu under click on showhiddenfiles (ctrl+h) , then u can find out .Android file
Then go to eclipse clean the project, this will create a new debug.keystore file with
default validity period 365 days.
The Second Solution:
Create a new default.keystore file with custom validity period (say 1000 days).
Navigate to the .android folder.
Delete the old default.keystore file.
We will use JDK Keytool.exe to generate the new key file. It is found in C:\Program Files\Java\jre6\bin in windows or inside the Java\jre6\bin folder in Mac OS or Linux.
Open the terminal app in Mac OS or Linux or the command prompt and navigate to keytool.exe directory.
Run the following command:
keytool -genkey -keypass android -keystore debug.keystore -alias androiddebugkey -storepass android -validity 1000 -dname “CN=Android Debug,O=Android,C=US”
This will generate a new default.keystore file with validity period 1000 days.
Copy the generated file to the .android folder, go to eclipse and clean projects and it should work.
The above command has the following options:
genkey: generates a key pair.
keystore
alias
storepass
validity
dname
0 komentar:
Post a Comment