Layout preview not working in Android Studio

后端 未结 9 2155
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-18 20:15

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 l

相关标签:
9条回答
  • 2020-12-18 20:50

    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

    0 讨论(0)
  • 2020-12-18 20:56

    I had the same problem and I solved as follow

    1. Update all build.gradle files with:

    classpath 'com.android.tools.build:gradle:0.5.+'

    Now android studio 0.2.+ uses gradle 0.5

    1. Closes de IDE and via Terminal/Console
    2. Do a clean: $gradle clean
    3. Do a build: $gradle build
    4. Assemble it: $gradle assembleDebug
    5. Open the Android Studio and be happy ;)
    0 讨论(0)
  • 2020-12-18 20:57

    Try this

    1. Build> Clean Project
    2. Build> Rebuild Project

    It worked for me

    0 讨论(0)
提交回复
热议问题