Post Q&A‎ > ‎

Error: Error generating final archive: Debug Certificate expired

posted Oct 24, 2010, 9:36 PM by Chakchai So-In   [ updated Oct 24, 2010, 9:41 PM ]
Follow link below:
http://www.sourcecode.in.th/articles.php?id=70
OR
http://code.google.com/p/android/issues/detail?id=834
------------
Improper Windows system locale cause Eclipse to not build the APK file.

The problem seems to be affected with any project that is created when the
Windows system locale/location is not English, United States.

The most simplest project as "Hello Android" also suffering from this problem.

This will cause the Debug Certificate to expire, so the .apk won't be
built, and Console panel will show the error:

[2008-08-27 10:01:43 - HelloAndroid] Could not find HelloAndroid.apk!

System Informations:
Operating System: Windows XP SP2
Android SDK: Windows 0.9 beta
Java: Sun Java 6 update 7
Eclipse: 3.4
ADT: 0.7

Step to reproduce the problem:

1. In Control Panel > Regional and Language Options, change the following
options
Standards and formats: Thai
Location: Thailand

2. Delete file debug.keystore in C:\Documents and Settings\<user>\Local
Settings\Application Data\Android

3. Create a new project in Eclipse with the following settings
Project Name: HelloAndroid
Contents: Create new project in workspace
Package Name: com.hello.android
Activity Name: HelloAndroid
Application Name: Hello, Android

4. After the project has been created, try to build the project (if Build
Automatically option is not checked) an error will show up in the Problem panel

Description: Error generating final archive: Debug Certificate expired on
8/27/52 11:22 PM!
Resource: HelloAndroid
Path:
Location: Unknown
Type: Generic ADT Problem

4. Create a new run configuration with launch action set to "Launch Default
Activity"

5. Click Apply, Run

6. There will be an error in the Console panel.

[2008-08-27 23:35:59 - HelloAndroid] ------------------------------
[2008-08-27 23:35:59 - HelloAndroid] Android Launch!
[2008-08-27 23:35:59 - HelloAndroid] adb is running normally.
[2008-08-27 23:35:59 - HelloAndroid] Could not find HelloAndroid.apk!


Solution:

1. Change Windows system locale to
Standards and formats: English (United States)
Location: United States

2. Delete file debug.keystore in C:\Documents and Settings\<user>\Local
Settings\Application Data\Android

3. Create project (or clean the existing), build/re-build and run the
project. The emulator should start, boot and run the HelloAndroid
application properly.

Now changing Windows system locale/location back to the previous settings
will not cause this problem anymore unless the debug.keystore file is deleted.

The problem seems to be the generated debug.keystore file is invalid or
corrupted when the system locale/location is not English, United States.

So it would be greate if this is fixed, or at least give the solution for
the developers out there who do not use en-us (or use th-th) locale/location.


Comments