Reputation: 3304
I ported an android project from Eclipse to Android Studio. The project builds just fine. However I am not able to see any layout preview. When I go to the Design tab of a layout I get a
Loading Configuration...
message that never goes away (see image).
I have set correctly the Android SDK in the project structure.
This happens with all the xml files and I am not able to open the "Preview" window from
View -> Tool Windows -> Preview
I tried creating a new project and everything was showing fine. Am I missing something? Anyone faced a similar issue? Is there a chance that this is happening because the folder structure is not the default one? (The layouts are not under project/src/main/res/layout but under project/res/layout)
Upvotes: 18
Views: 24361
Reputation: 51
You can try :
Upvotes: 0
Reputation: 1
In Android Studio
File>Invalidate Caches/Restart
that's how i fixed
Upvotes: 0
Reputation: 9697
I had the same problem Follow this step :
Done
Upvotes: 0
Reputation: 3162
Just do a right click on the layout preview and click on
Show Included in contentmain.xml
you can see it in the following image
Upvotes: 4
Reputation: 3791
Try updating your API to the latest version in the SDK manager ---- worked for me
Upvotes: 0
Reputation: 11
Close android studio and go to path as follow: C:\Users\user\ .AndroidStudio1.2\restart There is a file named restarter,double click on it and open android studio again,create a new project and enjoy it
Upvotes: 1
Reputation: 91
Try this
It worked for me
Upvotes: 9
Reputation: 3043
Maybe it is better to use the 0.3.6 version (latest), with this version of gradle : com.android.tools.build:gradle:0.6.+
Bear in mind that Android Studio will be expecting the Android SDK already installed (as I suppose you have), and also the environment variables ANDROID_HOME and GRADLE_HOME.
Upvotes: 0
Reputation: 1077
I had the same problem and I solved as follow
classpath 'com.android.tools.build:gradle:0.5.+'
Now android studio 0.2.+ uses gradle 0.5
Upvotes: 3