Android Studio - TextView not showing in design view layout

后端 未结 5 1590
时光取名叫无心
时光取名叫无心 2020-11-27 08:38

I am brand new to trying out an android app. I started to follow the online tutorial (https://developer.android.com/training/basics/firstapp/building-ui), but getting a bit

相关标签:
5条回答
  • 2020-11-27 08:58

    There is a bug in latest sdk 28 ,

    Change the compileSdkVersion 27

    targetSdkVersion 27

    and

    implementation 'com.android.support:appcompat-v7:27.1.1'

    Update:

    This is said to fix problem but I did not test it yet

    In styles.xml change the parent theme for your app to Base.Theme.AppCompat instead of Theme.AppCompat

    0 讨论(0)
  • 2020-11-27 09:18

    I faced this issue too, this is a issue from the latest support.appCompact.

    Inside gradle dependencies if your using,

    implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
    

    change to

    implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
    

    This will fix the issue

    0 讨论(0)
  • 2020-11-27 09:18

    You see it in the component tree so, if you want to modify or delete it, you can do that from there.

    0 讨论(0)
  • 2020-11-27 09:20

    First and foremost, check to see if your dependencies match your SDK level. To check this, go to your app.gradle file and check every highlighted statement for version conflicts.

    If this doesn't work, your next debugging step should be to restart your Android studio. Since the view shows in your component tree (and in your emulator), it ought to show in your preview. Previews in android studio lag sometimes due to various reasons (mostly machine related).

    If it still doesn't show up after restarting, the problem might be a larger scale IDE issue and you should consider updating your question accordingly.

    I hope this helps.. Merry coding!!

    0 讨论(0)
  • 2020-11-27 09:23

    Found an easier way than adding code or changing SDK. It is just hidden and you have to show it by checking the "Show layout Decorations"

    Hope it helps.

    P.S. it also solves the hidden toolbar problem Picture of where to find it

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