After Updating Android studio to 3.1.2 , I get “Failed to load AppCompat ActionBar with unknown error. ”

前端 未结 9 2010
旧巷少年郎
旧巷少年郎 2020-12-31 14:54

I tried looking other similar questions on stackoverflow, they advice us to changw version of \"buildToolsVersion\" but I dont see word like that in my gradle file.

相关标签:
9条回答
  • 2020-12-31 15:33

    I had the same problem. I searched so much and I finally found that appcompat-v7:28.0.0-alpha3 has some bug with "Design View" part of Android Studio.

    So I suggest to change com.android.support:appcompat-v7:28.0.0-alpha3 to com.android.support:appcompat-v7:28.0.0-alpha1 version and then click File -> Invalidate Caches / Restart. Volla everything is OK.

    Of course you should have internet access to download com.android.support:appcompat-v7:28.0.0-alpha1

    0 讨论(0)
  • 2020-12-31 15:33

    yes its work,

    implementation 'com.android.support:design:28.0.0-alpha3' to

    implementation 'com.android.support:design:28.0.0-alpha1'

    After that got to File and click -> Invalidate Caches / Restart

    0 讨论(0)
  • 2020-12-31 15:34

    Update 2

    As you can see in support 28.0.0 release notes.

    This will be the last feature release under the android.support packaging, and developers are encouraged to migrate to AndroidX 1.0.0

    Android will not update support libraries from now. So I suggest you migrate to androidx before they deprecated support libraries.

    Update

    Support 28.0.0 is released, so you can use this stable version.

    implementation 'com.android.support:design:28.0.0'
    

    I suggest never use alpha versions, because alpha, beta versions have bugs, that are testing libraries.

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