Layout preview not working in Android Studio

后端 未结 9 2154
佛祖请我去吃肉
佛祖请我去吃肉 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:36

    In Android Studio

    File>Invalidate Caches/Restart

    that's how i fixed

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

    You can try :

    1. Select Preview window(Focus on it)
    2. Unselect Floating mode and Pinned mode
    3. goto Window -> Active Tool Window ->
    4. Unselect Floating mode and Pinned mode
    5. Now you can see Docked window option here(Window -> Active Tool Window ->)
    6. Select Docked Window
    0 讨论(0)
  • 2020-12-18 20:40

    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.

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

    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

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

    Try updating your API to the latest version in the SDK manager ---- worked for me

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

    I had the same problem Follow this step :

    • First uninstall old android studio and delete .androidstudio file from C:\Users\yourpcname
    • update api to latest version in SDK manager.
    • Install Latest Android Studio Canary Build: 2.0 Preview 9

    Done

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