Googleads-mobile-unity: in unity App ID removed after build ; ad do not show on android device

Created on 10 Jun 2021  路  6Comments  路  Source: googleads/googleads-mobile-unity

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

Most helpful comment

You can fix it when you place App ID directly in the script like a string. :)

All 6 comments

This is happening because the code contains reflection for some reason in MobileAds:105. Because of this (completely unnecessary) reflection, compiler is optimizing out GoogleMobileAdsClientFactory. Temporaty workaround: place
GoogleMobileAds.GoogleMobileAdsClientFactory hack = new GoogleMobileAdsClientFactory(); Debug.Log(hack == null);
anywhere is your code so compiler would know this class is being used. Also, find your GoogleMobileAds.Unity.dll and select ONLY editor platform for it

You can fix it when you place App ID directly in the script like a string. :)

having the same issue

The problem remains in version 6.0.1

Version 6.1.1 has already been released, but the problem still remains. Are they going to rule her at all?

This issue is resolved in "Google Mobile Ads Unity Plugin v6.1.2". I am using this version, and doesn't face this issue.

Was this page helpful?
0 / 5 - 0 ratings