0

I am trying to build IntelliJ IDEA from source code by following the build instructions.but I am facing this error message while compiling the code:

/home/youssef/intellij-community/android/as-driver/utils/testSrc/com/android/tools/asdriver/tests/XvfbServer.java:26:31

java: package org.apache.commons.lang does not exist

/home/youssef/intellij-community/android/as-driver/utils/testSrc/com/android/tools/asdriver/tests/XvfbServer.java:85:10

java: cannot find symbol
  symbol:   variable SystemUtils
  location: class com.android.tools.asdriver.tests.XvfbServer

I also see some invalid dependencies in the project structure window:

-Module intellij.android.core: invalid item 'commons-lang' in the dependencies list
-Module intellij.android.as-driver.utils: invalid item 'commons-lang' in the dependencies list
-Module intellij.android.glance-designer: invalid item 'commons-lang' in the dependencies list
-Module intellij.android.studio.integration: invalid item 'commons-lang' in the dependencies list
-Module intellij.android.compose-designer.tests: invalid item 'commons-lang' in the dependencies list
-Module android.sdktools.db-compiler: invalid item 'commons-lang' in the dependencies list

It seems like the package org.apache.commons.lang cannot be found, and the symbol SystemUtils cannot be resolved. Additionally, there are invalid items in the dependencies list of multiple modules.

Can someone help me with this error? What could be the reason for this error, and how can I resolve it?

Also, I encountered a problem in the getPlugins.sh script, but I was able to solve it:

fatal: read error: Connection reset by peer fatal: early EOF fatal: index-pack failed

The solution I followed: fatal: early EOF fatal: index-pack failed

I tried

https://intellij-support.jetbrains.com/hc/en-us/community/posts/6779294805266-org-apache-commons-lang3-not-recognized-in-my-Intellij-IDE

James Z
  • 12,209
  • 10
  • 24
  • 44
  • Have you run the `getPlugins.sh` successfully? Try to fix this issue `early EOF fatal: index-pack failed` firstly because it is possible that you haven't clone the Android module successfully which causes the `org.apache.commons.lang` issue. – LJ replica Mar 22 '23 at 04:15
  • I reinstalled git and getPlugins.sh worked fine , but the problem still exist. – youssef gamal Mar 22 '23 at 13:24
  • It seems there are some problems with that Android module which doesn't have `org.apache.commons.lang` library now and not your configuration problem here. If you just run the `IDEA` run configuration it would build the IDEA successfully without Android plugin. I guess the master Android branch doesn't work with the master IDEA source code for some reason, and manually adding that library or try a different branch/tag might helps. – LJ replica Mar 23 '23 at 07:12

0 Answers0