简体   繁体   中英

Android Studio 2.1.2 rendering issue

I've installed android studio 2.1.2 . I've developed a few basic apps using it but and ran them in my android device. However, in the activity_main.xml design tab, the preview never appeared. I could see my interface in my device when I ran it, but it doesn't show any preview in the design tab. I've attached a photo of the screen here.

这是错误通知。

I would be glad to have a preview prior to actually running my app on the device. I've already installed JDK 8 and set the path appropriately, but still no luck.

Just change the Android version to use when rendering layouts in the IDE to 23 .

In your designer view, click the Android Icon showing API version 24 & change it to 23 .

simply studio is trying to tell you to update your jdk version because sooner or later you will have to do it and there are too many reasons to do this , like improve performance , rectified issues of older versions, new features etc .

If you don't want to update java than you can use the option suggested by @sJy but the drawback is , you won't be able to use the preview functions of android N like 'dual activity ' etc, which will be required one day, while developing an app with android N features

If you already have java 8 installed then you can update JAVA_HOME environment variable path to your java 8 Jdk folder.

you may need to use openjdk that is embedded into new anroid studio for better performance .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM