Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project setup #3

Closed
nurzhannogerbek opened this issue Feb 16, 2016 · 3 comments
Closed

Project setup #3

nurzhannogerbek opened this issue Feb 16, 2016 · 3 comments

Comments

@nurzhannogerbek
Copy link

Hello! First of all I want to say that your project looks like wonderful. REALLY AMAZING!

I am tring to test your project but when I import it gradle sync project failed. It seems to me that compileJava is not correct in my case but in project settings JDK location is correct. JDK version 1.7.0_79. I set the environment variable in system properties of Windows and called it as JAVA7_HOME.

compileJava {
    sourceCompatibility = 1.7
    targetCompatibility = 1.7
    def jdkHome = System.getenv()['JAVA7_HOME']
    options.bootClasspath = (new File(jdkHome, "/jre/lib/rt.jar")).canonicalPath
}

Android Studio IDE see error in code: cannot resolve symbol File

ERROR

Error:(8, 0) Ambiguous method overloading for method java.io.File#<init>.
Cannot resolve which method to invoke for [null, class java.lang.String] due to overlapping prototypes between:
    [class java.lang.String, class java.lang.String]
    [class java.io.File, class java.lang.String]

Whats the best way to solve this problem?

@nurzhannogerbek
Copy link
Author

I didnt notice that the same question was before. I found solution in one of the comments. I just restart Windows after setting this variable. Unfortunatly still cant test in emulator or real device cause have error:

Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

In addition to it I have strange warnings in IDE like that:
JAVA7_HOME or JAVA8_HOME enviromental variable not found. Please set them. Retrolambda may fail without them.

@Naitbit
Copy link
Member

Naitbit commented Feb 16, 2016

You did said that you set JAVA7_HOME. Did you set JAVA8_HOME? Both are needed.
You can see at Travis that source code can be build https://travis-ci.org/byoutline/kickmaterial/builds

@nurzhannogerbek
Copy link
Author

@Naitbit Thanks, it helped me. Topic can be closed. I used both JAVA7_HOME and JAVA8_HOME right know and its works nice. Really beautiful application. Have a nice day! =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants