Issue
I am trying to use buildSrc for dependency management in the new Android 4.2 Preview version and getting this error.
Cannot access 'java.lang.Object' which is a supertype of 'org.gradle.api.artifacts.repositories.MavenArtifactRepository'. Check your module classpath for missing or conflicting dependencies
Cannot access class 'java.net.URI'. Check your module classpath for missing or conflicting dependencies
Solution
I figured it out, it's due to the Java default JDK coming with the new Android Studio, I believe this will be fixed in the release version.
To quickly fix this there are two options:
- Use the JDK of the previous release Android Studio if you have not deleted it (recommended because I tested that).
- Download Java JDK and install it and get it's directory and attach it to JDK directory in the new Android studio.
How to change the JDK in Android studio.
- File ->
- Project Structure ->
- On the left find "SDK Location" ->
- at the bottom you will find "JDK Location" change this to the same directory either of the old Android studio or the location of Java JDK that you installed manually from Oracle official website.
Answered By - Mohammad Elsayed
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.