Cannot build head - NPE is thrown by gradle

152 views
Skip to first unread message

Bruno Sinou

unread,
Dec 1, 2021, 5:15:29 AM12/1/21
to Glide
Hi, 

I have just cloned the github repository of Glide and I got a NPE when I try to build the whole project:


```
$ ./gradlew clean build

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred evaluating project ':annotation:compiler'.
> java.lang.NullPointerException (no error message)
```

The issue seems to come from line 21 in annotation/compiler/build.gradle :
```
// This is to support com.sun.tools.javac.util.List, currently used in RootModuleGenerator.
compile files(Jvm.current().getToolsJar())
```

And the `org.gradle.internal.jvm.Jvm` import is not resolved by Android studio.

Am I missing something ?  

I am currently trying this on an Ubuntu 21.04 workstation with latest JAVA 11 and a correctly set `ANDROID_PATH`  that contains SDK 29, 30 & 31.

Thanks in advance for the help!

Bruno

(PS: I can send the whole stack if necessary but I am quite sure the error is on my side :) ) 

Tei Song

unread,
Dec 1, 2021, 8:46:46 PM12/1/21
to Bruno Sinou, Glide
It seems like a known issue.
I think it will help you to refer 


I had the same issue and was able to resolve it by build the project using the Java version from 11(or 9) to 8.

Hope it will help you.

--
You received this message because you are subscribed to the Google Groups "Glide" group.
To unsubscribe from this group and stop receiving emails from it, send an email to glidelibrary...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/glidelibrary/e673ce1a-e509-44b8-b538-6c032b130ed8n%40googlegroups.com.


--
Reply all
Reply to author
Forward
0 new messages