Admob implementation Error

后端 未结 7 799
独厮守ぢ
独厮守ぢ 2020-11-29 01:04

I got a Problem with implementing Admob into an App.

This is my main.xml:



        
相关标签:
7条回答
  • 2020-11-29 01:17

    Above error occurs when you use the library GoogleAdMobAdsSdk-4.3.1.jar. I've been that error and I've found this demo from Google. I've replaced lib 4.3.1 by 4.0.3 in this demo and it runs OK.

    0 讨论(0)
  • 2020-11-29 01:23

    if you use AndroidStudio and Gradle, you must also update the build.gradle file like this:

    android {
        compileSdkVersion 17
        buildToolsVersion "18.0.1"
    
        defaultConfig {
            minSdkVersion 3
            targetSdkVersion 17
        }
    ...
    
    0 讨论(0)
  • 2020-11-29 01:29

    Have you also set your build target to be higher than Android 3.2, i.e. in default.properties set target higher than android-13? Also make sure that you're using the latest version of the SDK.

    PS! Don't expose your device ID to the public.

    0 讨论(0)
  • 2020-11-29 01:32

    My solution to a similar case was to use

    <uses-sdk android:minSdkVersion="7" android:targetSdkVersion="11" />

    or just use android:targetSdkVersion= under 13

    0 讨论(0)
  • 2020-11-29 01:34

    You also need to set the following permissions in your AndroidManifest.xml.

    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    

    Then admob can assess the internet and also not show the ad when it has no internet connectivity.

    0 讨论(0)
  • 2020-11-29 01:36

    As you can see here, very few phones have Android versions of 3.x.x or higher installed

    http://developer.android.com/resources/dashboard/platform-versions.html

    Why would anybody want to compile their app to something few phones can handle? Either I am misunderstanding something or I will need to find some other ad company that doesn't require a newer Android version.

    0 讨论(0)
提交回复
热议问题