Delphi PATH error on Android compiler

2019-09-07 06:37发布

I have just installed Delphi 10 Seattle in a DELL workstation of my office and I am able to compile 32 bit and 64 bit. When I select Android I have this kind of error:

[Exec Error] The command "PATH C:\Program Files\Java\jdk1.7.0_71\bin;C:\Users\Public\Documents\Embarcadero\InterBase\redist\InterBaseXE7\IDE_spoof;C:\Program Files (x86)\Embarcadero\Studio\17.0\bin; [... more lines ...];exited with code 1.

I guessed that this was a misconfiguration and so I have checked the IDE options. As you can see I have no warnings: check.

As you can see here the path specified in the IDE is correct. What else could it be? I hope I have provided everything. Should I try to delete and add again the SDK version?

The entire error message is here if needed:

[Exec Error] The command "PATH C:\Program Files\Java\jdk1.7.0_71\bin;C:\Users\Public\Documents\Embarcadero\InterBase\redist\InterBaseXE7\IDE_spoof;C:\Program Files (x86)\Embarcadero\Studio\17.0\bin;C:\Users\Public\Documents\Embarcadero\Studio\17.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\17.0\bin64;C:\Users\Public\Documents\Embarcadero\Studio\17.0\Bpl\Win64;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\ & "C:\Users\Public\Documents\Embarcadero\Studio\17.0\PlatformSDKs\android-sdk-windows\build-tools\25.0.2\dx.bat" --dex --output="C:\Users\defaulr.user\Documents\Embarcadero\Studio\Projects\Android\Debug\classes.dex" "c:\program files (x86)\embarcadero\studio\17.0\lib\Android\Debug\android-support-v4.dex.jar" "c:\program files (x86)\embarcadero\studio\17.0\lib\Android\Debug\apk-expansion.dex.jar" "c:\program files (x86)\embarcadero\studio\17.0\lib\Android\Debug\cloud-messaging.dex.jar" "c:\program files (x86)\embarcadero\studio\17.0\lib\Android\Debug\fmx.dex.jar" "c:\program files (x86)\embarcadero\studio\17.0\lib\Android\Debug\google-analytics-v2.dex.jar" "c:\program files (x86)\embarcadero\studio\17.0\lib\Android\Debug\google-play-billing.dex.jar" "c:\program files (x86)\embarcadero\studio\17.0\lib\Android\Debug\google-play-licensing.dex.jar" "c:\program files (x86)\embarcadero\studio\17.0\lib\Android\Debug\google-play-services.dex.jar" " exited with code 1.

2条回答
等我变得足够好
2楼-- · 2019-09-07 07:05

I know it is probably too late but I had the same issue. And found one of the possible solution. Here it is.

Got [Exec Error] The command "PATH C:\Program Files (x86)\Java\jdk1.8.0_161.... Error 1. while trying to compile for Android in Delphi Rio.

I finally traced the batch files to see waht they were doing: finding the Java utilities on the disk.

I decided to clean the whole set of Java stuff on the machine and to use the latest java machine, the latest SDK in 32 and in 64 bits.

I updated the path in the configuration - C:\Program Files (x86)\Java\jdk1.8.0_191\bin\KeyTool.exe - C:\Program Files (x86)\Java\jdk1.8.0_191\bin\JarSigner.exe

This allowed me to compile

But ... I am not out of it. - the app which was working fine in Tokyo version fails in Rio (database issue on mobile) - Android 8.0.0 does not allow debugging for the moment (needs 8.1). Contacted Samsung. - my tablet is too old for the Android version (4.4). - the PATH variable was too long with the 2 versions (Tokyo & Rio) installed. I had to extract the delphi parts in a batch.

So still a lot to do to come back to the point where I was before Rio ...

查看更多
成全新的幸福
3楼-- · 2019-09-07 07:29

I have installed RAD Studio on a Windows 10 machine and I had no problems. From the other side, I have installed RAD in 2 win 7 machines and I have had the same problem.

I went to C:\Users\myUserName\Documents\Embarcadero\ and I have deleted this folder (the one that contains the project folder). Then I updated the PATH variable and restarted the IDE. Now I am able to compile on Android as well.

查看更多
登录 后发表回答