Cannot fit requested classes in a single dex file (# methods: 105461 > 65536)와 같은 에러가 나는 경우 참고
169
작성한 질문수 2
컨텐츠 데이터 모델차시에서 발생할 수 있는 에러입니다. 아마도 firebase 관련 dependencies가 많아지기 때문에 발생하는 것으로 생각됩니다.(이 에러는 앱에서 참고하는 메서드의 개수가 65536개가 넘는 경우 발생합니다.)
앱이 Androidx 환경에서 작동하는 경우, 이를 해결하기 위해서는
https://stackoverflow.com/questions/48249633/errorcannot-fit-requested-classes-in-a-single-dex-file-try-supplying-a-main-dex 에서 gsm이 작성한 For Androidx Users,로 시작하는 부분을 참고하시면 됩니다.
추가되는 건 build.gradle(Module: app)에서 minifyEnabled false와 implementation 'androidx.multidex:multidex:2.0.1'입니다.
하울님의 howlstagram github에 업로드된 자료에도 위 부분이 추가 되어있습니다.
예시)
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.howlstagram_f16"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
buildToolsVersion "28.0.3"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.firebase:firebase-auth:16.1.0'
implementation 'com.google.firebase:firebase-storage:16.0.5'
implementation 'com.google.firebase:firebase-firestore:18.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.android.support:design:28.0.0'
implementation 'androidx.multidex:multidex:2.0.1'
}
답변 0
CloudFireStore에 데이터가 들어가지 않아요
0
74
1
firebase storage에서 putfile해도 이미지 업로드가 안되요..
0
97
1
1강 AndroidManifest.xml 코드 오류
0
466
1
도와주세요 ㅠㅠ
0
405
1
게시물이 뜨지 않습니다.(detail_veiw)
0
382
0
NavigationBarView 사용법 변경으로 인한 네비게이션 바 애니메이션 적용법
0
513
1
안드로이드 11 이상부터 startActivityForResult 지원 안하므로 다른 방법 이용
0
360
1
bottom_navigation 오류
0
425
1
게시물을 최신게시물순으로 하고싶은데 어떻게 하면 될까요..?ㅠ
0
271
1
오류..? 에러..?
0
472
0
페이스북 로그인
0
355
0
댓글 activity에서 mainActivity의 userFragment 이동 방법관련..
0
366
1
댓글activity에서 userId를 클릭했을 때
0
295
1
파이어베이스 연결에서 막힙니다,,
0
399
1
파이어베이스 이미지url Glide로 불러올 때 에러
1
554
1
- 혹시 사진 업로드 여러장 되게 할수 있는 방법이 있을까요??
0
420
1
화면전환시 색깔이 안나오고 흰바탕입니다
0
260
1
Facebook공식 문서에서 제공해주는 최신 SDK 오류
1
282
0
startActivityForResult와 onActivityResult는 이제 안드로이드 스튜디오에서 못쓰게 하는데 어떻게 수정 해야 할까요?
0
391
1
google 계정 선택창이 아예 뜨지 않습니다.
0
298
1
로그인 시 에러
0
315
0
3강에서 startActivityForResult 사용불가 문제
0
450
1
인스타그램 자바언어로 하는 클론코딩은 없을까요?
0
1697
1
mainfest 오류
1
242
0





