블로그 이미지
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 00:00

[추가]

Unity v5.6.7, Android SDK 최신 버전에서 READ_PHONE_STATE 권한을 제거 했는데도 계속 추가되는 문제가 있어서 알아본 결과 Android SDK 최신 버전에서 필요하다고 판단되면 READ_PHONE_STATE를 강제로 추가하고 있다.

(Unity 최신버전(현재 Unity 2018이상 버전)에서는 해당 버그가 수정된 듯 하다.)

 

내 경우는 SystemInfo.deviceUniqueIdentifier를 사용하게 되면서 필요하다고 판단해서 READ_PHONE_STATE를 추가시키고 있었다.

 

아래 설명대로 Android SDK 25.2.5 버전에서는 강제로 추가하는 문제가 없어서 SDK 버전을 되돌렸는데

Manifest Merge 관련 문제가 많이 나와서(최신 Android SDK에서는 자동 정리해주는 중복 Manifest 관련 문제를 25.2.5에서는 자동으로 해결해주지 못해서 직접 수정함) 문제되는 aar 파일 안의 AndroidManifest 파일을 모두 수정해서 해결 했다.

한 10개정도 수정한 듯..

 

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

 

Steps to reproduce:

1) Update SDK to the latest version (26.0.2) 
2) Download attached project 'Repo.zip' and open in Unity 
3) Build .apk file 
4) Open 'AndroidManifest.xml' file (Temp/StagingArea/AndroidManifest.xml)

Expected result:READ_PHONE_STATE permission should not be added in the AndroidManifest.xml (check attachment 'AndroidManifest_created_with_26.0.2.xml') 
Actual result: READ_PHONE_STATE permission is added in the AndroidManifest.xml (check attachment 'AndroidManifest_created_with.25.2.3.xml')

Reproduced with: 
5.5.4p1, 5.6.2p1, 2017.1.0f1, 2017.2.0b1

Note: READ_PHONE_STATE permission wasn't added using 25.2.5 sdk

RESOLUTION: By design. The project includes a plugin (com.nerd.TapdaqUnityPlugin) which does not specify targetSdkVersion in its manifest. Thus android manifest merger correctly assumes that the SDK version is lower than 4 and implicitly grants the READ_PHONE_STATE permission. See https://developer.android.com/reference/android/Manifest.permission.html#READ_PHONE_STATE. The difference between 25.2.5 and 26.0.2 SDKs is that in the latter we use different manifest merger implementation which is more strict.

 

[출처]

https://issuetracker.unity3d.com/issues/android-read-phone-state-permission-is-added-in-the-androidmanifest-dot-xml-file-using-latest-26-dot-0-2-sdk

 

Unity IssueTracker - [Android] READ_PHONE_STATE permission is added in the AndroidManifest.xml file using latest (26.0.2) SDK

Steps to reproduce: 1) Update SDK to the latest version (26.0.2) 2) Download attached project 'Repo.zip' and open in Unity 3) Build ...

issuetracker.unity3d.com

 

반응형
Posted by blueasa
, |