Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Android Admob Banners give internal error

$
0
0

Hello,

I use Eclipse with ADT and banners don't show in Google Ads sample application, I don't know why.

Mannifest:

<?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.google.android.gms.samples.ads"
        android:versionCode="1"
        android:versionName="1.0" >
 
        <uses-sdk
            android:minSdkVersion="9"
            android:targetSdkVersion="21" />
 
        <!-- Used to request banner and interstitial ads. -->
        <uses-permission android:name="android.permission.INTERNET" />
 
        <!-- Used to avoid sending an ad request if there is no connectivity. -->
        <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
 
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
 
        <application
            android:allowBackup="true"
            android:icon="@drawable/ic_launcher"
            android:label="@string/app_name"
            android:theme="@style/AppTheme">
 
            <meta-data
                android:name="com.google.android.gms.version"
                android:value="@integer/google_play_services_version" />
 
            <activity
                android:name="com.google.android.gms.samples.ads.GoogleAdsSampleActivity"
                android:label="@string/app_name" >
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
 
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
            <activity android:name=".BannerXmlActivity"
                android:label="@string/banner_in_xml"/>
            <activity android:name=".BannerCodeActivity"
                android:label="@string/banner_in_code"/>
            <activity android:name=".InterstitialActivity"
                android:label="@string/interstitial"/>
            <!-- Activity required to show ad overlays. -->
            <activity
                android:name="com.google.android.gms.ads.AdActivity"
                android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
        </application>
 
    </manifest>

Code

setContentView(R.layout.activity_banner_code_ad_listener);
 
            mAdView = new AdView(this);
            mAdView.setAdUnitId("ca-app-pub-8xxxxxxxxxxxxxxx/4xxxxxxxxx");
            mAdView.setAdSize(AdSize.BANNER);
 
            final RelativeLayout layout = (RelativeLayout) findViewById(R.id.mainLayout);
            layout.addView(mAdView);
 
            mAdView.setAdListener(new ToastAdListener(this));
            AdRequest adRequest = new AdRequest.Builder()
            .addTestDevice("AAxAxxxAxAxxxAxxxAxxxAAxxAxxxAA")
            .build();
            mAdView.loadAd(adRequest);
Project-Property:
target=android-21
    android.library.reference.1=../google-play-services_lib
In LogCat:
Google Play services out of date.  Requires 6587000 but found 5089030
 
    GooglePlayServices not available due to error 2
 
    VFY: unable to resolve virtual method 8193: Landroid/webkit/WebView;.evaluateJavascript (Ljava/lang/String;Landroid/webkit/ValueCallback;)V
 
    JS: The page at https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40.html displayed insecure content from file:///android_asset/webkit/android-weberror.png.
 
    The page at https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40.html displayed insecure content from file:///android_asset/webkit/android-weberror.png.
 
    JS: Uncaught ReferenceError: AFMA_buildAdURL is not defined (null:1)
 
    Uncaught ReferenceError: AFMA_buildAdURL is not defined at null:1

Application work, but no banner. With the listener, I see I have an internal Error.

Internet work, I have google-play-services_lib rev 22 included in project.

I have tried android 4.2.2 and in another phone android 4.1.2 but same thing.


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>