Question

I'm trying to create a new Android project using Gradle build system, with IntelliJ 13.1.2 CE. From the "New Project" menu, I select Android, then Gradle: Android Module, and proceed further to create my project.

The trouble is : I can't "run" the project there after, having instead a weird error.

Using Gradle in command line works properly. But selecting my app as build configuration, and hitting run, result with the following error : Weird error

Information: 1 error
Information: 0 warnings
Error: java.lang.UnsupportedOperationException

I'm not able to get more information than that. And, I insist, building and installing with Gradle works properly from command line, and from within IntelliJ. (gradlew works as well)

So my questions are: - Was anyone confronted with this issue ? - If not, does anyone know how to get more information from IntelliJ ?

Also, I'm working on a Mac with OSX Maverick

Was it helpful?

Solution

I found a "fix" for those interested, of with the same issue. It looks like, since OSX Maverick, setting the proxy system-wide writes down some java system wide property, and so the proxy is applied globally for IntelliJ (or some weird stuff, I'm not so sure) and Gradle

Anyway, if you set your system wide proxy, and in IntelliJ -> Preferences -> HTTP Proxy : No Proxy, then, weirdly, IntelliJ will use the system wide proxy, and Gradle will work as well.

enter image description here

You can try to check updates, if you want to be sure it works (and it will)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top