프로그래밍/유니티

[유니티]애드몹 패키지 설치 후 에러 해결

do121 2025. 1. 27. 07:18

 

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':launcher:checkReleaseAarMetadata'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
   > 5 issues were found when checking AAR metadata:
     
       1.  Dependency 'androidx.browser:browser:1.8.0' requires libraries and applications that
           depend on it to compile against version 34 or later of the
           Android APIs.
     
           :launcher is currently compiled against android-32.
     
           Recommended action: Update this project to use a newer compileSdk
           of at least 34, for example 34.
     
           Note that updating a library or application's compileSdk (which
           allows newer APIs to be used) can be done separately from updating
           targetSdk (which opts the app in to new runtime behavior) and
           minSdk (which determines which devices the app can be installed
           on).
     
       2.  Dependency 'androidx.webkit:webkit:1.11.0-alpha02' requires libraries and applications that
           depend on it to compile against version 34 or later of the
           Android APIs.
     
           :launcher is currently compiled against android-32.
     
           Recommended action: Update this project to use a newer compileSdk
           of at least 34, for example 34.
     
           Note that updating a library or application's compileSdk (which
           allows newer APIs to be used) can be done separately from updating
           targetSdk (which opts the app in to new runtime behavior) and
           minSdk (which determines which devices the app can be installed
           on).
     
       3.  Dependency 'androidx.privacysandbox.ads:ads-adservices-java:1.0.0-beta05' requires libraries and applications that
           depend on it to compile against version 33 or later of the
           Android APIs.
     
           :launcher is currently compiled against android-32.
     
           Recommended action: Update this project to use a newer compileSdk
           of at least 33, for example 34.
     
           Note that updating a library or application's compileSdk (which
           allows newer APIs to be used) can be done separately from updating
           targetSdk (which opts the app in to new runtime behavior) and
           minSdk (which determines which devices the app can be installed
           on).
     
       4.  Dependency 'androidx.privacysandbox.ads:ads-adservices:1.0.0-beta05' requires libraries and applications that
           depend on it to compile against version 33 or later of the
           Android APIs.
     
           :launcher is currently compiled against android-32.
     
           Recommended action: Update this project to use a newer compileSdk
           of at least 33, for example 34.
     
           Note that updating a library or application's compileSdk (which
           allows newer APIs to be used) can be done separately from updating
           targetSdk (which opts the app in to new runtime behavior) and
           minSdk (which determines which devices the app can be installed
           on).
     
       5.  Dependency 'androidx.annotation:annotation-experimental:1.4.0' requires libraries and applications that
           depend on it to compile against version 34 or later of the
           Android APIs.
     
           :launcher is currently compiled against android-32.
     
           Recommended action: Update this project to use a newer compileSdk
           of at least 34, for example 34.
     
           Note that updating a library or application's compileSdk (which
           allows newer APIs to be used) can be done separately from updating
           targetSdk (which opts the app in to new runtime behavior) and
           minSdk (which determines which devices the app can be installed
           on).

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 16s
]
stdout[

> Configure project :unityLibrary
Variant 'debug', will keep symbols in binaries for:
  'libunity.so'
  'libil2cpp.so'
  'libmain.so'
Variant 'release', symbols will be stripped from binaries.

> Configure project :launcher
Variant 'debug', will keep symbols in binaries for:
  'libunity.so'
  'libil2cpp.so'
  'libmain.so'
Variant 'release', symbols will be stripped from binaries.

> Task :unityLibrary:preBuild UP-TO-DATE
> Task :unityLibrary:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:preBuild UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:preBuild UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:writeReleaseAarMetadata UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:writeReleaseAarMetadata UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:generateReleaseResValues UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:writeReleaseAarMetadata UP-TO-DATE
> Task :unityLibrary:generateReleaseResValues UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseResValues UP-TO-DATE
> Task :unityLibrary:generateReleaseResources UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:generateReleaseResources UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseResources UP-TO-DATE
> Task :unityLibrary:packageReleaseResources UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:packageReleaseResources UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseResources UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:extractDeepLinksRelease UP-TO-DATE
> Task :unityLibrary:extractDeepLinksRelease UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:extractDeepLinksRelease UP-TO-DATE
> Task :unityLibrary:processReleaseManifest UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:processReleaseManifest UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:processReleaseManifest UP-TO-DATE
> Task :unityLibrary:compileReleaseLibraryResources UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:compileReleaseLibraryResources UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseLibraryResources UP-TO-DATE
> Task :unityLibrary:parseReleaseLocalResources UP-TO-DATE
> Task :unityLibrary:generateReleaseRFile UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:parseReleaseLocalResources UP-TO-DATE
> Task :unityLibrary:javaPreCompileRelease UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseRFile UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:parseReleaseLocalResources UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:javaPreCompileRelease UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:generateReleaseRFile UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:javaPreCompileRelease UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseJavaWithJavac NO-SOURCE
> Task :unityLibrary:processReleaseJavaRes UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:bundleLibCompileToJarRelease UP-TO-DATE
> Task :unityLibrary:extractProguardFiles UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:bundleLibRuntimeToJarRelease UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:processReleaseJavaRes NO-SOURCE
> Task :unityLibrary:prepareLintJarForPublish UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:createFullJarRelease UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:extractProguardFiles UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:compileReleaseJavaWithJavac UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseLintModel UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:prepareLintJarForPublish UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:mergeReleaseJniLibFolders UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:mergeReleaseNativeLibs NO-SOURCE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:stripReleaseDebugSymbols NO-SOURCE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:copyReleaseJniLibsProjectAndLocalJars UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:extractDeepLinksForAarRelease UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:processReleaseJavaRes NO-SOURCE
> Task :unityLibrary:mobilenotifications.androidlib:extractProguardFiles UP-TO-DATE
> Task :launcher:preBuild UP-TO-DATE
> Task :launcher:preReleaseBuild UP-TO-DATE
> Task :launcher:javaPreCompileRelease UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:bundleLibRuntimeToJarRelease
> Task :unityLibrary:mobilenotifications.androidlib:bundleLibCompileToJarRelease
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:extractReleaseAnnotations UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:mergeReleaseGeneratedProguardFiles
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:mergeReleaseConsumerProguardFiles
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:mergeReleaseShaders UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseShaders NO-SOURCE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseAssets UP-TO-DATE
> Task :launcher:generateReleaseResValues UP-TO-DATE
> Task :launcher:mapReleaseSourceSetPaths UP-TO-DATE
> Task :launcher:generateReleaseResources UP-TO-DATE
> Task :launcher:checkReleaseAarMetadata FAILED
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseAssets
> Task :unityLibrary:configureCMakeRelWithDebInfo[arm64-v8a]
> Task :unityLibrary:mobilenotifications.androidlib:generateRelease<message truncated>

 

애드몹 패키지 설치 후 위와 같이 sdk를 34로 업데이트하라는 에러 발생시 

아래와 같이 미니멈 api level을 34로 변경하여 빌드 후 다시 원래 level로 변경하면 됨

'프로그래밍 > 유니티' 카테고리의 다른 글

TextMeshPro 한글 폰트 추가하기  (0) 2024.12.24