- Home /
Can't click Ads with AdMob
I have recently finished an android game and I am struggling to enable my ads. They show just fine whenever I want them to, but I can't seem to click them at all. I think the issue may be within my manifest file, but through all my googling I found no solutions that seemed to work for me.
Here is my AndroidManifest.xml:
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.unity3d.player"
android:installLocation="preferExternal"
android:versionCode="1"
android:versionName="1.0">
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true"/>
<application
android:icon="@drawable/app_icon"
android:label="@string/app_name"
android:debuggable="true">
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
<activity android:name="com.unity3d.player.UnityPlayerProxyActivity"
android:label="@string/app_name"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.unity3d.player.UnityPlayerActivity"
android:label="@string/app_name"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
</activity>
<activity android:name="com.unity3d.player.UnityPlayerNativeActivity"
android:label="@string/app_name"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
<meta-data android:name="android.app.lib_name" android:value="unity" />
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
</activity>
<activity android:name="com.unity3d.player.VideoPlayer"
android:label="@string/app_name"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
</activity>
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
</application>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
</manifest>
This is located within Assets > Plugins > Android, the files I have located within here are as such:
AndroidManifest.xml
com.microeyes.admob.jar
GoogleAdMobAdsSdk-6.0.1.jar
There are no objects in front of the ad. My game consists of an empty screen with few objects falling occasionally. These objects can (read: can't) be seen behind the Ad.
This line is one that I found from Unity Answers and may or may not be used properly here (Line 18):
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
I used This source (Android version) to create the ads. They generate just fine using the cs scripts, only touching them takes me to no source.
Within my Ad Manager file, I have input my AdMob code. However, I'm unsure if I need all of the information that I have put here. I am using the format:
ca-app-pub-XXXXXXXXXXXXXXXXX/XXXXXXXXXX
Each X representing a number (can't link that thing) - is this the correct format? I am unsure or if I should be using the "ca-app-pub" section, or if I need only the numbers from one side of the /.
Any help would be greatly appreciated, thanks. Any more required information can be given, but I believe this is all that is required.
You should use all "ca-app-pub-XXXXXXXXXXXXXXXXX/XXXXXXXXXX" string, so you doing it right.
EDIT: It would be better to use google play service's ads, becouse Google will stop supporting Ad$$anonymous$$ob service at 1st August. I use this free asset
I think yes, it is still admob. I$$anonymous$$HO they just whant to unite all their small services in one big service.
I've the same problem, I added the ad$$anonymous$$ob plugin, the ads are displaying but when you click on them nothing happens. What did you mean when you said that you threw your meta file in the apllication tag? How do i do that?
Answer by hamstar · Apr 14, 2014 at 09:17 AM
At a glance I can see you're missing at least one thing from your manifest, but I'm not sure if there are any other issues. You need the following line that should go within the application
tag.
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
I don't think you're using the latest version of the plugin. You can get v2.0 here. Make sure you follow the setup guide carefully and see if you have any more problems.
It seemed the issue was that I had simply put my meta file in the wrong place, I was meant to actually throw it within the application tag, rather than just outside it as I had been doing. Thanks for the assist, though!
Your answer
Follow this Question
Related Questions
Admob on iOS and Android. Interstitial ads are showing but events are not firing. 1 Answer
Two Android Manifest file in same folder 1 Answer
Google Admob (V.6.1.2) crashing Android game on device built with Unity 2020.3.19 1 Answer
How to implement Admob Native Ads on a ScrollRect in Unity 2 Answers
Problem with closing an android app 0 Answers