question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Native Ads plugin broken?

See original GitHub issue

[REQUIRED] Step 1: Describe your environment

  • Unity version: 2020.3.29f1
  • Google Mobile Ads Unity plugin version: 6.1.2 & Native (latest, no version number available)
  • Platform: Android
  • Platform OS version: Android 10
  • Any specific devices issue occurs on: _____
  • Mediation ad networks used, and their versions: _____

[REQUIRED] Step 2: Describe the problem

Steps to reproduce:

When following the docs on how to include the Native Ads plugin, multiple parts in your code can’t be found/are missing, resulting in errors.

When also importing the normal version of the plugin (so both the normal and the native plugin are in the project), most errors go away, but all Native Ads methods from the docs are not found (eg. OnUnifiedNativeAdLoaded).

Changing them to their “normal” versions (eg. OnUnifiedNativeAdLoaded -> OnNativeAdLoaded) resolves the errors, but when calling adLoader.LoadAd(new AdRequest.Builder().Build());, the following exception is thrown:

Exception: Error: called non-existent method System.String GoogleMobileAds.Api.AdRequest::BuildVersionString(System.String)
at GoogleMobileAds.Api.AdRequest.BuildVersionString (System.String )
at GoogleMobileAds.Android.AdLoaderClient.LoadAd (GoogleMobileAds.Api.AdRequest request)

So the question is, how to implement the Native Ads plugin correctly, or is this a bug?

Relevant Code:

// TODO(you): code here to reproduce the problem

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
NVentimigliacommented, Apr 14, 2022

The native ads plugin has been updated to v. 7.0.0. Please update it here.

https://developers.google.com/admob/unity/native

1reaction
BauRawsoncommented, Apr 8, 2022

I too encountered this issue (or a similar one?) and been watching this post, waiting for a solution.

  • Unity version 2021.2.13f1
  • Google Mobile Ads 7.0.0 & Google Native Ads plugin

When importing JUST the Native Ads package, I get these errors:

Assembly ‘Assets/GoogleMobileAdsNative/GoogleMobileAdsNative.dll’ will not be loaded due to errors: Unable to resolve reference ‘GoogleMobileAds’. Is the assembly missing or incompatible with the current platform? Assembly ‘Assets/GoogleMobileAdsNative/GoogleMobileAdsNative.Android.dll’ will not be loaded due to errors: Unable to resolve reference ‘GoogleMobileAds.Common’. Is the assembly missing or incompatible with the current platform? Assembly ‘Assets/GoogleMobileAdsNative/GoogleMobileAdsNative.Common.dll’ will not be loaded due to errors: Unable to resolve reference ‘GoogleMobileAds.Common’. Is the assembly missing or incompatible with the current platform?

I tried adding the External Dependency Manager package as well, but the errors persist. And then I tried adding Google Mobile Ads 7.0.0, where I encountered OP’s issue.

Sorry if this isn’t the way to +1 on GitHub, and if this is adding noise instead of information let me know and I can delete it 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Amazon Native Ad not working
Hi, I have just added this plugin to display native amazon ads (Still Testing). I added the code inside the plugin and pasted...
Read more >
Ad Inserter Plugin Troubleshooting - The SEO Brief
This post is intended to help with a specific issue that occurs with Amazon Native ads. The Amazon Affiliate program recommends using their...
Read more >
Native Ads Unity package download link is broken
Native Ads Unity package download link is broken ... but you can try to use our Sample App Unity then import the native...
Read more >
React-native-admob-native-ads not working on real device ...
I have installed 'react-native-admob-native-ads' plugin with 0.4.1 version and react-native version is 0.64.2. i can't test ad without testAdId ...
Read more >
unity Native Ads Advanced not work,pls help!
and i can load native ads and get the asset suc,but when i regist ... your code,i found the problem is my camera...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found