R RichyK68 Active Member Licensed User Longtime User Mar 1, 2014 #1 Hi, I'm getting the error message "an error has occurred in sub... you must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />" when I run my app using the admob library. My manifest looks like: Code: Copy 'This code will be applied to the manifest file during compilation. 'You do not need to modify it in most cases. 'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136 AddManifestText( <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/> <supports-screens android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:anyDensity="true"/> ) 'AdMob AddApplicationText( <activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" /> ) AddApplicationText(<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />) 'End of AdMob SetApplicationAttribute(android:icon, "@drawable/icon") SetApplicationAttribute(android:label, "$LABEL$") 'End of default text. It has the meta data tag in there already, any idea why the error would be happening? Richard
Hi, I'm getting the error message "an error has occurred in sub... you must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />" when I run my app using the admob library. My manifest looks like: Code: Copy 'This code will be applied to the manifest file during compilation. 'You do not need to modify it in most cases. 'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136 AddManifestText( <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/> <supports-screens android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:anyDensity="true"/> ) 'AdMob AddApplicationText( <activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" /> ) AddApplicationText(<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />) 'End of AdMob SetApplicationAttribute(android:icon, "@drawable/icon") SetApplicationAttribute(android:label, "$LABEL$") 'End of default text. It has the meta data tag in there already, any idea why the error would be happening? Richard
GMan Well-Known Member Licensed User Longtime User Mar 1, 2014 #2 Hoi, did you use the SEARCH before ? There are several threads. Here is the Tutorial thread: http://www.b4x.com/android/forum/threads/admob-tutorial-add-ads-to-your-application.7300/ and here the one with the AdMob library: http://www.b4x.com/android/forum/threads/admob-library.7301/ Bes ure to use the newest Lib from B4A and the new Google Services in the ADK (all written in the given links) The error depends on a wrong part in the Manifest Editor ...OR in the pub key: how do you implemented it ? Upvote 0
Hoi, did you use the SEARCH before ? There are several threads. Here is the Tutorial thread: http://www.b4x.com/android/forum/threads/admob-tutorial-add-ads-to-your-application.7300/ and here the one with the AdMob library: http://www.b4x.com/android/forum/threads/admob-library.7301/ Bes ure to use the newest Lib from B4A and the new Google Services in the ADK (all written in the given links) The error depends on a wrong part in the Manifest Editor ...OR in the pub key: how do you implemented it ?
R RichyK68 Active Member Licensed User Longtime User Mar 1, 2014 #3 Hi, I believe I've done all that, I'm currently using AdMob v2.00 from the admob.zip as opposed to the oldadmob.zip, and I've downloaded the Google Play Services jar file via the Android SDK toolkit though I'm not sure how to find out what version that is. Richard Upvote 0
Hi, I believe I've done all that, I'm currently using AdMob v2.00 from the admob.zip as opposed to the oldadmob.zip, and I've downloaded the Google Play Services jar file via the Android SDK toolkit though I'm not sure how to find out what version that is. Richard
R RichyK68 Active Member Licensed User Longtime User Mar 1, 2014 #4 It is revision 15 of Google Play Services that I'm currently using. Upvote 0
GMan Well-Known Member Licensed User Longtime User Mar 1, 2014 #5 Try this in the Manifest editor: Code: Copy 'AdMob AddApplicationText( <activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/> ) 'End of AdMob Upvote 0
Try this in the Manifest editor: Code: Copy 'AdMob AddApplicationText( <activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/> ) 'End of AdMob
R RichyK68 Active Member Licensed User Longtime User Mar 2, 2014 #6 That's already in there, which is why I added the Code: Copy AddApplicationText(<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />) Richard Upvote 0
That's already in there, which is why I added the Code: Copy AddApplicationText(<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />) Richard
Erel B4X founder Staff member Licensed User Longtime User Mar 2, 2014 #7 Have you followed step #3: http://www.b4x.com/android/forum/threads/admob-tutorial-add-ads-to-your-application.7300/ ? Upvote 0
Have you followed step #3: http://www.b4x.com/android/forum/threads/admob-tutorial-add-ads-to-your-application.7300/ ?
R RichyK68 Active Member Licensed User Longtime User Mar 2, 2014 #8 Hi, yes, I've been through the examples multiple times. I now see the slight difference in the AddApplicationText that GMan posted. The app now runs but I get a FailedToReceiveAd response with an error code of 0 which is ERROR_CODE_INTERNAL_ERROR (I'm using the correct publisher id because if I don't I get an error code of 1 (ERROR_CODE_INVALID_REQUEST)). I'm initiating the ad with Code: Copy AdView1.Initialize2("Ad", "mypublisherid", AdView1.SIZE_BANNER) 'publisher id that you received from AdMob. Activity.AddView(AdView1, 0dip, 0dip, 320dip, 50dip) AdView1.LoadAd 'loads an ad Maybe it takes a while for Admob to dish out ads, maybe I'll start getting ads soon. Richard Upvote 0
Hi, yes, I've been through the examples multiple times. I now see the slight difference in the AddApplicationText that GMan posted. The app now runs but I get a FailedToReceiveAd response with an error code of 0 which is ERROR_CODE_INTERNAL_ERROR (I'm using the correct publisher id because if I don't I get an error code of 1 (ERROR_CODE_INVALID_REQUEST)). I'm initiating the ad with Code: Copy AdView1.Initialize2("Ad", "mypublisherid", AdView1.SIZE_BANNER) 'publisher id that you received from AdMob. Activity.AddView(AdView1, 0dip, 0dip, 320dip, 50dip) AdView1.LoadAd 'loads an ad Maybe it takes a while for Admob to dish out ads, maybe I'll start getting ads soon. Richard
Erel B4X founder Staff member Licensed User Longtime User Mar 2, 2014 #9 No. If you are using AdMob v2.00 you should add the exact manifest code posted in the tutorial. Upvote 0
R RichyK68 Active Member Licensed User Longtime User Mar 2, 2014 #10 This is now my manifest after replacing what I'd got with what is in the tutorial: Code: Copy 'This code will be applied to the manifest file during compilation. 'You do not need to modify it in most cases. 'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136 AddManifestText( <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/> <supports-screens android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:anyDensity="true"/> ) 'AdMob AddApplicationText( <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/> <activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/> ) 'End of AdMob SetApplicationAttribute(android:icon, "@drawable/icon") SetApplicationAttribute(android:label, "$LABEL$") 'End of default text. Is there anything wrong with this? Richard Upvote 0
This is now my manifest after replacing what I'd got with what is in the tutorial: Code: Copy 'This code will be applied to the manifest file during compilation. 'You do not need to modify it in most cases. 'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136 AddManifestText( <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/> <supports-screens android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:anyDensity="true"/> ) 'AdMob AddApplicationText( <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/> <activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/> ) 'End of AdMob SetApplicationAttribute(android:icon, "@drawable/icon") SetApplicationAttribute(android:label, "$LABEL$") 'End of default text. Is there anything wrong with this? Richard
R RichyK68 Active Member Licensed User Longtime User Mar 5, 2014 #12 Hi, I still get the FailedToReceiveAd error response of 0, what else can I check? Ta, Richard Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Mar 5, 2014 #13 You can see the error codes here: http://developer.android.com/refere.../ads/AdRequest.html#ERROR_CODE_INTERNAL_ERROR Unfortunately not much information is available in this case. Upvote 0
You can see the error codes here: http://developer.android.com/refere.../ads/AdRequest.html#ERROR_CODE_INTERNAL_ERROR Unfortunately not much information is available in this case.
GMan Well-Known Member Licensed User Longtime User Mar 6, 2014 #14 Are you really SURE that you configured ALL parts of AdMob and you App in AdMob, including networks for your country ? Upvote 0
Are you really SURE that you configured ALL parts of AdMob and you App in AdMob, including networks for your country ?
R RichyK68 Active Member Licensed User Longtime User Mar 7, 2014 #15 I think so, in Admob Settings there is the Ad Network Optimization Settings where you can add (what I think are) other sources of ads, and the ones I get are InMobi, JumpTap, MdotM and MobFox but I don't need to add those do I? They require logons/ids etc and I've never signed up with those, just Google Admob. Where do I configure networks for my country? Richard Upvote 0
I think so, in Admob Settings there is the Ad Network Optimization Settings where you can add (what I think are) other sources of ads, and the ones I get are InMobi, JumpTap, MdotM and MobFox but I don't need to add those do I? They require logons/ids etc and I've never signed up with those, just Google Admob. Where do I configure networks for my country? Richard
R RichyK68 Active Member Licensed User Longtime User Mar 7, 2014 #16 Thank you, I literally hadn't set up Ad units for the app, I had only linked the app to the Ad Mob account, which is what I thought I just had to do. Cheers Upvote 0
Thank you, I literally hadn't set up Ad units for the app, I had only linked the app to the Ad Mob account, which is what I thought I just had to do. Cheers
GMan Well-Known Member Licensed User Longtime User Mar 8, 2014 #17 Thank you, I literally hadn't set up Ad units for the app, I had only linked the app to the Ad Mob account, which is what I thought I just had to do. Click to expand... Yo, mostly is that part missing when problems appear therefore i made this little TuT Upvote 0
Thank you, I literally hadn't set up Ad units for the app, I had only linked the app to the Ad Mob account, which is what I thought I just had to do. Click to expand... Yo, mostly is that part missing when problems appear therefore i made this little TuT