Render error android studio failed to load appcompat action bar, even after matching library versions

喜欢而已 提交于 2019-12-11 14:27:08

问题


apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
    applicationId "com.app.newzubair.yld"
    minSdkVersion 15
    targetSdkVersion 28
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner 
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
'proguard-rules.pro'
    }
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
implementation 'com.android.support:support-v4:28.0.0-alpha3'
implementation 'com.android.support:support-media-compat:28.0.0-alpha3'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso- 
core:3.0.2'
implementation 'com.google.firebase:firebase-core:16.0.0'}
apply plugin: 'com.google.gms.google-services'    

So this is my gradle build, now I have corrected the android support library versions(as the chosen solution on this community suggested) I still cannot see the changes I make in XML rendered onto the emulation.

This is the screenshot


回答1:


com.android.support:appcompat-v7:28.0.0-alpha3 has few bugs

change

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

to

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



回答2:


Add this line android:orientation="vertical" inside your LinearLayout tag



来源:https://stackoverflow.com/questions/50867921/render-error-android-studio-failed-to-load-appcompat-action-bar-even-after-matc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!