вот такая ошибка вылезает, что делать?
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.nikita.mozhaev.jm, PID: 22493
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.nikita.mozhaev.jm/com.nikita.mozhaev.jm.MainActivity}: android.view.InflateException: Binary XML file line #2 in com.nikita.mozhaev.jm:layout/activity_main: Binary XML file line #2 in com.nikita.mozhaev.jm:layout/activity_main: Error inflating class DrawerLayout
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3654)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3806)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2267)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:8167)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
Caused by: android.view.InflateException: Binary XML file line #2 in com.nikita.mozhaev.jm:layout/activity_main: Binary XML file line #2 in com.nikita.mozhaev.jm:layout/activity_main: Error inflating class DrawerLayout
Caused by: android.view.InflateException: Binary XML file line #2 in com.nikita.mozhaev.jm:layout/activity_main: Error inflating class DrawerLayout
Caused by: java.lang.ClassNotFoundException: android.view.DrawerLayout
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:454)
at android.view.LayoutInflater.createView(LayoutInflater.java:815)
at android.view.LayoutInflater.createView(LayoutInflater.java:776)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:913)
at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:68)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:930)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:950)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1004)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:961)
at android.view.LayoutInflater.inflate(LayoutInflater.java:659)
at android.view.LayoutInflater.inflate(LayoutInflater.java:534)
at android.view.LayoutInflater.inflate(LayoutInflater.java:481)
at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:696)
at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:170)
at com.nikita.mozhaev.jm.MainActivity.onCreate(MainActivity.java:44)
at android.app.Activity.performCreate(Activity.java:7963)
at android.app.Activity.performCreate(Activity.java:7952)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3629)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3806)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2267)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:8167)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.DrawerLayout" on path: DexPathList[[zip file "/data/app/com.nikita.mozhaev.jm-sT9AsTEmPxXw5fPnbjy7hg==/base.apk"],nativeLibraryDirectories=[/data/app/com.nikita.mozhaev.jm-sT9AsTEmPxXw5fPnbjy7hg==/lib/arm64, /system/lib64, /product/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 31 more
Вот мой код activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
<include
layout="@layout/app_bar_main"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/activity_main_drawer" />
</DrawerLayout>
Айфон мало держит заряд, разбираемся с проблемой вместе с AppLab
Написать программу, которая считывает число и выводит количество всех содержащихся в нем цифр (от 0 до 9)Вывести соответствующий номер, только...
Прочитал достаточно много информации про JDBC и ORM, теперь хотел бы проверить свое понимание работы с БД в Java и задать пару вопросов касательно...
я только начал изучать Java и среду разработки Android studioЭто мой первый вопрос, так что не судите строго