Android Question Error in Interstitial (SOLVED)

CyclopDroid

Well-Known Member
Licensed User
Longtime User
I want use a rewarded ads but I do not know if it goes well the same code of the normal interstitial.
I have already created the campaign for these on the store and got the following error.
when lauch in my code:


B4X:
** Service (httputils2service) Start **
** Activity (gioca) Pause, UserClosed = false **
** Activity (interstitial) Create, isFirst = true **
Error occurred on line: 42 (Interstitial)
java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value.  Expected 4452000 but found 8487000.  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" />
    at com.google.android.gms.common.GooglePlayServicesUtil.t(Unknown Source)
    at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
    at com.google.android.gms.internal.ag.a(Unknown Source)
    at com.google.android.gms.internal.au.k(Unknown Source)
    at com.google.android.gms.internal.au.a(Unknown Source)
    at com.google.android.gms.ads.InterstitialAd.loadAd(Unknown Source)
    at mobi.mindware.admob.interstitial.AdmobInterstitialsAds.LoadAd(AdmobInterstitialsAds.java:91)
    at GangofPoker.videopoker.interstitial._activity_create(interstitial.java:364)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:702)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:339)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:246)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)

I've insert ini Manifest.xml this part of code:

B4X:
'admob interstitial

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"/>
                )

but non work.
What is the problem?
How to use these interstitial rewardd?
 

CyclopDroid

Well-Known Member
Licensed User
Longtime User
Yes, I had already resolved yesterdaywith SDK and copy the new google-play-services.jar from C:\Users\NAMEUSER\AppData\Local\Android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\libs into lib root (C:\Program Files (x86)\Anywhere Software\Basic4android\Libraries) and now work ;)
 
Upvote 0
Top