简体   繁体   中英

Troubles with Embarcadero XE6 - Delphi XE6 developing apps

I have the Embarcadero XE6, but use only the Delphi XE6. When I run my app Delphi project, it compiles correctly, but when Delphi attempts to install this app directly on the device SDK ADV or a physical device, the following error occurs:

Unable to create process: Unable to install ''. Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]

So I created a batch file, so that my app stay certificate, and only this way can manually install on mobile device.

The batch file contains:

cd\
D:
cd Program Files
cd Java
cd jdk1.7.0_25
cd bin
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore -storepass android D:\DelphiPrograms\App01\Android\Debug\MyApp\bin\MyApp.apk androiddebugkey
cd\
D:
cd Users
cd Public
cd Documents
cd Embarcadero
cd Studio
cd 14.0
cd PlatformSDKs
cd adt-bundle-windows-x86-20131030
cd sdk
cd platform-tools
adb -s emulator-5554 install -r D:\DelphiPrograms\App01\Android\Debug\MyApp\bin\MyApp.apk
pause

But whenever change the app, I have to run this batch file, and I see that dont need nothing of this. Delphi automatically installs the app into device.

Note: when I installed Embarcadero XE6, ZipAlign.exe the file did not exit, and zipalign.bat was empty, so I copied the ZipAlign.exe from internet, and also copied the batch file commands from the internet.

My file ZipAllign.bat contains the following command lines:

@echo off
REM Batch file to recursively zip align *.apk files in a directory
REM and its sub-directories. This is significantly easier and faster
REM than manually zip aligning them.
@echo Zip aligning now...
for /R %%X in (*.apk) do zipalign 4 "%%X" "%%~dpX%%~nX.new"
@echo Replacing non-aligned files with zip aligned files...
for /R %%X in (*.new) do move /Y "%%X" "%%~dpX%%~nX.apk"
@echo Zip aligning done, press any key to exit
pause

But the error keeps, and can not run the app in Delphi for the SDK device directly, without having to run the batch file I created for my app to be certified.

Does ZipAllign.bat file is complete or missing some command lines?

Click Run|Parameters...

Put -cleaninstall in the Parameters box.

If you have an old version of the APK (from say XE5) on the device then uninstall it.

If you are compiling a Release version make sure you have a certificate defined in Project|Options...|Provisioning.

This problem could happen if a keystore file was copied from another machine. If this was the case, try uninstall the apk first, or recreate the keystore file on the new machine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM