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

카테고리

분류 전체보기 (2729)
Unity3D (813)
Programming (474)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (227)
협업 (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-19 12:45

 

[Global Android version distribution]
Data from Android Studio (December 26, 2022)

 

 

[링크] https://www.megumethod.com/blog/recommended-minimum-sdk-version-for-android-projects

 

Recommended minimum SDK version for Android projects

Are you unsure of which minimum supported Android version to choose for your project? This article will guide you through the various factors that have the greatest impact on your choice of minimal SDK. By providing a comprehensive overview of these factor

www.megumethod.com

 

반응형
Posted by blueasa
, |

[Google Play Store 경고 내용]

com.google.android.recaptcha:recaptcha:18.1.2
이 SDK 버전에는 SDK 개발자의 메모가 포함되어 있습니다. SDK 개발자가 신고한 내용은 다음과 같습니다.
A critical security vulnerability was discovered in reCAPTCHA Enterprise for Mobile. The vulnerability has been patched in the latest SDK release. Customers will need to update their Android application with the reCAPTCHA Enterprise for Mobile SDK, version 18.4.0 or above. We strongly recommend you update to the latest version as soon as possible.

 

[수정]

Firebase 11.7.0(Firebase Android BoM version 32.7.1)에 수정됐다고 한다.

Firebase 11.7.0으로 버전업 하자.

 

 

[참조] https://velog.io/@hodu_angel/Firebase-com.google.android.recaptcharecaptcha18.1.2

 

velog

 

velog.io

 

[참조] https://github.com/firebase/firebase-android-sdk/issues/5638

 

reCAPTCHA Enterprise update · Issue #5638 · firebase/firebase-android-sdk

A critical security vulnerability was discovered in reCAPTCHA Enterprise for Mobile. The vulnerability has been patched in the latest SDK release. Customers will need to update their Android applic...

github.com

 

반응형
Posted by blueasa
, |

Unity 2021.3.34f1

----

 

Unity 2021.3.34f1에서 Android 빌드 테스트를 하다보니 아래와 같이 2가지 이슈가 있었다.

 

1) Android Target API Level 31 이후가 뜨지 않음.

2) Android 빌드 시, 빌드는 잘되지만 켜자마자 Runtime Crash가 발생함.

----

 

[1) 이슈]

1)의 경우는 Unity 설치 Path에 빈 칸( )이 있어서 발생하는 문제라고 한다.

 

[결론]

Unity Hub의 설치 폴더를 빈 칸( )이 없는 Path로 변경하고(Unity Hub 완전 종료 후 재실행 필요) 유니티를 다시 설치하자.

 

 

[2) 이슈]

유니티 업데이트 하고 1)의 이슈 해결하고 Android 빌드했더니, 아래와 같은 Crash 로그가 뜬다.

(iOS는 정상적으로 빌드 됨)

 

[Crash Log] signal 6 (SIGABRT), code -1 (SI_QUEUE)

 

검색해보니 아래 [참조]와 같은 내용과 해결책이 적혀 있는데,

따라해봐도 계속 Crash가 나는걸 봐선 이번 이슈와는 관련이 없는 것 같다.

(결국 Crash Log로 검색해서는 현재 상황에 맞는 답을 찾지 못했다)

 

[참조] https://stackoverflow.com/questions/76222872/unity-android-receiving-signal-crashes

 

Unity Android receiving signal crashes

Backstory I built my unity app to android x64 using IL2CPP which has worked fine in the past but after a lot of changes I'm now getting crashes somewhat spontaneously. Signals received: signal 6 (

stackoverflow.com

 

그래서 좀 더 고민하다보니 현재 프로젝트 2개를 관리중인데 Unity 2021.3.34f1에서 하나는 Runtime Crash가 나고, 하나는 Crash가 나지 않아서 비교해 보다보니 다른점이 있었다.

Crash가 나는 쪽은 대용량(150MB 이상) aab 파일 생성을 위해 Play Asset Delivery 1.7.0이 들어있었고,

Crash 가 나지 않는 쪽은 없었다.

 

혹시나하고 Play Asset Delivery를 지우고 빌드해보니 정상적으로 빌드되고 잘 실행된다.

그래서 다시 한 번 Play Asset Delivery를 현재 기준 최신 버전인 1.8.2(2024-02-16 현재 기준 최신)를 넣고 빌드해보니 역시나 잘 실행된다.

Unity 2021.3.34f1부터 Google 라이브러리 중 뭔가 바꼈다고 하는 것 같은데,

정황상 바뀐 Google 관련 라이브러리가 Play Asset Delivery 1.7.0 버전과 호환이 안되는 것 같다.

 

이전에는 Unity 2021의 gradle 버전이 기본 4.0.1이어서 Play Asset Delivery 1.7.0을 써야 됐는데,

GoogleMobileAds(Admob) 8.6.0 버전부터 gradle 4.2.0을 강제해서 올리다보니

Play Asset Delivery 1.8.x 버전대를 쓸 수 있는 상황이 왔다.

 

[결론]

Unity 2021.3.34f1 이상에서 제목과 같은 Runtime Crash가 나는데 Play Asset Delivery 1.7.0을 사용하고 있다면,

gradle 4.2.0으로 올리고, Play Asset Delivery 1.8.2(2024-02-16 현재 기준 최신)로 교체한 후 빌드해 보자.

 

[정리]

Unity 2021.3.33f1 이하 : Play Asset Delivery 1.7.0 사용

Unity 2021.3.34f1 이상 : Play Asset Delivery 1.8.2 사용

 

 

[참조] https://developers.google.com/unity/archive?hl=ko#play_asset_delivery

 

Unity용 Google 패키지 다운로드  |  Google for Developers

 

developers.google.com

반응형
Posted by blueasa
, |

Unity 2021.3.34f1

----

 

Unity 2021.3.33f1에선 잘되던게 Unity 2021.3.34f1을 설치하고 아래와 같은 에러가 뜨면서 Android Target API Level 31 이상이 뜨지 않는다.

해당 증상은 Unity 2021.3.35f1에서도 해결되지 않았다.(고칠 생각이 없는건가?)

 

[Error Log]

CommandInvokationFailure: Failed to update Android SDK package list.
C:\Program Files\Unity\Hub\Editor\2021.3.34f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\cmdline-tools\2.1\bin\sdkmanager.bat --list

 

관련 이슈 및 해결방법은 아래 참조 링크에서 볼 수 있다.

 

관련 문제는 결국 기본 설정 폴더인 'C:\Program Files' Path의 사이에 있는 빈 칸( ) 때문이란다.

유니티 관계자는 구글 탓을 하고 있는데,

Unity Hub에서 에디터 기본 설치 폴더를 'C:\Program Files\Unity\Hub\Editor'로 잡고 있으면서 남 탓 하는것도 웃기고..

Unity 2021.3.34f1을 기본 설치폴더에 설치하고 실행만 해봤어도 아는 버그를.. 결국 테스트도 안한다고 자백하는 꼴 아닌가..

 

아무튼 해결 방법 2가지를 제시 하는데,

나중을 생각해서라도 심플하게 아래와 같이

Unity Editor 기본 설치 폴더를 'C:\Program Files\Unity\Hub\Editor'에서 'C:\Unity\Hub\Editor'로 옮기자.

 

 

[참조]

https://forum.unity.com/threads/commandinvokationfailure-failed-to-update-android-sdk-package-list.1535458/

 

Bug - CommandInvokationFailure: Failed to update Android SDK package list.

Just updated to 2021.3.34f1. Using all default Unity supplied SDKs. Unable to list target platforms. Please make sure the android sdk path is correct....

forum.unity.com

 

반응형
Posted by blueasa
, |

For a while I was struggling with high crash rates on Android due to a "signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)" error in /lib/arm64/libunity.so

Unity 2021.3.26f1 (but also in all earlier Unity 2021, 2020 and 2019 versions I tried). URP 12.1.11.

SOLUTION:
The solution was to disable both Multithreaded Rendering and Graphics Jobs (I had both enabled).



Detailed Error log (with symbols):

 
2023.06.16 16:11:05.189 8877 8946 Error CRASH *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2023.06.16 16:11:05.189 8877 8946 Error CRASH Version '2021.3.26f1 (a16dc32e0ff2)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
2023.06.16 16:11:05.189 8877 8946 Error CRASH Build fingerprint: 'Nokia/Onyx_00WW/B2N_sprout:10/QKQ1.190828.002/00WW_4_15N:user/release-keys'
2023.06.16 16:11:05.189 8877 8946 Error CRASH Revision: '0'
2023.06.16 16:11:05.189 8877 8946 Error CRASH ABI: 'arm64'
2023.06.16 16:11:05.189 8877 8946 Error CRASH Timestamp: 2023-06-16 16:11:05+0200
2023.06.16 16:11:05.189 8877 8946 Error CRASH pid: 8877, tid: 8946, name: Thread-5  >>> com.kamgam.sbr2 <<<
2023.06.16 16:11:05.189 8877 8946 Error CRASH uid: 10398
2023.06.16 16:11:05.189 8877 8946 Error CRASH signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x17
2023.06.16 16:11:05.189 8877 8946 Error CRASH Cause: null pointer dereference
2023.06.16 16:11:05.189 8877 8946 Error CRASH     x0  00000072101ca8c0  x1  0000000000000000  x2  0000000000000858  x3  000000000000e56e
2023.06.16 16:11:05.189 8877 8946 Error CRASH     x4  000000000000005b  x5  00000072530c4ddc  x6  0000000000000000  x7  00000000840088d2
2023.06.16 16:11:05.189 8877 8946 Error CRASH     x8  00000072535d7530  x9  00000000fffffff1  x10 0000000000000000  x11 0000000000000000
2023.06.16 16:11:05.189 8877 8946 Error CRASH     x12 0000000000000000  x13 0000000000000000  x14 0000000000029873  x15 0000000000000001
2023.06.16 16:11:05.189 8877 8946 Error CRASH     x16 000000725351b618  x17 000000733e8c7070  x18 0000007167606000  x19 0000000000000858
2023.06.16 16:11:05.189 8877 8946 Error CRASH     x20 0000000000000000  x21 ffffffffffffffff  x22 00000071d0132308  x23 00000072101e1c70
2023.06.16 16:11:05.189 8877 8946 Error CRASH     x24 00000072101e1cf0  x25 0000000000000000  x26 00000072104b3780  x27 000000715000018c
2023.06.16 16:11:05.189 8877 8946 Error CRASH     x28 000000000000273d  x29 000000716841fc20
2023.06.16 16:11:05.189 8877 8946 Error CRASH     sp  000000716841f8c0  lr  0000007252840538  pc  0000007252840548
2023.06.16 16:11:05.189 8877 8946 Error CRASH
2023.06.16 16:11:05.189 8877 8946 Error CRASH backtrace:
2023.06.16 16:11:05.189 8877 8946 Error CRASH       #00 pc 0000000000b7c548  /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH       #01 pc 0000000000b8cd8c  /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH       #02 pc 0000000000b8ccfc  /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH       #03 pc 0000000000b44abc  /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH       #04 pc 0000000000b449a0  /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH       #05 pc 0000000000d39570  /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH       #06 pc 0000000000d3b9a8  /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH       #07 pc 0000000000d32ff0  /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH       #08 pc 0000000000513ff0  /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH       #09 pc 00000000000e6890  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) (BuildId: cf739dbc84bcc78f7a1500721bfb3758)
2023.06.16 16:11:05.189 8877 8946 Error CRASH       #10 pc 0000000000084b6c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: cf739dbc84bcc78f7a1500721bfb3758)
2023.06.16 16:11:05.328 8877 8946 Error CRASH Forwarding signal 11
0001.01.01 00:00:00.000 -1 -1 Info  --------- beginning of crash
2023.06.16 16:11:05.328 8877 8946 Fatal libc Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x17 in tid 8946 (Thread-5), pid 8877 (com.kamgam.sbr2)
 
SYMBOLICATED STACK
 
2023.06.16 16:11:05.189 8877 8946 Error CRASH       #00 pc 0000000000b7c548 (DataBufferGLES::FlushMappedRange(unsigned long, unsigned long) at ??:?)  /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH       #01 pc 0000000000b8cd8c (BufferGLES::EndWrite(unsigned long) at ??:?)  /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH       #02 pc 0000000000b8ccfc (GfxDeviceGLES::EndBufferWrite(GfxBuffer*, unsigned long) at ??:?)  /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH       #03 pc 0000000000b44abc (GeometryJobTasks::PutGeometryJobTask(GfxDevice&, GeometryJobTasks::GeometryJobTask*) at ??:?)  /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH       #04 pc 0000000000b449a0 (GeometryJobTasks::EndFrame(GfxDevice&) at ??:?)  /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH       #05 pc 0000000000d39570 (GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&) at ??:?)  /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH       #06 pc 0000000000d3b9a8 (GfxDeviceWorker::RunExt(ThreadedStreamBuffer&) at ??:?)  /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH       #07 pc 0000000000d32ff0 (GfxDeviceWorker::RunGfxDeviceWorker(void*) at ??:?)  /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH       #08 pc 0000000000513ff0 (Thread::RunThreadWrapper(void*) at ??:?)  /data/app/com.kamgam.sbr2-MA6dTM-G3o_UvCLJ-IzJ0g==/lib/arm64/libunity.so (BuildId: 0a19a0525ef8627736f4cb908c7e7b6083772483)
2023.06.16 16:11:05.189 8877 8946 Error CRASH       #09 pc 00000000000e6890 (libc.so not found)  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) (BuildId: cf739dbc84bcc78f7a1500721bfb3758)
2023.06.16 16:11:05.189 8877 8946 Error CRASH       #10 pc 0000000000084b6c (libc.so not found)  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: cf739dbc84bcc78f7a1500721bfb3758)
2023.06.16 16:11:05.328 8877 8946 Error CRASH Forwarding signal 11



This give a bit of context: This is not for a few users. The effect was tested on about 200k installs and I am pretty confident by now that it worked.




Not sure if this is a known problem. May this info help others with similar problems.

 

 

[출처] https://forum.unity.com/threads/reducing-android-crash-rate-due-to-graphics-jobs-and-multithreaded-rendering.1454152/

 

Showcase - Reducing Android Crash rate due to Graphics Jobs and Multithreaded Rendering

For a while I was struggling with high crash rates on Android due to a "signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)" error in /lib/arm64/libunity.so...

forum.unity.com

 

[참조] https://ssscool.tistory.com/387

 

[Unity] 유니티 다른폰은 괜찮은데 LG G6에서 테스트 했을때만 Crash 나는 현상 해결 (V/InputMethodManager:

[Unity] 유니티 다른폰은 괜찮은데 LG G6에서 테스트 했을때만 Crash 나는 현상 해결 (V/InputMethodManager: checkFocus: view=android.view.SurfaceView{291d66e VFE...... .F....I. 0,0-1440,2880} next=android.view.SurfaceView{291d66e VFE..

ssscool.tistory.com

[참조] https://devgod.tistory.com/58

 

Unity Crash by 'UnityGfxDeviceW'

유니티 버전을 2021.3x로 업데이트 이후 그래픽 라이브러리에서 'UnityGfxDeviceW'와 같은 메세지가 포함된 크래시가 반복적으로 발생되었다. 해결 : Multithreaded Rendering 옵션 비활성 Compute Skining 옵션 비

devgod.tistory.com

 

 

 

반응형
Posted by blueasa
, |

[링크] https://j2su0218.tistory.com/503

 

[유니티Unity]유니티에서 인앱 업데이트 지원 하기

유니티에서 인앱 업데이트 지원 하기 구글 콘솔에 새로운 버전을 업데이트했을 때, 인앱 업데이트 기능을 넣어주지 않으면 사용자가 직접 앱을 업데이트시켜주어야 한다. 하지만 중요한 기능의

j2su0218.tistory.com

 

반응형
Posted by blueasa
, |

 

[iOS] https://www.eyes.co.kr/mohae/mohae_view/547

 

아이즈모바일

아이폰 쓰는 사람 중에 인앱 광고 특히 게임 같은 거 할 때 저처럼 인앱 광고 많이 나와서 하기 싫은 사람들 있을 거예요 저는 아이가 좋아하는 무한의 계단이나 애니팡하는데 두세 판마다 인앱

www.eyes.co.kr

 

[Android] https://m.enuri.com/knowcom/detail.jsp?kbno=1335653&bbsname=nuri 

 

안드로이드폰 광고차단 꿀팁(옆동네발) - 에누리 쇼핑지식 자유게시판

에누리 자유게시판 - [안드로이드9버전 부터 가능] '설정 - 연결 - 기타연결설정' 들어가시면 프라이빗 DNS (혹은 비공개 DNS)가 있습니다. 여기에 'dns.adguard.com' 추가하시면

m.enuri.com

 

 
반응형
Posted by blueasa
, |

With recent Unity versions (2020, 2021 and 2022) Flutter Android builds will take a lot longer, because it also has to compile the IL2CPP code from Unity.

From the Readme:

  • Android builds takes forever to complete Unity 2022.1.*, remove these lines from unityLibrary/build.gradle filecommandLineArgs.add("--enable-debugger")
    commandLineArgs.add("--profiler-report")
    commandLineArgs.add("--profiler-output-file=" + workingDir + "/build/il2cpp_"+ abi + "_" + configuration + "/il2cpp_conv.traceevents")

Here is some testing to check how to speed things up.

Unity settings

IL2CPP Code Generation

  • Build Settings -> IL2CPP Code Generation: select Faster (smaller) builds instead of Faster runtime.
  • Or C# EditorUserBuildSettings.il2CppCodeGeneration = UnityEditor.Build.Il2CppCodeGeneration.OptimizeSize;

C++ compiler configuration

  • In Player settings -> Other settings -> configuration, select Debug.
  • Or C# PlayerSettings.SetIl2CppCompilerConfiguration(BuildTargetGroup.Android, Il2CppCompilerConfiguration.Debug);

Disable script debugging

Don't bother setting this in the Unity settings, it will be overridden by the build script.
Assets/FlutterUnityIntegration/Editor/build.cs
In the function DoBuildAndroid() remove the line enabling script debugging.
playerOptions.options = BuildOptions.AllowDebugging;
This is the same as removing commandLineArgs.add("--enable-debugger") from the build.gradle file after an export.

Measuring results

When you run a Flutter build, there are multiple IL2CPP stages that report their duration, with 2 sections taking far longer than all others.
We can compare these build durations when using different settings in Unity.

Log of the slow armv7 and arm64 sections

Starting: Z:\fuw20221.1.0+7\2021\example\android\unityLibrary\src\main\Il2CppOutputProject\IL2CPP\build\deploy\bee_backend\win-x64\bee_backend.exe --profile="Z:/fuw20221.1.0+7/2021/example/android/unityLibrary/build/il2cpp_armeabi-v7a_Release/il2cpp_cache/buildstate/backend_profiler1.traceevents" --stdin-canary --dagfile="Z:/fuw20221.1.0+7/2021/example/android/unityLibrary/build/il2cpp_armeabi-v7a_Release/il2cpp_cache/buildstate/bee.dag" --continue-on-failure --dagfilejson="Z:/fuw20221.1.0+7/2021/example/android/unityLibrary/build/il2cpp_armeabi-v7a_Release/il2cpp_cache/buildstate/bee.dag.json" FinalProgram
WorkingDir: Z:/fuw20221.1.0+7/2021/example/android/unityLibrary/build/il2cpp_armeabi-v7a_Release/il2cpp_cache/buildstate
ExitCode: 0 Duration: 2m:04s
Build succeeded with 553 successful nodes and 0 failed ones

Starting: Z:\fuw20221.1.0+7\2021\example\android\unityLibrary\src\main\Il2CppOutputProject\IL2CPP\build\deploy\bee_backend\win-x64\bee_backend.exe --profile="Z:/fuw20221.1.0+7/2021/example/android/unityLibrary/build/il2cpp_arm64-v8a_Release/il2cpp_cache/buildstate/backend_profiler1.traceevents" --stdin-canary --dagfile="Z:/fuw20221.1.0+7/2021/example/android/unityLibrary/build/il2cpp_arm64-v8a_Release/il2cpp_cache/buildstate/bee.dag" --continue-on-failure 
--dagfilejson="Z:/fuw20221.1.0+7/2021/example/android/unityLibrary/build/il2cpp_arm64-v8a_Release/il2cpp_cache/buildstate/bee.dag.json" FinalProgram
WorkingDir: Z:/fuw20221.1.0+7/2021/example/android/unityLibrary/build/il2cpp_arm64-v8a_Release/il2cpp_cache/buildstate
ExitCode: 0 Duration: 2m:03s
Build succeeded with 553 successful nodes and 0 failed ones
 

Results

The exact durations here aren't important, as this will be different of every computer and project setup.
This is after flutter clean and a fresh Unity export. Any subsequent runs will be faster because of caching.

Flutter build apk, with an export from Unity 2021.3.5f1 in android/unityLibrary on Windows 10.

Settingarmv7 durationarm64 duration

example project 2m:04s 2m:03s
1 - Code generation (faster builds) 1m:41s 1m:38s
2 - Compiler configuration (debug) 45s 43s
3 - No script debugging 30s 30s
1 + 2 35s 34s
1 + 2 + 3 23s 25s

Conclusion

My advice is to add this to the build script in DoBuildAndroid() for any test or debug builds, remove it for final release builds.

//Assets/FlutterUnityIntegration/Editor/build.cs
bool isReleaseBuild = false;

#if UNITY_2022_1_OR_NEWER
    PlayerSettings.SetIl2CppCompilerConfiguration(BuildTargetGroup.Android, isReleaseBuild ? Il2CppCompilerConfiguration.Release : Il2CppCompilerConfiguration.Debug);
    PlayerSettings.SetIl2CppCodeGeneration(UnityEditor.Build.NamedBuildTarget.Android, UnityEditor.Build.Il2CppCodeGeneration.OptimizeSize);
#elif UNITY_2021_2_OR_NEWER
    PlayerSettings.SetIl2CppCompilerConfiguration(BuildTargetGroup.Android, isReleaseBuild ? Il2CppCompilerConfiguration.Release : Il2CppCompilerConfiguration.Debug);
    EditorUserBuildSettings.il2CppCodeGeneration = UnityEditor.Build.Il2CppCodeGeneration.OptimizeSize;
#endif
 

If it doesn't affect your workflow, disable script debugging.

// playerOptions.options = BuildOptions.AllowDebugging;

And if you are developing on an arm64 device anyway, temporarily remove the armv7 build target from the Unity player settings.

 

 

[출처] https://github.com/juicycleff/flutter-unity-view-widget/issues/643

 

[Android] Tips to reduce android build times. · Issue #643 · juicycleff/flutter-unity-view-widget

With recent Unity versions (2020, 2021 and 2022) Flutter Android builds will take a lot longer, because it also has to compile the IL2CPP code from Unity. From the Readme: Android builds takes fore...

github.com

 

반응형
Posted by blueasa
, |

[추가] 2023-07-20

Unity 2022.3.5f1에서 이슈 해결된 것 확인함

(몇 버전부터 해결된건지는 확인 못함)

 

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

Unity 2022.2.18f1

Firebase 10.7.0

----

 

[빌드에러 #1]

> Configure project :unityLibrary
Build was configured to prefer settings repositories over project repositories but repository 'maven' was added by build file 'unityLibrary\build.gradle'


...

 

[빌드에러 #2]

Execution failed for task ':launcher:checkReleaseDuplicateClasses'.
> Could not resolve all files for configuration ':launcher:releaseRuntimeClasspath'.


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

 

 

Unity 2021에서 Unity 2022로 포팅하는 중에 위와 같은 빌드 에러가 떠서 찾아보니

Gradle 관련 Unity 2022 버그가 있는 것 같다.

 

[수정]

[참조] 링크 내용대로 아래와 같이 Gradle을 수정하고 정상적으로 빌드 되는 걸 확인 함.

간단히 정리하면 settingsTemplate.gradle에 있던 걸 baseProjectTemplate.gradle로 옮겨야 한다.

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

256p commented on Jan 24

Also, there is another workaround that keeps the Gradle version (in case some android lib requires it).
For that workaround, you will need to copy a file from /Applications/Unity/Hub/Editor/2022.2.3f1/PlaybackEngines/AndroidPlayer/Tools/GradleTemplates/settingsTemplate.gradle to Assets/Plugins/Android/settingsTemplate.gradle. That way Unity will use your template in Assets/Plugins/Android. (It's weird that Unity doesn't has a checkbox for that)
For my version of unity, it looks like that:

 

[Before] ../Assets/Plugins/Android/settingsTemplate.gradle

pluginManagement {
    repositories {
        **ARTIFACTORYREPOSITORY**
        gradlePluginPortal()
        google()
        mavenCentral()
    }
}

include ':launcher', ':unityLibrary'
**INCLUDES**

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
    repositories {
        **ARTIFACTORYREPOSITORY**
        google()
        mavenCentral()
        flatDir {
            dirs "${project(':unityLibrary').projectDir}/libs"
        }
    }
}

 

The conflicting part is RepositoriesMode.PREFER_SETTINGS. But you can safely delete the whole dependencyResolutionManagement block from here. Since the android project still needs to know about local dependencies, copy the repositories block, you will need it later.
Now settingsTemplate.gradle should look like this:

 

[After] ../Assets/Plugins/Android/settingsTemplate.gradle

pluginManagement {
    repositories {
        **ARTIFACTORYREPOSITORY**
        gradlePluginPortal()
        google()
        mavenCentral()
    }
}

include ':launcher', ':unityLibrary'
**INCLUDES**

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

Now in Project Settings > Player > Publishing Settings for Android enable Custom Base Gradle Template
Initially, it will look like that:

 

[Before] ../Assets/Plugins/Android/baseProjectTemplate.gradle

plugins {
    id 'com.android.application' version '7.1.2' apply false
    id 'com.android.library' version '7.1.2' apply false
    **BUILD_SCRIPT_DEPS**
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

 

Now create allprojects block and paste repositories copied in the settings template. As a result base template will look like that:

 

[After] ../Assets/Plugins/Android/baseProjectTemplate.gradle

plugins {
    id 'com.android.application' version '7.1.2' apply false
    id 'com.android.library' version '7.1.2' apply false
    **BUILD_SCRIPT_DEPS**
}

allprojects {
    repositories {
        **ARTIFACTORYREPOSITORY**
        google()
        mavenCentral()
        flatDir {
            dirs "${project(':unityLibrary').projectDir}/libs"
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

 

Now Gradle should build successfully.

 

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

 

[참조] https://github.com/googlesamples/unity-jar-resolver/issues/594

 

[Bug] Android Gradle project repositories block don't work for the latest Unity versions · Issue #594 · googlesamples/unity-ja

[REQUIRED] Please fill in the following fields: Unity editor version: 2022.2.2f1 External Dependency Manager version: 1.2.175 Source you installed EDM4U: .unitypackage Features in External Dependen...

github.com

 

 

반응형
Posted by blueasa
, |

 [링크] http://lancekun.com/blog/?p=599

 

안드로이드 Gradle / IL2CPP 환경에서 프로세스 남는 현상 – 랜스군의 게임공작소

유니티2018.3.12 에서gradle로 빌드시에 Application.Quit 으로 종료이후 다시 재실행시 UnityIAP 초기화가 실패하는 경우가 있습니다. 대략적으로 Inventory를 갱신시켜준후 Java프록시 호출이 실패하는 이슈(

lancekun.com

 

반응형
Posted by blueasa
, |