Failed to initialize runtime solution appears when using ECJ or DX command in termux
The error report said that I had to check the log. Because I didn’t know much about Android system, I chose to check what ECJ did
Enter the path as shown in the figure
cd ~/../usr/bin
Cat ECJ later found that he was actually executing the command dalvikvm
So cat dalvikvm finds the following in this command
The two lines I marked had no comments
Open dalvikvm through VI or vim and comment out the above two lines. You can use it normally
Note out the following two lines
export ANDROID_ DATA=/data/data/com.termux/files/usr/var/android/
mkdir -p $ANDROID_ DATA/dalvik-cache
)You can use ECJ
Cause analysis:
Because the directory will exist after being used, the execution fails
Here is the original: https://github.com/termux/termux-packages/issues/1107