์ƒˆ์†Œ์‹

๊ฒŒ์ž„์—”์ง„/Unity

[Unity3D] Exception java.lang.IllegalArgumentException: Targeting S+ (version 31 and above)

  • -
728x90

 

Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.

 

์•ˆ๋“œ๋กœ์ด๋“œ ๋น„๊ณต๊ฐœ ํ…Œ์ŠคํŠธ๋ฅผ ์ง„ํ–‰ํ•˜๋˜ ๋„์ค‘ ์ด๋Ÿฌํ•œ ์•ˆ์ •์„ฑ ๊ด€๋ จํ•˜์—ฌ ์—๋Ÿฌ๊ฐ€ ๋ฐœ๊ฒฌ๋˜์—ˆ๋‹ค๊ณ  ์•Œ๋ ค์ฃผ์—ˆ๋‹ค

ํ•ด๋‹น ๋‚ด์šฉ์„ ์ฐพ์•„๋ณด๋‹ˆ Target API Level์ด 31 ์ด์ƒ์ด๋ฉด ์ด๋Ÿฌํ•œ ๋น„์ •์ƒ ์ข…๋ฃŒ๋ฅผ ๊ฒช๊ฒŒ ๋œ๋‹ค๊ณ  ํ•œ๋‹ค

๐Ÿ’ก์ด ํ‚ค์›Œ๋“œ๋กœ ๊ฒ€์ƒ‰(Ctrl+F)๐Ÿ’ก
์ด ์ถœ์‹œ ๋ฒ„์ „ ๋ฐ ๋ชจ๋“  ์ด์ „ ๋ฒ„์ „์—์„œ๋Š” ๋‹ค์Œ ์Šคํƒ ํŠธ๋ ˆ์ด์Šค๋ฅผ ํ†ตํ•ด Android S์—์„œ ์•ฑ ๋น„์ •์ƒ ์ข…๋ฃŒ๋ฅผ ์ผ์œผํ‚ค๋Š” ๋ฒ„๊ทธ๋ฅผ ํ•ด๊ฒฐํ•˜๋ ค๋ฉด androidx.work:work-runtime:2.7.0์˜ ๋ช…์‹œ์ ์ธ ์ข…์† ํ•ญ๋ชฉ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

https://developers.google.com/admob/android/rel-notes?hl=ko

 

๋ฆด๋ฆฌ์ฆˆ ๋…ธํŠธ  |  Android  |  Google for Developers

์ด ํŽ˜์ด์ง€๋Š” Cloud Translation API๋ฅผ ํ†ตํ•ด ๋ฒˆ์—ญ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ๋ฆด๋ฆฌ์ฆˆ ๋…ธํŠธ ์ปฌ๋ ‰์…˜์„ ์‚ฌ์šฉํ•ด ์ •๋ฆฌํ•˜๊ธฐ ๋‚ด ํ™˜๊ฒฝ์„ค์ •์„ ๊ธฐ์ค€์œผ๋กœ ์ฝ˜ํ…์ธ ๋ฅผ ์ €์žฅํ•˜๊ณ  ๋ถ„๋ฅ˜ํ•˜์„ธ์š”. ๋ฒ„์ „ ๊ฐœ๋ด‰์ผ/๋ฐฉ์˜์ผ Notes 22.6.0 2023๋…„ 12์›” 6

developers.google.com

 

ํ•ด๊ฒฐ๋ฐฉ๋ฒ•์€ Build Settings - Player Settings - Publishing Settings - Build - Custom Main Gradle Template ํ™œ์„ฑํ™”

 

๊ทธ ํ›„, Assets\Plugins\Android\mainTemplate.gradle ํด๋”๋กœ ๊ฐ€์„œ Main Template ์„ ์—ด์–ด์ค๋‹ˆ๋‹ค

๊ทธ ์•ˆ์— ์•„๋ž˜์— ํ•ด๋‹น๋˜๋Š” ๋‚ด์šฉ๋“ค์„ ์‚ฝ์ž…ํ•˜์—ฌ์ฃผ๋ฉด ๋ฉ๋‹ˆ๋‹ค

์ค‘๋ณต๋œ ๊ฒƒ์€ ์ œ๊ฑฐํ•˜๊ณ  ์ƒˆ๋กญ๊ฒŒ ๋ณ€๊ฒฝํ•ด์ค๋‹ˆ๋‹ค

dependencies {
  implementation 'com.google.android.gms:play-services-ads:20.4.0'

  // For apps targeting Android 12, add WorkManager dependency.
  constraints {
    implementation('androidx.work:work-runtime:2.7.0') {
      because '''androidx.work:work-runtime:2.1.0 pulled from
      play-services-ads has a bug using PendingIntent without
      FLAG_IMMUTABLE or FLAG_MUTABLE and will fail in Apps
      targeting S+.'''
    }
  }
}

 

 

๋ฐ˜์‘ํ˜•
Contents

ํฌ์ŠคํŒ… ์ฃผ์†Œ๋ฅผ ๋ณต์‚ฌํ–ˆ์Šต๋‹ˆ๋‹ค

์ด ๊ธ€์ด ๋„์›€์ด ๋˜์—ˆ๋‹ค๋ฉด ๊ณต๊ฐ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค.