View unanswered posts | View active topics



Reply to topic  [ 5 posts ] 
APK generation fails on a single project 
Author Message
Member

Joined: Wed Feb 22, 2017 9:37 am
Posts: 3
Since a few days, I can't generate an APK file anymore.
The first strange thing is that the issue is only happening on this project, not on the others.
The second strange thing is that I still can generate an IPA file within the same project.

The certificate for this project is 2 years old, but was generated with a 30 years validity.

EDIT :
creating a fresh project and using the existing source files + certificate + options in .bat files below doesn't change anything
/EDIT

.NET 4.0
FlashDevelop 5.2.0.3 (fresh re-install)
flex/air sdk 4.6.0+23.0.0

Output :
Code:
Packaging publication\apk\[...].apk using certificate "bat\Android.p12"...
unable to load a certificate in this file
usage:
[adt usage]


Extracted code from my .bat files :

SetupApplication.bat :
Code:
:: Android
set CERT_FILE="bat\Android.p12"
set CERT_PASS=[...]
set SIGNING_OPTIONS_APK=-target apk-captive-runtime -storetype pkcs12 -keystore %CERT_FILE% -storepass %CERT_PASS%

:: iOS
set APPLE_CERT_FILE="bat\ios_dev.p12"
set APPLE_CERT_PASS=[...]
set APPLE_PROVISION="bat\dev.mobileprovision"
set SIGNING_OPTIONS_IPA=-target ipa-test -storetype pkcs12 -keystore %APPLE_CERT_FILE% -storepass %APPLE_CERT_PASS% -provisioning-profile %APPLE_PROVISION%

:: Application descriptor
set APP_XML=application.xml
set APPLE_APP_XML=bin/application_ios.xml

:: Files to package
set APP_DIR=bin
set FILE_OR_DIR=-C %APP_DIR% .


SetupSDK :
Code:
:: Path to Flex SDK
set FLEX_SDK=W:\Dev\SDK and Compiler\4.6.0+23.0.0

:: Use FD supplied SDK path if executed from FD
if exist "%FD_CUR_SDK%" set FLEX_SDK=%FD_CUR_SDK%


PackagerApk.bat :
Code:
:: Package
echo.
echo Packaging %OUTPUT% using certificate %CERT_FILE%...
call adt -package %SIGNING_OPTIONS_APK% %OUTPUT% %APP_XML% %FILE_OR_DIR%


PackagerIpa.bat :
Code:
:: Package
echo.
echo Packaging %OUTPUT% using certificate %APPLE_CERT_FILE%...
call adt -package %SIGNING_OPTIONS_IPA% %OUTPUT% %APPLE_APP_XML% %FILE_OR_DIR%


Wed Feb 22, 2017 10:08 am
Profile
Member

Joined: Tue Jun 30, 2009 8:06 pm
Posts: 202
I recently encountered this problem as well with self signed certificates. It's related to your version of Java - if got the problem with Java 1.8 - 121 - by reverting to 1.8 - 111 the problem disappeared.


Mon Feb 27, 2017 8:33 pm
Profile
Member

Joined: Wed Feb 22, 2017 9:37 am
Posts: 3
Thank you very much, I was using 1.8.0_121, changing to 1.8.0_101 (I already had it installed) solved my problem.

For reference :

"Something" installed jre1.8.0_121 where I already had jdk1.8.0_101.
My %PATH% also got updated, removing the path to the jdk and replacing it with this path : "C:\ProgramData\Oracle\Java\javapath", this folder contains symlink to java.exe javaw.exe and javaws.exe in the jre1.8.0_121 folder.

Before this solution, I tried to set java.home in my jvm.config, but it didn't work, only updating my %PATH% worked.


Tue Feb 28, 2017 10:48 am
Profile
Member

Joined: Tue Jun 30, 2009 8:06 pm
Posts: 202
I'ts a horrible solutions. Hopefully it is addressed in the next version of Java.


Tue Feb 28, 2017 5:47 pm
Profile
Member

Joined: Wed Feb 22, 2017 9:37 am
Posts: 3
Adrien wrote:
My %PATH% also got updated, removing the path to the jdk and replacing it with this path : "C:\ProgramData\Oracle\Java\javapath", this folder contains symlink to java.exe javaw.exe and javaws.exe in the jre1.8.0_121 folder.


This wasn't me doing it. The jre installation did. I updated Windows 10 via Windows Update, maybe this is what made this change.

What I did was removing "C:\ProgramData\Oracle\Java\javapath" in my %PATH% and adding "C:\Program Files (x86)\Java\jdk1.8.0_101\jre\bin"


Wed Mar 01, 2017 10:43 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.