본문 바로가기

Unity/Unity3D_MyProject

[Unity/유니티] the attribute meta-data#com.google.android.play.billingclient.version@value=5.2.1 in: googleplaybilling : collides with another value (see the console for details)

--앱 출시 전 나의 앱 출시 라이브러리 결제버전을 5 로 변경해야한다는 오류가 나왔다.

1. 2023년 8월 2일부터 모든 신규 앱은 결제 라이브러리 버전 5 이상을 사용해야 합니다. 2023년 11월 1일부터는 기존 앱의 모든 업데이트에도 결제 라이브러리 버전 5 이상이 요구됩니다. 자세히 알아보기
2. 앱이 Android 14 이상을 타겟팅하는 경우 PBL 5.2.1 또는 PBL 6.0.1 이상으로 업데이트해야 합니다.

 

 

-일단 나의 유니티 프로젝트 내(window-Pakage Manager)에서 In App Purchasing 패키지를 설치해야 했다.

(상단의 Pakages:In Project 내에 In App Purchasing 패키지가 있다면 버전 업그레이드를 없다면 Pakages: Unity Resistry에서 In App Purchasing 을 버전에 맞게 설치해준다)

 

- In App Purchasing  어떤 버전을 설치할지는 아래 링크에서 Google Billing 버전이 5 이상인  In App Purchasing 버전을 설치 한다.

 

- 따라서 가장 In App Purchasing 가장 최신 버전인 4.9.4 버전(Google Billing 버전은 5.2.1.)을 유니티 프로젝트 내에서 설치했다.

 

https://docs.unity3d.com/Packages/com.unity.purchasing@4.9/manual/StoresSupported.html

 

Stores supported by Unity IAP | In App Purchasing | 4.9.4

Stores supported by Unity IAP The following is the full list of stores supported by the In-App Purchasing packages with the versions of those stores and links to the stores. Store Name Platform Version Website Google Billing Android 5.2.1 Google Release No

docs.unity3d.com

 

이 후 abb파일로 빌드를 했는데 아래와 같은 빌드오류구문이 발생했다..

 

1.메인오류

the attribute meta-data#com.google.android.play.billingclient.version@value=5.2.1 in: googleplaybilling : collides with another value (see the console for details)

 

2.콘솔오류

attribute com.google.android.play.billingclient.version@value value=(5.2.1) from [:billing-:] androidmanifest.xml:%0d%0a%09is also present at [:googleplaybilling:] androidmanifest.xml:1 value=3.0.3%0d%0a%09suggestion: add 'tools:replace="android:value"' to <meta-data> element at androidmanifest.xml:23:9-25:37 to override.

 

- 아마 기존에 나의 In App Purchasing 버전이 3.0.3 이었는데 5.2.1.로 업뎃하면서 기존 버전과 충돌이 있었던 것 같다..

그리하여 새로 설치한 Packages/com.unity.purchsing/Plugins/UnityPurchasing/Android/billing-5.2.1.aar과 중복되는기존의 billing-3.0.3.aar을 찾아서 삭제하려했는데 해당 파일이 존재하지가 않았고.. 

 

-비슷한 파일을 찾다보니

내프로젝트\Asset\play-unity-plugins-master\GooglePlayPlugins\com.google.play.billing\Runtime\Plugins

안에 GooglePlayBilling.aar 파일이 존재했다.

 

- 궁극적으로 해당 파일이 들어있는 play-unity-plugins-master 폴더를 그냥 전부 삭제하면 된다는 구글서치 결과가 있어 그냥 해당 폴더를 전부삭제했고 재빌드를 하니 오류없이 다행이 빌드가 완료 되었다..