0

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

Redwarp
  • 3,221
  • 3
  • 31
  • 44
  • There's probably an exception stack trace in the event log. If you find one, please file a bug at https://code.google.com/p/android/issues/entry?template=Android%20Studio%20bug – Scott Barta May 13 '14 at 16:07
  • Just did, https://code.google.com/p/android/issues/detail?id=69617 – Redwarp May 13 '14 at 16:37
  • @ScottBarta, from the log, it looks like there is a problem with the proxy! I checked IntelliJ's proxy settings : it was in manual, with host name and port number (no auth). I switched to Auto-detect and I don't have an issue anymore. But it's still a bug. – Redwarp May 13 '14 at 16:45
  • If you can find a workaround, then great, but there's still a bug there ;) – Scott Barta May 13 '14 at 16:48
  • The work around is : no proxy in IntelliJ, and it magically uses System proxy. Tested on two macs with Maverick... – Redwarp May 15 '14 at 15:41

1 Answers1

0

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)

Redwarp
  • 3,221
  • 3
  • 31
  • 44