nenick/android-gradle-template

Unable to import project

daveenguyen opened this issue · 5 comments

  1. fresh clone
  2. I click "Import Project..." from the "Welcome to Android Studio" window.
  3. Select the build.gradle on the root folder
  4. I get the following error
    Error:(17, 0) (class: com/novoda/gradle/test/SupportedLanguages, method: super$1$stream signature: ()Ljava/util/stream/Stream;) Illegal use of nonvirtual function call

I am not sure if I'm missing something, I also tried

  1. fresh clone
  2. I ran Script/install-custom-gradle-test-plugin.sh from android-gradle-template folder
  3. I click "Import Project..." from the "Welcome to Android Studio" window.
  4. Select the build.gradle on the root folder
  5. I get the same error

I also tried

  1. fresh clone
  2. I ran install-custom-gradle-test-plugin.sh from android-gradle-template/Script folder
  3. I click "Import Project..." from the "Welcome to Android Studio" window.
  4. Select the build.gradle on the root folder
  5. I get the same error

The plugin looks correct installed. which java version use you? Current this project support only java 7

In my project structure i have jdk location point to 1.7
/Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home

It might be a problem with OS X.

Here's the AS logfile
https://gist.githubusercontent.com/daveenguyen/08d7c0f834e9b0ad9263/raw/43c0c97045c60c480d32376a6d8dafce5e301459/idea.log

It does show JRE as 1.6, but it also says that it's telling gradle to use jdk1.7

i'm on vacation now, so i have not much time.

short what i know:

  • there are issues when use java 6
  • project works on OS X fine, thats my operations system

check wether your tests run on command line? set your JAVA_HOME to the 1.7 and try again.

At first it wasn't working on the command-line with JAVA_HOME 1.7,
but then i ran your script to install the plugin and ran gradlew again and it worked!
I tried to delete the gradlew cache and try new clone without the plugin script, but I could not reproduce the error.
Maybe I had bad cache or something?
Thank you for helping.

Plugin is installed to local maven repo. For a full dependency whipe delete this maven repo too