1. Download address:
http://archive.apache.org/dist/ant/binaries/
There is a corresponding relationship between jdk and ant version. At present, we know:
jdk1.7 is not compatible with ant1.10, 1.7 must use ant version below 1.10
So I downloaded version 1,93:
2. Configure environment variables
Configure the variable ANT_HOME in the environment variable, the value is D:\config\apache-ant-1.9.3-bin\apache-ant-1.9.3; add in Path: %ANT_HOME%\bin;
verify that Ant is installed successfully, Start -> Run -> cmd, enter the command line -> type ant -version and press Enter, as shown in the figure, it means that the Ant configuration is complete.
3. IDEA configures the ant version, right-click build, select properties
Select as follows