Issues with Android Studio when you import a project

Source: Internet
Author: User

Cloning Android AR SDK,

Use Android studio to import samples inside

The error prompts are as follows:

Error: (1, 1) A problem occurred evaluating project ': App '. > java.lang.unsupportedclassversionerror:com/android/build/gradle/appplugin:unsupported major.minor version 52.0

Android Studio 2.0 SDK 6.0

I'm having problems with Android studio when I import a project today

1. The first thought is that your Android studio and SDK version is not up-to-date, so update to the latest Android Studio 2.3.3 SDK 7.1.1 Error still

2. Baidu Search online is said to be imported projects prompted by the SDK version and the local version of the inconsistency, so checked, error as usual

3. Ask colleagues to see the original I opened the project with Eclipse, the contents of the structure changed, so open a lot of red

4. Then re-search Arcore->most from GitHub and re-download a new copy of the

5. Re-use Android studio to import or report the same error

6. Find a problem with the JDK that was originally used, as detailed below:

Do Android development, compile Android source code before the computer is compiled Android 6.0 with is jdk1.7

The JDK that was later compiled with android7.0 is open jdk1.8

The current JDK is openjdk1.8 just changed the Java path in the ~/.BASHRC to the original jdk1.7 directory or saved locally

So Android Studio automatically loaded the jdk1.7 directory when you imported the project

Final Solution: Change the path of the JDK to 1.8 in Android studio OK, make an afternoon ...

Issues with Android Studio when you import a project

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.