我的应用级别 gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.mss.jackpotslots"
minSdkVersion 15
targetSdkVersion 23
multiDexEnabled true
}
//====================Add below two line=============
dexOptions {
javaMaxHeapSize "4g" //specify the heap size for the dex process
preDexLibraries = false //delete the already predexed libraries
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:23.4.0'
compile files('libs/dagger-1.2.2.jar')
compile files('libs/javax.inject-1.jar')
// compile files('libs/libGoogleAnalyticsServices.jar')
compile 'com.google.android.gms:play-services-analytics:9.0.0'
compile files('libs/vungle-publisher-3.2.0.jar')
compile 'com.google.android.gms:play-services-ads:9.0.0'
compile 'com.google.android.gms:play-services:9.0.0'
compile 'org.apache.httpcomponents:httpclient:4.5'
compile 'com.scottyab:aescrypt:0.0.1'
compile project(':wheelLib')
compile 'com.google.android.gms:play-services-maps:9.0.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.google.android.gms:play-services-games:9.0.0'
compile 'com.google.android.gms:play-services-location:9.0.0'
}
apply plugin: 'com.google.gms.google-services'
我的项目级别 Gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
classpath 'com.google.gms:google-services:3.0.0'
// classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.9.+'
}
}
allprojects {
repositories {
jcenter()
}
}
我的 LogCat 错误输出
E/VungleAsync: java.lang.NoClassDefFoundError: com.google.android.gms.location.LocationClient
at com.vungle.publisher.location.GooglePlayServicesDetailedLocationProvider.a(vungle:30)
at com.vungle.publisher.location.AndroidLocation.b(vungle:35)
at com.vungle.publisher.protocol.message.RequestAd$Demographic$Location$Factory.b(vungle:180)
at com.vungle.publisher.protocol.message.RequestAd$Demographic$Factory.b(vungle:130)
at com.vungle.publisher.protocol.message.RequestAd$a.b(vungle:84)
at com.vungle.publisher.protocol.message.RequestLocalAd$Factory.c(vungle:71)
at com.vungle.publisher.protocol.RequestLocalAdHttpRequest$Factory.d(vungle:68)
at com.vungle.publisher.inject.ConfigurablePublisherModule.a(vungle:325)
at com.vungle.publisher.inject.ConfigurablePublisherModule$$ModuleAdapter$ProvideRequestLocalAdHttpTransactionProvidesAdapter.get(vungle:849)
at com.vungle.publisher.inject.ConfigurablePublisherModule$$ModuleAdapter$ProvideRequestLocalAdHttpTransactionProvidesAdapter.get(vungle:810)
at com.vungle.publisher.protocol.ProtocolHttpGateway$2.run(vungle:127)
at com.vungle.publisher.async.ScheduledPriorityExecutor$a$a.run(vungle:233)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
我在运行我的应用程序时遇到了这个错误。我不知道为什么这会显示这个问题,如果有人之前这样做过请帮助提前谢谢