Error inflating class com.google.ads.AdView

前端 未结 7 2127
余生分开走
余生分开走 2020-11-27 06:55

Hello I am new to android dev and admob. I am trying to make a simple test app with a button, a couple pages and admob at the bottom. Everything works fine until I try imple

7条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-27 07:15

    Have you recently updated your Android Tools to r17 or higher? If so, you need to create a libs/ folder in your project, and physically put the SDK in the project. Or, in the Java Build Path, you must Order and Export the SDK jar.

    Otherwise, the jar doesn't get included when your apk gets compiled, and all hell breaks loose when you run AdMob code at runtime.

    NOTE: This applies to any library your project references.

提交回复
热议问题