[Note] แก้ปัญหา Library ตอน Build เกมมือถือ Unity

Facebook Audience Network

ถ้าในโปรเจคมี Jar Resolver (ซึ่งมีมากับ Play Games Plugin ด้วย)

ต้องลบ

  • Support-compat
  • Support-core-ui
  • Support-core-utils
  • Support-v4

ออกจาก Assets/AudienceNetwork/Plugins/Android/libs เพื่อแก้ปัญหา Duplicate Library

ฝั่ง iOS ตอนนี้ยังต้องใช้ Version 5.20 ไปก่อน เพราะติดปัญหา Duplicate Symbol (Issues Report)

ของ iOS ต้องใส่ -lxml2 ไปใน Other Linker Flags ด้วย


Unity Ads

ตอนนี้มีอันใหม่คือ Unity Monetization ดังนั้นลบ Unity Ads ออกใน Package Manager ได้เลย


Enable Multidex (Android)

สามารถทำได้โดยเปิดใช้ Custom Gradle Template แล้วใส่ multiDexEnabled true ไปใน defaultConfig (ไฟล์ mainTemplate.gradle)

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade