1

I just started with android studio, installed and created a new project. Created an Empty Activity and when I go to app>res>layout>activity_main.xml, I can't get to see the preview. It says -> Rendering Problems Failed to load platform rendering library

I tried changing API Level by clicking on android above, Tried-> 24,22,18 But all of them give me the same error.!

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.app.myfirstapp.MainActivity">
<TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello World!" />
</RelativeLayout>`

The render works fine in Eclipse, so why not in Android Studio? I'm using Android Studio v2.1, SDK Tools-> 25.2.1 rc1, Android Platform Version: API 22: Android 5.1 (Lollipop) revision 2

This is the activity_main.xml file, any help wou

Any help would be appreciated!

Faraz Ali
  • 23
  • 2
  • 7

1 Answers1

1

Go to the "Design" tab of the xml and reduce the android version to use while redering from the drop down.

Take a look at this: Android Studio rendering problems

Community
  • 1
  • 1