我创建了一个cordova项目并添加了android平台。我运行了cordova build android构建成功,我添加了插件cordova插件admob free,然后运行了运行cordova build android再次构建失败,出现以下错误
platformsandroidappsrcmainjavanameratsoncordovaadmobAdMob.java:11: error: cannot find symbol
import com.google.android.gms.common.GoogleApiAvailability;
^
symbol: class GoogleApiAvailability
location: package com.google.android.gms.common
> Task :app:compileDebugJavaWithJavac FAILED
D:testMyApp2platformsandroidappsrcmainjavanameratsoncordovaadmobAdMob.java:53: error: cannot find symbol
isGpsAvailable = (GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(cordova.getActivity()) == ConnectionResult.SUCCESS);
版本
cordova -v
9.0.0 (cordova-lib@9.0.1)
包装中.json
"cordova-admob-sdk": "0.24.1",
"cordova-android": "^8.1.0",
"cordova-plugin-admob-free": "0.27.0",
"cordova-promise-polyfill": "0.0.2"
我已经使用了这个插件https://admob-plus.github.io/来自同一作者,它的工作没有任何问题