報錯信息 :android
Render Problem
Failed to load AppCompat ActionBar with unknown error.app
Failed to instantiate one or more classes The following classes could not be instantiated: android.support.v7.widget.AppCompatImageView (Open Class, Show Exception, Clear Cache) - android.support.v7.widget.Toolbar (Open Class, Show Exception, Clear Cache) - android.support.v7.widget.AppCompatTextView (Open Class, Show Exception, Clear Cache) - android.support.v7.widget.ActionBarContextView (Open Class, Show Exception, Clear Cache) - android.support.v7.app.WindowDecorActionBar (Open Class, Show Exception, Clear Cache) - android.support.v7.widget.ActionBarOverlayLayout (Open Class, Show Exception, Clear Cache)gradle
解決方案:ui
1: try going to the build.gradle(module:app) file in your project, over there, change the following things:spa
implementation 'com.android.support:appcompat-v7:28.0.0-alpha3' implementation 'com.android.support:design:28.0.0-alpha3'
to:code
2:同步以後,Invalid Caches/Restartimplementation 'com.android.support:appcompat-v7:28.0.0-alpha1' implementation 'com.android.support:design:28.0.0-alpha1