Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder
None of the answers helped me only my decision fixed the situation:
Fix is to copy
android-sdk/build-tools/25.0.3/lib
to the folder
android-sdk/build-tools/26.0.1/lib
Now all works great!
I had the same error today and happened to find your post. And after several attempts, I found deleting 26 rc1 Build-tools can help solve the issue.
Eclipse ADT no more support. So Google break backward compatibility with remove two classes from dx.jar
.
You can easy fix it.
- Go to your sdk folder. Navigate to
dx.jar
from latest build-tools.
For examplebuild-tools\28.0.3\lib
- Open
dx.jar
in any zip archiver.
I use WinRAR. - Navigate to path
com\android\dx\command
inside archive.
Here you not see filesDxConsole$1.class
andDxConsole.class
. - Now navigate to
dx.jar
for25.0.3
or before. - Again navigate to
com\android\dx\command
inside this archive.
Here you see filesDxConsole$1.class
andDxConsole.class
. - Copy it from old
dx.jar
to newdx.jar
. I just drop its from one WinRAR window to another.
All done. Now you can use new dx.jar
with Eclipse ADT.
This solution better from replace dx.jar
, because you can use new version of the dx.jar
.
You need do this steps on every update build-tools.