홈>
앱을 휴대 전화에 배포하는 동안 앱이 중지되었다는 메시지와 함께 앱이 계속 중단됩니다. 이미 스택 오버플로에 대한 답변을 찾으려고 시도했지만 아무것도 문제를 해결하지 못합니다. 나는 대답 중 하나가 말했듯이 프로젝트를 정리하고 무효화하고 다시 시작하며 Api를 28에서 27로 변경했습니다. 내가 찾은 모든 것을 시도했습니다.
MainActivity.java
package com.example.panchaat;
import android.content.Intent;
import android.os.Bundle;
import androidx.appcompat.widget.Toolbar;
import android.view.MenuItem;
import android.view.View;
import android.widget.*;
import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.navigation.NavigationView;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
public class MainActivity extends AppCompatActivity {
private NavigationView navigationView;
private ActionBarDrawerToggle actionBarDrawerToggle;
private DrawerLayout drawerLayout;
private RecyclerView postList;
private Toolbar mToolbar;
private FirebaseAuth mAuth;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.panchaat"
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
compileOptions {
targetCompatibility = '1.8'
sourceCompatibility = '1.8'
}
buildToolsVersion = '28.0.3'
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.1.1'
implementation 'com.android.support:design:28.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.google.firebase:firebase-auth:11.0.2'
implementation 'com.google.android.gms:play-services-auth:11.0.2'
implementation 'com.google.firebase:firebase-database:11.0.2'
implementation 'com.google.firebase:firebase-storage:11.0.2'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'com.theartofdev.edmodo:android-image-cropper:+'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.firebaseui:firebase-ui-database:2.1.1'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.android.support:appcompat-v7:28.1.1'
implementation 'com.android.support:design:28.1.1'
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.android.support:support-v13:28.0.0'
implementation files('support-v13')
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:support-v13:28.0.0'
implementation "com.android.support:support-core-utils:28.1.0"
}
apply plugin: 'com.google.gms.google-services'
activity_main.xml :
<?xml version="1.0" encoding="utf-8"?>
<androidx.drawerlayout.widget.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:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows ="true"
tools:context="com.example.panchaat.MainActivity"
android:id="@+id/drawer_layout">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<include
android:id="@+id/main_page_toolbar"
layout="@layout/app_bar_layout">
</include>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="634dp"
android:layout_alignParentStart="true"
android:layout_marginStart="0dp"
android:layout_alignParentTop="true"
android:layout_marginTop="21dp"
android:id="@+id/main_contaier">
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/all_users_post_list"
android:layout_alignTop="@+id/main_contaier"
android:layout_alignStart="@+id/main_contaier"/>
</FrameLayout>
</RelativeLayout>
<com.google.android.material.navigation.NavigationView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:layout_marginBottom="3dp"
app:menu="@menu/navigation_menu"
android:id="@+id/navigation_view">
</com.google.android.material.navigation.NavigationView>
</androidx.drawerlayout.widget.DrawerLayout>
app_bar_layout.xml :
<androidx.appcompat.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
android:id ="@+id/main_app_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background ="#3a1c71"
android:theme ="@style/ThemeOverlay.AppCompat.Dark">
</androidx.appcompat.widget.Toolbar>
로그 캣
Caused by: android.view.InflateException: Binary XML file line #2: Binary
XML file line #2: Error inflating class
android.support.v4.widget.DrawerLayout
Caused by: android.view.InflateException: Binary XML file line #2: Error
inflating class android.support.v4.widget.DrawerLayout
Caused by: java.lang.ClassNotFoundException: Didn't find class
"android.support.v4.widget.DrawerLayout"
- 답변 # 1
관련 자료
- android - Kotlin에서 부 풀리는 클래스 오류를 어떻게 해결할 수 있습니까?
- python - 클래스에서 예기치 않은 들여 쓰기 오류 __init__
- c++ - 헤더 파일에서 클래스 선언을 사용할 때 링커 오류
- swift - 표현 유형이 모호한 클래스 오류입니다
- 배열에서 Java Math 클래스 사용 오류
- php - 장인 마이그레이션 오류"Class 'Doctrine \\ DBAL \\ Driver \\ PDOMySql \\ Driver'not found"
- kubernetes - aks에서 스파크 오류 - 주 클래스 orgapachesparklaunchermain을 찾거나로드 할 수 없습니다
- java - logstash - logstashbat를 실행할 때 "오류 : 기본 클래스 heal을 찾거나로드 할 수 없습니다"
- 오류 - laravel을 사용하여 찾을 수없는 클래스를 어떻게 수정할 수 있습니까?
- php - 치명적인 오류 - 포착되지 않은 오류 : 'rlfeedfactorycommon'클래스를 찾을 수 없습니다
- json - ktor를 사용한 "변환을 찾을 수 없음 - class ioktorutilsiobytechannelnative"오류
- json - flutter - josn dat를 api에 전송하여 오류를 가져옵니다 nosuchmethoderror : 'list '클래스에 'tomap'인스턴스 메서드가 없습니다
- haskell - 유형 클래스 함수를 구현할 때 유형 오류를 일치시킬 수 없습니다
- arrays - C ++에서 "표현식에는 클래스 유형이 있어야합니다"오류
- php - amazon s3 - 포착되지 않은 오류 : 's3client'클래스를 찾을 수 없습니다
- java - "기호 클래스를 찾을 수 없음 - ch ","기호를 찾을 수 없음 :nextch ();메소드"
- python - 생성 된 클래스 실행 오류 - '모듈'개체를 호출 할 수 없습니다
- xcode - 목표 C 클래스 메서드 오류 ''선언되지 않은 식별자 사용 "
- C ++에서 enum 클래스를 인쇄하려고하면 오류가 발생하는 이유는 무엇입니까?
- amazon web services - AWS-SDK JS V3을 사용하여 S3 클래스를 인스턴스화 할 때 '자격 증명이 없습니다'오류
트렌드
- OpenCv의 폴더에서 여러 이미지 읽기 (python)
- 파이썬 셀레늄 모든 "href"속성 가져 오기
- html - 자바 스크립트 - 클릭 후 변경 버튼 텍스트 변경
- git commit - 자식 - 로컬 커밋 된 파일에 대한 변경을 취소하는 방법
- JSP에 대한 클래스를 컴파일 할 수 없습니다
- javascript - 현재 URL에서 특정 div 만 새로 고침/새로 고침
- jquery - JavaScript로 현재 세션 값을 얻으시겠습니까?
- javascript - swiperjs에서 정지, 재생 버튼 추가
- JavaScript 변수를 HTML div에 '출력'하는 방법
- python - 문자열에서 특정 문자 제거
와이즈 비즈 와이즈 비즈