NoClassDefFoundError:com.google.android.gms.common.GooglePlayServicesUtil

NoClassDefFoundError:com.google.android.gms.common.GooglePlayServicesUtil,android,admob,google-play-services,Android,Admob,Google Play Services,我正试图使用google-play-services_库将admob横幅添加到我的android项目中。我正在使用eclipse,我已经按照eclipse设置了库项目,没有发现任何问题。我把它作为参考添加到我的android项目中。身材很好。但当我在设备上运行它时,我得到: NoClassDefFoundError:com.google.android.gms.common.GooglePlayServicesUtil 以下是我的项目的onCreate()方法的摘录: int statusCod

我正试图使用google-play-services_库将admob横幅添加到我的android项目中。我正在使用eclipse,我已经按照eclipse设置了库项目,没有发现任何问题。我把它作为参考添加到我的android项目中。身材很好。但当我在设备上运行它时,我得到:

NoClassDefFoundError:com.google.android.gms.common.GooglePlayServicesUtil

以下是我的项目的onCreate()方法的摘录:

int statusCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
if( statusCode != ConnectionResult.SUCCESS)
{
    Log.e("statuscode",statusCode+"");
}
AdRequest adRequest = new AdRequest.Builder()
.addTestDevice("my_device_id")
.build();

此外,如果我删除isGooglePlayServicesAvailable()复选框并直接转到AdRequest.Builder(),我现在会得到相同的NoClassFounderRor,用于AdRequest$Builder

很明显,您的APK中没有包含付费服务库。 从一开始就再次遵循Eclipse的步骤