我试着在app.gradle中添加编译'com.github.bumptech.glide:glide:3.7.0'

时间:2016-07-08 11:02:50

标签: android google-maps gradle compilation android-glide

我尝试添加编译

App bulid.gradle

compile  'com.github.bumptech.glide:glide:3.7.0' 

当我尝试运行该应用时,它会给我错误

  

NoClassDefFound erroe

我在gradle中有以下依赖项

compile 'commons-io:commons-io:+'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.mcxiaoke.volley:library:1.0.10'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.google.android.gms:play-services-maps:8.4.0'
compile 'com.google.maps.android:android-maps-utils:0.4.1'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.github.ksoichiro:android-observablescrollview:1.5.0'
compile 'com.nineoldandroids:library:2.4.0'
compile 'pl.droidsonroids.gif:android-gif-drawable:1.1.+'

错误如下:

FATAL EXCEPTION:                                                                               
java.lang.NoClassDefFoundError: com.google.android.gms.R$string
at com.google.android.gms.measurement.zza.<init>(Unknown Source)
at com.google.android.gms.measurement.zza.zzaR(Unknown Source)
at com.google.android.gms.measurement.internal.zzn.zziJ(Unknown Source)
at com.google.android.gms.measurement.internal.zzz.zza(Unknown Source)
at com.google.android.gms.measurement.internal.zzw.<init>(Unknown Source)
at com.google.android.gms.measurement.internal.zzaa.zzDj(Unknown Source)
at com.google.android.gms.measurement.internal.zzw.zzaT(Unknown Source)
at com.google.android.gms.measurement.AppMeasurementContentProvider.onCreate(Unknown Source)

1 个答案:

答案 0 :(得分:0)

尝试在Android SDK中更新Google Play服务和google存储库。如果仍未修复,您是否已在应用build.gradle的最后一行添加:

apply plugin: 'com.google.gms.google-services'