GLBasic forum

Main forum => GLBasic - en => Topic started by: MrTAToad on 2012-Apr-24

Title: Android debug certificate has expired!
Post by: MrTAToad on 2012-Apr-24
It appears that the Android debug certificate has expired (Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:278: com.android.sdklib.build.ApkCreationException: Debug Certificate expired on 24/04/12 00:28) - this happens in both V10 and the  V11 beta and prevents the debug application from being made, and stops the application being installed on the device.
Title: Re: Android debug certificate has expired!
Post by: Kitty Hello on 2012-Apr-24
Yes. I fixed that!!

I did this:
Code (glbasic) Select

C:\Users\GF\.android>"c:\Program Files (x86)\Java\jdk1.6.0_24\bin\keytool.exe"-genkey -keypass android -keystore debug.keystore -alias androiddebugkey -storepass android -validity 1000 -dname "CN=Android Debug,O=Android,C=US"


The file debug.keystore will be created in C:\Users\<username>\.android (which is a hidden directory)
Title: Re: Android debug certificate has expired!
Post by: MrTAToad on 2012-Apr-24
I'll try that

Yes, that's fine!
Title: Re: Android debug certificate has expired!
Post by: ChristianB on 2012-Apr-26
I tried your solution
And still have problems:
I opened a command prompt as administrator, changed direcory to c:\users\[my current logged in user]\.android
and executed:
"C:\Program Files (x86)\Java\jdk1.6.0_31\bin\keytool.exe" -genkey -keypass android -keystore debug.keystore -alias androiddebugkey -storepass android -validity 1000 -dname "CN=Android debug,O=Android,C=US"

First it complained that the key already existed, sp I removed it with -delete switch and executed:
"C:\Program Files (x86)\Java\jdk1.6.0_31\bin\keytool.exe" -genkey -keypass android -keystore debug.keystore -alias androiddebugkey -storepass android -validity 1000 -dname "CN=Android debug,O=Android,C=US"

When I used the switch -list I can see the key.

When I compile I get following error.


*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.9.829 SN:86a45f58 - 3D, NET
Wordcount:345 commands
compile+link:
running Android build-script...
BUILD STAGE 1: Compile and pack RELEASE
     [echo] Gathering info for glbasic...
     [echo] Creating output directories if needed...
     [echo] ----------
     [echo] Handling aidl files...
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [echo] No key.store and key.alias properties found in build.properties.
     [echo] Please sign L:\Code\GLBasic\BubblePop\distribute\Android\bin\glbasic-release-unsigned.apk manually
     [echo] and run zipalign from the Android SDK tools.

BUILD SUCCESSFUL
Total time: 5 seconds
.
BUILD STAGE 2: Build DEBUG and install on device
     [echo] Gathering info for glbasic...
     [echo] Creating output directories if needed...
     [echo] ----------
     [echo] Handling aidl files...
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [echo] Debug Package: L:\Code\GLBasic\BubblePop\distribute\Android\bin\glbasic-debug.apk
     [echo] Installing L:\Code\GLBasic\BubblePop\distribute\Android\bin\glbasic-debug.apk onto default emulator or device...

BUILD FAILED
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:1100: The following error occurred while executing this line:
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:1114: exec returned: 1
Title: Re: Android debug certificate has expired!
Post by: ChristianB on 2012-Apr-26
Problem solved, it worked after restart of phone....
Title: Re: Android debug certificate has expired!
Post by: bigsofty on 2012-Apr-27
I just got my first Android device today and I am in the process of installing JSDK 7 and Android SDK as I type, should I just use the latest V11 beta or the above fix for V10?
Title: Re: Android debug certificate has expired!
Post by: Wampus on 2012-Apr-29
Don't use JDK 7! It has problems that need ironing out. It gave me a real hard time, especially mixing 32bit and 64bit versions.

Uninstall it completely then install the latest JDK 6.
Title: Re: Android debug certificate has expired!
Post by: PaLe on 2013-Mar-17
Hi there,

(translated with Google)  ;)

I have always compiled on Android with GLBasic without problems,
But yesterday I discovered, unfortunately, have expired certificates.
I followed this post but without success.  :(
I get this message after compilation.


_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.9.829 SN:13f2e703 - 3D, NET
Wordcount:138 commands
compile+link:
running Android build-script...
BUILD STAGE 1: Compile and pack
     [echo] Creating output directories if needed...
     [echo] Compiling aidl files into Java classes...
     [echo] Compiling RenderScript files into Java classes and RenderScript bytecode...
     [echo] Generating R.java / Manifest.java from the resources...
     [echo] Converting compiled files and external libraries into C:\lebbo\POINT\distribute\Android\bin\classes.dex...
     [echo] Packaging resources
     [echo] No key.store and key.alias properties found in build.properties.
     [echo] Please sign C:\lebbo\POINT\distribute\Android\bin\glbasic-unsigned.apk manually
     [echo] and run zipalign from the Android SDK tools.


BUILD SUCCESSFUL
Total time: 8 seconds
BUILD STAGE 2: Install on device
     [echo] Creating output directories if needed...
     [echo] Compiling aidl files into Java classes...
     [echo] Compiling RenderScript files into Java classes and RenderScript bytecode...
     [echo] Generating R.java / Manifest.java from the resources...
     [echo] Converting compiled files and external libraries into C:\lebbo\POINT\distribute\Android\bin\classes.dex...
     [echo] Packaging resources
     [echo] Running zip align on final apk...
     [echo] Debug Package: C:\lebbo\POINT\distribute\Android\bin\glbasic-debug.apk
     [echo] Installing C:\lebbo\POINT\distribute\Android\bin\glbasic-debug.apk onto default emulator or device...

BUILD SUCCESSFUL
Total time: 13 seconds
finished Android build-script.
Android=C:\lebbo\POINT\distribute\Android
success
_______________________________________
*** Finished ***
Elapsed: 37.8 sec. Time: 14:00
Build: 1 succeeded.


Apk file is not installed on the device, I think I understand that the APK file is not properly signed (bold lines)

Windows 7 (EN)
JavaSDK 1.6.0_30
Glbasic 10.283 and 11.261

Suggestions?
Reinstall the current SDK or a better version? or... I have to change some parameters in the command I used?
Code (glbasic) Select
C:\Users\Administrator\.android>"c:\Program Files\Java\jdk1.6.0_30\bin\keytool.exe" -genkey -keypass android -keystore debug.keystore -alias androiddebugkey -storepass android -validity 1000 -dname "CN=Android Debug,O=Android,C=US"

Thanks, and Happy ST Patrick Day  :booze:
Title: Re: Android debug certificate has expired!
Post by: PaLe on 2013-Mar-17
Solved!,

Sorry for the trouble... 

mistake novices ... My other application on the device with the same name :whistle: