블로그 이미지
Every unexpected event is a path to learning for you.

카테고리

분류 전체보기 (2731)
Unity3D (814)
Programming (474)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (228)
협업 (57)
3DS Max (3)
Game (12)
Utility (136)
Etc (96)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (51)
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday
03-29 07:22

Unity 2021.3.32f1

GoogleMobileAds 8.6.0

Firebase SDK 11.6.0

----

 

[추가]

gradle을 Unity 2021 기본인 gradle plugin 4.0.1에서 gradle plugin 4.2.0으로 변경하고 나서

Unity Editor에서는 빌드가 잘되는데 이상하게 jenkins Android 에서만 빌드가 실패해서 삽질하면서 알아보니

jenkins를 Mac에 셋팅해뒀는데 gradle cache 폴더가 뭔가 꼬인 것 같다.

아래와 같은 Warning Log가 엄청나게 뜬다.

 

[Warning Log]

WARNING:/Users/{UserAccount}/.gradle/caches/transforms-2/files-2.1/ea30c3c071cd48c926311878c13eb08b/jetified-unity-classes.jar: D8: Expected stack map table for method with non-linear control flow.

 

그래서 아래 위치의 gradle cache 하위 있는 것들을 모두 삭제하고 새로 빌드를 실행해서 잘 돌아가는 것을 확인했다.

 

[Mac gradle cache 위치] /Users/{UserAccount}/.gradle/caches/

 

----

 

이번에 메모리 누수 이슈로 Unity 메이저 버전을 2022 -> 2021로 내렸는데,

GoogleMobileAds가 업데이트 돼서 기존 사용하던 8.4.1 -> 8.6.0으로 올리면서 Unity 버전관련해서 체크해야 될 사항들 간단히 정리해 둠.

 

일단 Unity 2022.3 이상은 상관 없었는데 2021.3으로 내려오면서 gradle 버전이 낮아지면서 처리할 문제가 생겼다.

아래 2가지 이슈를 수정하고 빌드 하자.

 

1) Unity 2021.3.32f1이 기본이 com.android.tools.build:gradle:4.0.1로 돼 있는데,

    GoogleMobileAds 8.6.0이 com.android.tools.build:gradle:4.2.0을 요구하고 있다.

    아래 링크의 내용을 참조해서 Base Gradle Templete에서 gradle plugin을 4.2.0으로 수정하고, gradle 6.7.1을 설치 및 연동하자.

 

   [설명 링크] https://developers.google.com/admob/unity/gradle?hl=ko#unity-integrated-builds

 

Android용 Gradle 업그레이드  |  Unity  |  Google for Developers

이 페이지는 Cloud Translation API를 통해 번역되었습니다. Switch to English Android용 Gradle 업그레이드 컬렉션을 사용해 정리하기 내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요. The Google Mobile Ad

developers.google.com

 

['gradle 6.7.1 bin' Download Link] https://gradle.org/next-steps/?version=6.7.1&format=bin

 

Gradle | Thank you for downloading Gradle!

Next steps after downloading Gradle

gradle.org

 

2) 그리고, GoogleMobileAds 셋팅 파일에 Unity 2022.1 이하 프로젝트 관련 옵션이 2개 추가 되어 있는데,

     Unity 2021.3을 쓰고 있어서 둘 다 체크해야 된다.

    아래 내용과 링크를 참조하자.

GoogleMobileAds 8.6.0 Settings

 

[참조 링크] https://github.com/googleads/googleads-mobile-unity/issues/2930

 

play-services-ads:22.4.0 issue · Issue #2930 · googleads/googleads-mobile-unity

[REQUIRED] Step 1: Describe your environment Unity version: 2021.3.30f1 Google Mobile Ads Unity plugin version: 8.5.2 Platform: Android - Unity Editor Mediation ad networks used, and their versions...

github.com

 

[잡담]

Google도 이제 대충 하는건지..

이번에 새로 추가된 class 중에 Utils가 있는데 다른데서도 많이 쓰는 이름인데 namespace를 지정 안해놔서 클래스 명 충돌이 나서 namespace GoogleMobileAds로 처리 했다.

 

 

----

[참고]

Firebase도 당장은 아니지만(현재 Firebase SDK 11.6.0 기준 Firebase Android BoM 32.3.1) 추후 버전에서 곧 Android Gradle Plugin 버전을 4.2.0으로 강제하게 될 것 같다.

Firebase Android BoM Release Notes

[링크] https://firebase.google.com/support/release-notes/android

 

Firebase Android SDK Release Notes

 

firebase.google.com

 

 

 

반응형
Posted by blueasa
, |

[링크] https://wergia.tistory.com/353

 

[Unity] 유니티 공식 지원 오브젝트 풀링

개발단에 가입하여 베르의 게임 개발 유튜브를 후원해주세요! 베르의 게임 개발 유튜브 안녕하세요! 여러분들과 함께 게임 개발을 공부하는 베르입니다! 게임 개발에 도움이 되는 강좌들을 올

wergia.tistory.com

 

반응형
Posted by blueasa
, |

Untiy 2021.3.14f1

GoogleMobileAds 7.3.0

----

 

Unity 2021로 엔진 업데이트를 하고 빌드해보려는데 에러가 나서 보니 GoogleMobileAds 7.3.0 관련 이슈인 것 같다.

(GoogleMobileAds 7.2.0은 빌드 잘됨)

검색해보니 아래와 같은 해결책이 나온다.

 

- 간단히 말하면 Unity 2021에서 GoogleMobileAds 7.3.0을 쓰려면 gradle 버전 업데이트 하라고 한다. (아래 내용 따라하라고 함)

- 그래서 난 일단 GoogleMobileAds 7.2.0으로 버전을 내렸다(?)

 

--------------------------------------------------------------------------------------------------------------------------------

·8 mo. ago·edited 8 mo. ago

Yo so I found a way to solve this, assuming you are using applovin or charboost , what I did was:

  • Delete resolved libraries : Assets> External Dependancy Manager > Android resolver > Delete resolve libs
  • in player settings > pulishing settings uncheck all the one under build
  • Download gradle 6.9
  • Prefrences > external tools > uncheck gradle and browse to the installed gradle
  • Assets> External Dependancy Manager > Android resolver > Force resolve
  • then player settings > pulishing settings check all the ones you uncheck plus Custom Base Gradle Template
  • edit the file Asstes\Plugins\Android\baseProjectTemplate.gradle
  • change target api level to 31
  • change the line that looks like classpath 'com.android.tools.build:gradle:yourversion' to classpath 'com.android.tools.build:gradle:4.2.0'

Build now it works. the funny thing is that gradle is 6.9 and com.adroid.tools.build:gradle: is 4.2.0 but it works.

[출처] https://www.reddit.com/r/Unity3D/comments/tktc13/i_need_help_asap/

 

I NEED HELP ASAP

**Hello everyone. I've been trying to build my game but I get these errors:** *...

www.reddit.com

--------------------------------------------------------------------------------------------------------------------------------

Hello. I solved my problem this way.
Download the latest Gradle version here.
https://gradle.org/releases/

Place the unzipped Gradle file in the following location
/Applications/Unity/Hub/Editor/2021.3.12f1/PlaybackEngines/AndroidPlayer/Tools/gradle/
Please note that 2021.3.12f1 is the editor version and should be replaced with your own environment.

Next, open Unity and change the Gradle to be used.
From the top menu, select Unity > Preferences and open External Tools.

Uncheck the box marked "Gradle Installed with Unity (recommended)" and enter the path to the Gradle you just placed.

Now the Gradle used for building has been switched to a different version.
If there are no problems with the version, you should now be able to build Android.

 

[출처] https://github.com/googleads/googleads-mobile-unity/issues/2390

 

This feature requires ASM7 · Issue #2390 · googleads/googleads-mobile-unity

[REQUIRED] Step 1: Describe your environment Unity version: 2021.3.12f1 Google Mobile Ads Unity plugin version: 7.3.0 Platform: Unity Editor Platform OS version: Android 12 Any specific devices iss...

github.com

 

반응형
Posted by blueasa
, |