在android应用程序上集成Admob时出错(应用程序崩溃)
当我试图在我的设备上启动应用程序时,应用程序崩溃,我出现以下错误:在android应用程序上集成Admob时出错(应用程序崩溃),android,android-gradle-plugin,admob,Android,Android Gradle Plugin,Admob,当我试图在我的设备上启动应用程序时,应用程序崩溃,我出现以下错误: android.view.InflateException: Binary XML file line #9: Error inflating class com.google.ads.AdView 我已经尝试了stackoverflow上提出的解决方案,但它不能解决这个错误 文件build.gradle(包括依赖项) com.google.ads.AdView是将移动ads SDK与google Play服务集成之前使用的软
android.view.InflateException: Binary XML file line #9: Error inflating class com.google.ads.AdView
我已经尝试了stackoverflow上提出的解决方案,但它不能解决这个错误
文件build.gradle(包括依赖项)
com.google.ads.AdView
是将移动ads SDK与google Play服务集成之前使用的软件包名称。尝试在布局中使用当前的一个
apply plugin: 'com.android.application'
android {
compileSdkVersion 'Google Inc.:Google APIs:16'
buildToolsVersion '21.1.2'
defaultConfig {
applicationId "com.recipes.app"
minSdkVersion 9
targetSdkVersion 9
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_5
targetCompatibility JavaVersion.VERSION_1_5
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services-ads:8.3.0'
}