У меня возникла проблема с созданием нового проекта в студии Android 3.1.3, всякий раз, когда я создавал проект, макет дизайна выдавал сообщение об ошибке:
Не удалось загрузить AppCompat ActionBar с неизвестной ошибкой.
скриншот ошибки:
предупреждение:
style.xml (пока ошибка) ->
И я решил, добавив:
style name = «AppTheme» parent = «Base.Theme.AppCompat.Light.DarkActionBar»
Но когда мне нужно было добавить панель инструментов, я застрял с ошибкой:
скриншот ошибки:
I am new to Android Studio and I don’t get why my toolbar isn’t shown as described by I know there are already some other questions like mine on stackoverflow but they don’t work at my project. Therefore I would be very thankful for fixing this issue. Screenshot:

- style.xml:
- 7 Answers 7
- Comments
- hemantuno commented Jan 1, 2019
- This comment has been minimized.
- iNoles commented Jan 1, 2019
- This comment has been minimized.
- tiembo commented Jan 2, 2019
- This comment has been minimized.
- hemantuno commented Jan 3, 2019
- This comment has been minimized.
- tiembo commented Jan 5, 2019
- This comment has been minimized.
- hemantuno commented Jan 7, 2019 •
- This comment has been minimized.
- tiembo commented Jan 9, 2019
- This comment has been minimized.
- hemantuno commented Jan 10, 2019
- This comment has been minimized.
- tiembo commented Jan 14, 2019
- This comment has been minimized.
- alashow commented Jan 17, 2019
- This comment has been minimized.
- ReoDeveloper commented Jan 24, 2019 •
- This comment has been minimized.
- tiembo commented Jan 24, 2019
- This comment has been minimized.
- matpag commented Feb 8, 2019
- This comment has been minimized.
- pawankhandal52 commented Feb 19, 2019
- This comment has been minimized.
- gigaga commented Mar 21, 2019
- This comment has been minimized.
- ding33211 commented Apr 3, 2019
- This comment has been minimized.
- gururajphadnis commented Apr 5, 2019
- This comment has been minimized.
- zy666 commented Apr 29, 2019 •
- This comment has been minimized.
- ytheekshana commented May 5, 2019
- This comment has been minimized.
- hemantuno commented May 6, 2019
- This comment has been minimized.
- timniko commented May 6, 2019
- This comment has been minimized.
- dem >May 7, 2019
- This comment has been minimized.
- marlonlom commented May 12, 2019 •
- This comment has been minimized.
- hmane48 commented May 17, 2019
- This comment has been minimized.
- hemantuno commented May 20, 2019
- This comment has been minimized.
- mrityunjay commented May 20, 2019
- This comment has been minimized.
- mrityunjay commented May 20, 2019
- This comment has been minimized.
- var2611 commented May 28, 2019
- This comment has been minimized.
- nathan-fiscaletti commented May 30, 2019
- This comment has been minimized.
- bryanwagner commented Jun 5, 2019
- This comment has been minimized.
- heyFahad commented Jun 11, 2019
style.xml:

7 Answers 7
Make the changes in your build.gradle (app level) to downgrade to version 27 as below. Then sync and build project. Hopefully it will fix the issue..
compileSdkVersion 27
targetSdkVersion 27

As mentioned by documentation, first, your Activity should be extend from AppCompatActivity() .
Second, in your project styles , Base.Theme.AppCompat.Light.DarkActionBar is set which means it does have a DarkActionBar but you already have a Toolbar in your layout . So, simply, change:
Then, (in java-kotlin side), setup the Toolbar :
And give the Toolbar an id.
Then you should be good to go.

It’s not an error but a warning it can be ignored by the addition of the following code in my build.gradle (app level) the file works in my case. Then sync and build the project. Hopefully, it fixes the issue.

There’s problem with library
-v7:28.0.0. There are two solutions, your can either download compile and targetSdkVersion to 27 or upgrade Android Studio to latest version (3.2.x higher).
Add multidex support library to your dependencies
android.view.View$OnUnhandledKeyEventListener is add in api28.
If runtime device below 28, can’t find the class, but run without fatal error.
We can inject the class in debug mode to ignore error message.
Comments
Copy link Quote reply
hemantuno commented Jan 1, 2019
Rejecting re-init on previously-failed >
This comment has been minimized.
Copy link Quote reply
iNoles commented Jan 1, 2019
This comment has been minimized.
Copy link Quote reply
tiembo commented Jan 2, 2019
@hemantuno can you add more details on this error — what actions you performed when it happened, version of Android Studio, etc?
This comment has been minimized.
Copy link Quote reply
hemantuno commented Jan 3, 2019
Run code on Samsung(Galaxy Tab A(2017) ) device using android studio 3.2.1.
Very first time run app then above logs display.
This comment has been minimized.
Copy link Quote reply
tiembo commented Jan 5, 2019
Does Sunflower work when you run it on an emulator?
This comment has been minimized.
Copy link Quote reply
hemantuno commented Jan 7, 2019 •
Not try in emulator.
This comment has been minimized.
Copy link Quote reply
tiembo commented Jan 9, 2019
Please try it in an emulator as to see if the error also happens there or only on the device.
This comment has been minimized.
Copy link Quote reply
hemantuno commented Jan 10, 2019
Same error in emulator.
This comment has been minimized.
Copy link Quote reply
tiembo commented Jan 14, 2019
I’m unable to reproduce this. Can you try Android Studio 3.3 and in a new emulator? Also try doing a «File -> Invalidate caches / Restart» in Android Studio.
This comment has been minimized.
Copy link Quote reply
alashow commented Jan 17, 2019
I’m seeing this stack trace in my app. I’m using Android Studio 3.3, invalidated cache, running on an emulator.
It’s triggered after calling DataBindingUtil.setContentView(this, R.layout.activity) :
This comment has been minimized.
Copy link Quote reply
ReoDeveloper commented Jan 24, 2019 •
Same stacktrace. Android Studio 3.3. Invalidated cache. Running on device.
Device fails to execute anything else on the Activity.
This comment has been minimized.
Copy link Quote reply
tiembo commented Jan 24, 2019
Hi everyone — thanks for the error reports.
To help pinpoint the problem, please comment with the device you’re using (even if it’s an emulator), along with the OS version the device is running.
This comment has been minimized.
Copy link Quote reply
matpag commented Feb 8, 2019
This comment has been minimized.
Copy link Quote reply
pawankhandal52 commented Feb 19, 2019
Hello everyone,
I also faced this issue. How can i resolve it?
This comment has been minimized.
Copy link Quote reply
gigaga commented Mar 21, 2019
Same problem for me. A workaround exists?
This comment has been minimized.
Copy link Quote reply
ding33211 commented Apr 3, 2019
This comment has been minimized.
Copy link Quote reply
gururajphadnis commented Apr 5, 2019
Same problem here, any workaround?
This comment has been minimized.
Copy link Quote reply
zy666 commented Apr 29, 2019 •
Same for me. help me
This comment has been minimized.
Copy link Quote reply
ytheekshana commented May 5, 2019
Same problem here, is there a fix?
This comment has been minimized.
Copy link Quote reply
hemantuno commented May 6, 2019
Same problem here, is there a fix? No
This comment has been minimized.
Copy link Quote reply
timniko commented May 6, 2019
I also got this problem. Only thing I recently did was updating Android Studio to the latest version.
This comment has been minimized.
Copy link Quote reply
dem >May 7, 2019
Got the same problem while rebuilding the same app on the same phone (one month ago it was working fine)
This comment has been minimized.
Copy link Quote reply
marlonlom commented May 12, 2019 •
Whats the name of the class that is inaccesible?
b.h.i.u$b extended by class androidx.core.view.ViewCompat$5 is inaccessible
edit:
Checking out the ViewCompat class file, at #2429:
Is something related to the ‘insets’ object that enforces us to use window insets in apps with andro >
This comment has been minimized.
Copy link Quote reply
hmane48 commented May 17, 2019
have we got any lead on this problem guys?
This comment has been minimized.
Copy link Quote reply
hemantuno commented May 20, 2019
have we got any lead on this problem guys?
no
This comment has been minimized.
Copy link Quote reply
mrityunjay commented May 20, 2019
same problem for me, yesterday it was working and today it is showing this error.
Caused by: java.lang.ClassNotFoundException: Didn’t find class «android.view.View$OnUnhandledKeyEventListener» on path: DexPathList[[zip file «/data/app/com.example.examandresultlatestgovtjobs-1/base.apk», zip file «/data/app/com.example.examandresultlatestgovtjobs-1/split_lib_dependencies_apk.apk», zip file «/data/app/com.example.examandresultlatestgovtjobs-1/split_lib_slice_0_apk.apk», zip file «/data/app/com.example.examandresultlatestgovtjobs-1/split_lib_slice_1_apk.apk», zip file «/data/app/com.example.examandresultlatestgovtjobs-1/split_lib_slice_2_apk.apk», zip file «/data/app/com.example.examandresultlatestgovtjobs-1/split_lib_slice_3_apk.apk», zip file «/data/app/com.example.examandresultlatestgovtjobs-1/split_lib_slice_4_apk.apk», zip file «/data/app/com.example.examandresultlatestgovtjobs-1/split_lib_slice_5_apk.apk», zip file «/data/app/com.example.examandresultlatestgovtjobs-1/split_lib_slice_6_apk.apk», zip file «/data/app/com.example.examandresultlatestgovtjobs-1/split_lib_slice_7_apk.apk», zi
This comment has been minimized.
Copy link Quote reply
mrityunjay commented May 20, 2019
I believe this error occurred after I change the app name in string.xml file.
This comment has been minimized.
Copy link Quote reply
var2611 commented May 28, 2019
I have i my project gradle : implementation «androidx.core:core-ktx:+» — Only this
then by reference of this https://stackoverflow.com/questions/53229259/no-super-method-getlifecycle-after-migrating-to-androidx I solved it.
My Solution : change in gradle file,
implementation «androidx.core:core:1.0.2» implementation «androidx.core:core-ktx:1.0.2»
This comment has been minimized.
Copy link Quote reply
nathan-fiscaletti commented May 30, 2019
You mean intrusive, ugly, and log polluting?
This comment has been minimized.
Copy link Quote reply
bryanwagner commented Jun 5, 2019
I have the same issue. After looking around, looks like this is a known bug in ViewCompat that’s unlikely to be fixed. I found more information at . If this is indeed a benign issue, the exception should be caught and logged at debug or trace level, rather than info level. This has a productivity impact on apps with clean logs, where a stack trace triggers alarm notifications. Unfortunately this is likely handled by a different Google team.
This comment has been minimized.
Copy link Quote reply
heyFahad commented Jun 11, 2019
This error often occurs when you enable multidex support for your apps. You may read more about it here