본문 바로가기

EXPERIENCE/Unity

[Unity/Android] ClassNotFoundException: Didn't find class ERROR 해결방법

728x90
728x90

 

 

유니티를 통한 안드로이드 빌드 중 다음과 같은 오류가 발생했다.

ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.zzbq" on path: DexPathList ...

이를 해결하는데 아래 링크에서 도움을 얻을 수 있었다.

 

 

Didn't find class "com.google.android.gms.common.internal.zzbq" on path: DexPathList

My Gradle File: apply plugin: 'com.android.application' android { compileSdkVersion 26 buildToolsVersion '26.0.1' defaultConfig { applicationId "com.mystorie.totheworld"

stackoverflow.com

나의 경우에는 중복하여 같은 서비스가 존재하는게 문제였는데,

다른 사람의 경우에는 아예 추가되어있지 않아서 발생하기도 하는 걸로 보인다.

 

 

해결 방법

 

  • dependencies 중복 서비스 삭제 또는 알맞은 서비스 추가

1. Edit > Project Settings > Player > Publishing Settings
2. Custom Main Gradle Template 체크

 

 

728x90

 

 

3. 프로젝트 폴더 > Assets > Plugins > Android 폴더 내
4. mainTemplate.gradle 열기
5. 필요에 따라 아래 중 1개의 서비스만 사용
  implementation 'com.google.android.gms:play-services:12.0.1'
또는
  implementation 'com.google.android.gms:play-services-ads:+'

 

 

개인적으로는 12.0.1 버전을 사용했었고 오류가 잘 해결된 것을 볼 수 있었다!

 

 

 

 

 

 

 

728x90
728x90