0

My app level 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'

My project Level 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()
    }
}

My LogCat Error OutPut

 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)

I am facing this error while i am running my app .i dont know why this is showing this issue if any one have done this before please help thanks in advance

Spartak Team
  • 81
  • 3
  • 13

4 Answers4

1

You need to update Google Play Service SDK and then use updated library.

RAAAAM
  • 3,378
  • 19
  • 59
  • 108
0

New (ever since Google released FusedLocationProviderApi) releases of com.google.android.gms.location do not contain the class named LocationClient. Instead, now we use a centralized API services implementation - the GoogleApiClient class. Refer to this answer for info on how to update your logic accordingly.

For the list of interfaces and classes in the newest com.google.android.gms.location package visit this link: https://developers.google.com/android/reference/com/google/android/gms/location/package-summary

Community
  • 1
  • 1
nstosic
  • 2,584
  • 1
  • 17
  • 21
  • i am not using Location class it is coming because of vungle jar and i can not remove that – Spartak Team Sep 21 '16 at 09:16
  • I understand, but that is the problem. If they have stopped supporting that library and didn't update their dependencies you won't be able to use that .jar – nstosic Sep 21 '16 at 13:47
  • i am also getting this issue "Error:Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider com.fyber.annotations.processor.MediationAnnotationProcessor could not be instantiated: java.lang.NoClassDefFoundError: com/squareup/javapoet/TypeName" can you give me any hint – Spartak Team Sep 21 '16 at 14:09
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)
Spartak Team
  • 81
  • 3
  • 13
0

Sorry for the late reply. I am Aki from Vungle.

Can you try to use our latest Android SDK? https://v.vungle.com/dashboard/api/1/sdk/android

If you still see the issue, please contact tech-support@vungle.com.

Thanks, -aki

aki
  • 86
  • 1