6

I have just created new project in android studio. I am new with this tool. The problem is, it is not displaying me my design, It giving me error that,

This version of the rendering library is more recent than your version of Android Studio. Please update Android Studio

I research on it, and by reading this question I do the same Android Studio Rendering Library1

But now, I am getting java compilation errors in MainActivity.java file.

enter image description here

enter image description here

Do I need to import any library ?

Community
  • 1
  • 1
Keval Patel
  • 925
  • 4
  • 24
  • 46
  • 1
    No, you don't need anything, just select 22(5.1.1) Don't select M(Preview) And restart Android Studio. Same case with me, and solved it like this. – Noor Nawaz Jun 02 '15 at 08:16
  • I select 23 and refresh preview window. It worked for me :) – Jasmeen Feb 03 '17 at 10:38

1 Answers1

11

My problem was solved by changing my current android version to API 22 Android 5.1.1 This video helped me get through the error https://www.youtube.com/watch?v=49CF6uU38Wo

Zoe
  • 27,060
  • 21
  • 118
  • 148
5511002233
  • 503
  • 8
  • 19
  • I have already set it API 22 Android 5.1.1. But It is giving me same error and second error I am getting is "aidl is missing" – Keval Patel Jun 02 '15 at 09:53
  • 1
    Go to app > Right Click on it > Open Module Settings>Change build tool version to 22.0.1 – 5511002233 Jun 02 '15 at 10:53
  • Hey that works, Now I am able to build my project. You can write as separate answer, I will make it right :) – Keval Patel Jun 02 '15 at 11:42
  • But when I execute my project, it giving me error emulator: ERROR: x86 emulation currently requires hardware acceleration! Please ensure Intel HAXM is properly installed and usable. CPU acceleration status: HAX kernel module is not installed!..... I am using nexus 5 api 22 from dropdown – Keval Patel Jun 02 '15 at 11:43
  • Start your SDK manager and install HAXM from there. – 5511002233 Jun 02 '15 at 12:55
  • Hey dude... Again solved... :) (Y) Thanks a lot – Keval Patel Jun 02 '15 at 17:56