E: [kapt] 'com.sun.tools.javac.util.context' Class Can't Be Found ('tools.jar' Is Absent In The Plugin Classpath). Kapt Won't Work
Solution 1:
Did you check your jdk path which folder name contain special symbol like '+', I change to '_'. error be fix. example: folder name is 1.8.0+282 -> 1.8.0_282.
Solution 2:
I recently had the same problem and solved it in a very simple way, but first I need to contextualize it. In my case I tried to build an app for android directly from the terminal using ./gradlew
So I just ran the commands below on my terminal:
export CLASSPATH=/Library/Java/JavaVirtualMachines/<your_jdk_version>/Contents/Home/lib export JAVA_HOME=/Library/Java/JavaVirtualMachines/<your_jdk_version>/Contents/Home
In my scenario, I was using adoptopenjdk-8.jdk, check which jdk you are using and follow the same principle. You can define an environment variable with these commands as well. But this is the fastest way (but it will never be the only one)
Post a Comment for "E: [kapt] 'com.sun.tools.javac.util.context' Class Can't Be Found ('tools.jar' Is Absent In The Plugin Classpath). Kapt Won't Work"