I had an issue with Gradle which I have fixed by adding export JAVA_OPTS="-Djava.ext.dirs="
to my .bashrc
(also tried adding to .profile and /etc/environment but to no avail)
Gradle now functions correctly and I can build my project from the command line, however if I run Android studio I still get the same issue.. It seems like Android studio is either ignoring (which it explicitly says it doesn't.. the gradle launch script says the user should use JAVA_OPTS
to pass arguments) or setting that env variable to ""
.
For reference the issue (it has to do with conflicting logging Jar being loaded) is:
./gradle
FAILURE: Build failed with an exception.
* What went wrong:
org.slf4j.impl.Log4jLoggerFactory cannot be cast to org.gradle.logging.internal.slf4j.OutputEventListenerBackedLoggerContext
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
.bashrc
. Add it to.profile
and re-login. – muru Aug 10 '15 at 08:37There is another workaround here however it is on Mac. When I search my computer for that .jar I have about 20 or so instances of it.. I tried moving the ones in any path which contained 'ext' however the issue is still present.
– chaybs Aug 10 '15 at 11:12.profile
? – muru Aug 10 '15 at 11:23Regardless, thank you for your help muru, also how do I mark this as the solution?
– chaybs Aug 10 '15 at 13:26