0

我的应用级别 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)

我在运行我的应用程序时遇到了这个错误。我不知道为什么这会显示这个问题,如果有人之前这样做过请帮助提前谢谢

4

4 回答 4

0
 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)
于 2016-09-21T09:15:04.707 回答
0

这么晚才回复很抱歉。我是来自 Vungle 的 Aki。

您可以尝试使用我们最新的 Android SDK 吗? https://v.vungle.com/dashboard/api/1/sdk/android

如果问题仍然存在,请联系 tech-support@vungle.com。

谢谢,-aki

于 2016-09-23T15:27:12.473 回答
0

新版本(自 Google 发布FusedLocationProviderApi以来)com.google.android.gms.location不包含名为LocationClient. 相反,现在我们使用集中式 API 服务实现 - GoogleApiClient类。有关如何相应更新逻辑的信息,请参阅此答案。

有关最新com.google.android.gms.location包中的接口和类的列表,请访问此链接:https ://developers.google.com/android/reference/com/google/android/gms/location/package-summary

于 2016-09-21T08:19:00.277 回答
0

您需要更新 Google Play Service SDK,然后使用更新的库。

于 2016-09-21T08:10:35.483 回答