[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unity 2023 WARNING:We recommend using a newer Android Gradle plugin to use compileSdk = 34!! #3040

Closed
thanhtoan88 opened this issue Nov 25, 2023 · 7 comments
Assignees
Labels
Support General question, Installation question, or feedback.

Comments

@thanhtoan88
Copy link

Step 0: Are you in the right place?

  • For general technical questions, or help with project-specific issues like setting up ads in
    your app, reach out to our support team on the
    Developer Forum.

  • For assistance with your AdMob account, reach out to
    AdMob Support.

  • For feedback on our documentation,
    send your feedback by pressing the Send Feedback button at the top right of the
    documentation page you are on.

  • For issues related to the code in this repository, continue filing this GitHub issue.

  • Once you've read this section and determined that your issue is appropriate for
    this repository, please delete this section.

[REQUIRED] Step 1: Describe your environment

  • Unity version: _____
  • Google Mobile Ads Unity plugin version: _____
  • Platform: _____ (iOS, Android, Unity Editor)
  • Platform OS version: _____ (eg iOS 10, Android 9)
  • Any specific devices issue occurs on: _____
  • Mediation ad networks used, and their versions: _____

[REQUIRED] Step 2: Describe the problem

Steps to reproduce:

What happened? How can we make the problem occur?
This could be a description, log/console output, etc.

Please share a downloadable sample project that reproduces the bug, if
available. This greatly helps us to diagnose and fix the issue faster.

Relevant Code:

// TODO(you): code here to reproduce the problem
@thanhtoan88
Copy link
Author

WARNING:We recommend using a newer Android Gradle plugin to use compileSdk = 34

This Android Gradle plugin (7.3.1) was tested up to compileSdk = 33

This warning can be suppressed by adding
android.suppressUnsupportedCompileSdk=34
to this project's gradle.properties

@NVentimiglia
Copy link
Member

@thanhtoan88

I was unable to see this issue. I tested against plugin 8.6.0 on Unity Editor 2019 and 2022 using both the internal build system and a gradle export build. I did not see this issue in UnityEditor or in Android Studio.

What is your environment ?

@NVentimiglia NVentimiglia self-assigned this Nov 28, 2023
@NVentimiglia NVentimiglia added the Support General question, Installation question, or feedback. label Nov 28, 2023
@NVentimiglia
Copy link
Member

Actually, I was able to replicate this issue once on Unity 2022 for an internal build. That said, It went away when I tried to build again. Do you have reliable replication steps?

@wkb786
Copy link
wkb786 commented Dec 10, 2023

Using Unity 2023.2.2 just import the admob skd 8.6.0 and try to build but error

WARNING:We recommend using a newer Android Gradle plugin to use compileSdk = 34

This Android Gradle plugin (7.3.1) was tested up to compileSdk = 33

This warning can be suppressed by adding
android.suppressUnsupportedCompileSdk=34
to this project's gradle.properties

The build will continue, but you are strongly encouraged to update your project to
use a newer Android Gradle Plugin that has been tested with compileSdk = 34

Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:preBuild UP-TO-DATE
Task :unityLibrary:preBuild UP-TO-DATE
Task :unityLibrary:preReleaseBuild UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:preReleaseBuild UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseAidl NO-SOURCE
Task :launcher:preBuild UP-TO-DATE
Task :launcher:preReleaseBuild UP-TO-DATE
Task :launcher:generateReleaseBuildConfig UP-TO-DATE
Task :launcher:javaPreCompileRelease UP-TO-DATE
Task :launcher:generateReleaseResValues UP-TO-DATE
Task :launcher:createReleaseCompatibleScreenManifests UP-TO-DATE
Task :launcher:extractProguardFiles UP-TO-DATE
Task :launcher:mergeReleaseJniLibFolders UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:mergeReleaseJniLibFolders
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:mergeReleaseNativeLibs NO-SOURCE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseRenderscript NO-SOURCE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseRenderscript NO-SOURCE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseResValues
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseResources
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:copyReleaseJniLibsProjectOnly
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseResources
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseBuildConfig
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:stripReleaseDebugSymbols NO-SOURCE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:javaPreCompileRelease
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:extractDeepLinksForAarRelease
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:mergeReleaseShaders
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:parseReleaseLocalResources
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseShaders NO-SOURCE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseAssets UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:copyReleaseJniLibsProjectAndLocalJars
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseAssets
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:prepareReleaseArtProfile
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:prepareLintJarForPublish
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:processReleaseJavaRes NO-SOURCE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:extractDeepLinksRelease
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:writeReleaseAarMetadata
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:bundleLibResRelease NO-SOURCE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseLibraryResources
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:writeReleaseLintModelMetadata

Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:processReleaseManifest
package="com.google.unity.ads" found in source AndroidManifest.xml: D:\Wepak games\Find the Alien 3 Mobile\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\GoogleMobileAdsPlugin.androidlib\AndroidManifest.xml.
Setting the namespace via a source AndroidManifest.xml's package attribute is deprecated.
Please instead set the namespace (or testNamespace) in the module's build.gradle file, as described here: https://developer.android.com/studio/build/configure-app-module#set-namespace
This migration can be done automatically using the AGP Upgrade Assistant, please refer to https://developer.android.com/studio/build/agp-upgrade-assistant for more information.

Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:mergeReleaseJavaResource
Task :launcher:mergeReleaseShaders UP-TO-DATE
Task :launcher:compileReleaseShaders NO-SOURCE
Task :launcher:generateReleaseAssets UP-TO-DATE
Task :launcher:processReleaseJavaRes NO-SOURCE
Task :launcher:collectReleaseDependencies
Task :launcher:sdkReleaseDependencyData
Task :launcher:validateSigningRelease UP-TO-DATE
Task :launcher:writeReleaseAppMetadata UP-TO-DATE
Task :launcher:writeReleaseSigningConfigVersions UP-TO-DATE
Task :launcher:checkReleaseDuplicateClasses
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseRFile
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseJavaWithJavac
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:bundleLibCompileToJarRelease
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:extractReleaseAnnotations
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:mergeReleaseGeneratedProguardFiles
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:mergeReleaseConsumerProguardFiles
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:syncReleaseLibJars
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:bundleReleaseLocalLintAar
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:bundleLibRuntimeToJarRelease
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:createFullJarRelease
Task :unityLibrary:configureCMakeRelWithDebInfo[arm64-v8a]
Task :unityLibrary:compileReleaseAidl NO-SOURCE
Task :launcher:compileReleaseAidl NO-SOURCE
Task :unityLibrary:buildCMakeRelWithDebInfo[arm64-v8a]
Task :unityLibrary:configureCMakeRelWithDebInfo[armeabi-v7a]
Task :unityLibrary:buildCMakeRelWithDebInfo[armeabi-v7a]
Task :unityLibrary:externalNativeBuildRelease
Task :unityLibrary:mergeReleaseJniLibFolders
Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
Task :unityLibrary:generateReleaseResValues UP-TO-DATE
Task :unityLibrary:extractDeepLinksForAarRelease UP-TO-DATE
Task :unityLibrary:generateReleaseBuildConfig UP-TO-DATE
Task :unityLibrary:generateReleaseResources UP-TO-DATE
Task :unityLibrary:packageReleaseResources UP-TO-DATE
Task :unityLibrary:parseReleaseLocalResources UP-TO-DATE
Task :unityLibrary:processReleaseManifest UP-TO-DATE
Task :unityLibrary:javaPreCompileRelease UP-TO-DATE
Task :unityLibrary:mergeReleaseShaders UP-TO-DATE
Task :unityLibrary:compileReleaseShaders NO-SOURCE
Task :unityLibrary:generateReleaseAssets UP-TO-DATE
Task :unityLibrary:packageReleaseAssets
Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
Task :unityLibrary:prepareLintJarForPublish UP-TO-DATE
Task :unityLibrary:prepareReleaseArtProfile UP-TO-DATE
Task :unityLibrary:processReleaseJavaRes UP-TO-DATE
Task :unityLibrary:generateReleaseRFile
Task :unityLibrary:mergeReleaseNativeLibs
Task :launcher:mergeReleaseAssets
Task :launcher:compileReleaseRenderscript NO-SOURCE
Task :unityLibrary:extractReleaseAnnotations
Task :launcher:mapReleaseSourceSetPaths
Task :launcher:generateReleaseResources UP-TO-DATE
Task :unityLibrary:mergeReleaseJavaResource FAILED
Task :unityLibrary:stripReleaseDebugSymbols

Task :unityLibrary:compileReleaseJavaWithJavac

Task :launcher:desugarReleaseFileDependencies
Task :launcher:mergeReleaseResources
70 actionable tasks: 49 executed, 21 up-to-date

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

@vijaygopalbalasa
Copy link

Hi, You can follow this guide to fix the above issue:
https://androidstrike.com/fix-we-recommend-using-a-newer-android-gradle-plugin-to-use-compilesdk-34/

@badjano
Copy link
badjano commented Feb 28, 2024

I raised Minimum API Level to 34, then it prompted me to update gradle, and then I turned back to API 22

@NVentimiglia
Copy link
Member

Hi,

Did you guys toggle the new Google Mobile Ads Settings ?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support General question, Installation question, or feedback.
Projects
None yet
Development

No branches or pull requests

5 participants