After installing delphi xe10 Seattle, the Android development environment is always poorly configured. If you run an Android empty project, the following error message appears:
The details of the error are as follows:===================================================================== =======================================================
[Exec Error] The command PATH C:/PRogram Files/java/jdk1.7.0_71/bin;C:/Users/Public/Documents/Embarcadero/InterBase/redist/InterBaseXE7/IDE_spoof;d:/Program Files (x86)/ Embarcadero/Studio/17.0/bin;C:/Users/Public/Documents/Embarcadero/Studio/17.0/Bpl;d:/Program Files (x86)/Embarcadero/Studio/17.0/bin64;C:/Users/Public/Documents /Embarcadero/Studio/17.0/Bpl/Win64;C:/Inprise/vbroker/bin;C:/Windows/system32;C:/Windows;C:/Windows/System32/Wbem;C:/Windows/System32/WindowsPowerShell/ v1.0/;C:/Program Files/Intel/WiFi/bin/;C:/Program Files/Common Files/Intel/WirelessCommon/;C:/Program Files (x86)/AMD/ATI.ACE/Core-Static ;C:/Program Files (x86)/Borland/Delphi6/Bin;C:/Program Files (x86)/Borland/Delphi6/Projects/Bpl;D:/Program Files (x86)/Microsoft SQL Server/100/Tools/ Binn/;D:/Program Files/Microsoft SQL Server/100/Tools/Binn/;D:/Program Files/Microsoft SQL Server/100/DTS/Binn/;D:/Program Files (x86)/Microsoft SQL Server/ 100/Tools/Binn/VSShell/Common7/IDE/;D:/Program Files (x86)/Microsoft SQL Server/100/DTS/Binn/;C:/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit /;C:/Program Files/Microsoft SQL Server/110/Tools/Binn/;C:/Program Files/Microsoft/Web Platform Installer/;C:/Program Files (x86)/Microsoft SDKs/TypeScript/1.0/;C :/Program Files/Microsoft SQL Server/120/Tools/Binn/;C:/Program Files/TortoiseSVN/bin;C:/Program Files/Intel/WiFi/bin/;C:/Program Files/Common Files/Intel/ WirelessCommon/;C:/Program Files (x86)/Microsoft VS Code/bin & D:/Program Files (x86)/Embarcadero/Studio/17.0/PlatformSDKs/android-sdk-windows/build-tools/24.0.3/dx .bat --dex --output=C:/Users/Administrator/Documents/Embarcadero/Studio/Projects/Android/Debug/classes.dex d:/program files (x86)/embarcadero/studio/17.0/lib/Android/ Debug/android-support-v4.dex.jar d:/program files (x86)/embarcadero/studio/17.0/lib/Android/Debug/apk-expansion.dex.jar d:/program files (x86)/embarcadero/ studio/17.0/lib/Android/Debug/cloud-messaging.dex.jar d:/program files (x86)/embarcadero/studio/17.0/lib/Android/Debug/fmx.dex.jar d:/program files (x86)/embarcadero/studio/17.0/lib/Android/Debug/fmx.dex.jar d:/program files (x86) )/embarcadero/studio/17.0/lib/Android/Debug/google-analytics-v2.dex.jar d:/program files (x86)/embarcadero/studio/17.0/lib/Android/Debug/google-play-billing. dex.jar d:/program files (x86)/embarcadero/studio/17.0/lib/Android/Debug/google-play-licensing.dex.jar d:/program files (x86)/embarcadero/studio/17.0/lib/ Android/Debug/google-play-services.dex.jar exited with code 1.
===================================================================== =========================================================
Solution:
1. Set jdk variable in system environment variables;
a. Enter the configuration interface of the environment variables and click to create a new system variable. The variable name is JAVA_HOME. The variable value is the path of the java installation path jdk;
b. After adding the JAVA_HOME system variable, you need to add two package files. In the system variable, select classpath, click Edit, and add after classpath
.;%JAVA_HOME%/lib/dt.jar;%JAVA_HOME%/lib/tools.jar; (.; Must not be missing, because it represents the current path)
c. Add path. If there is no path, you need to create a new path, path=%JAVA_HOME%/bin
2. Enter delphi xe10, menu tools->options......->SDK manage
Ensure that there are no yellow exclamation marks on the SDK, NDK, and java pages; (Sometimes you need to redelete the Android version and then add it again, and the paths will be automatically matched)
================================================================
Restart the system, tests can compile normally, and generate apk.