NoClassDefFoundError after AndroidStudio update to 1.0 (Dec 8)

with previous versions of Android Studio working as expected with Release Candidate 4 (Dec 4) or newer:

FATAL EXCEPTION: main

 java.lang.NoClassDefFoundError: com.google.android.gms.location.LocationClient

      

it seems to me that it is related to the update 'com.android.tools.build:gradle:1.0.0 '

It looks similar: https://github.com/robolectric/robolectric/issues/1136

Edit

working: compile 'com.google.android.gms: play-services: 6.1. + '

+3


source to share


2 answers


It has nothing to do with gradle. This update is for Google Play Services. The class has LocationClient

been replaced with a new one FusedLocationProviderApi

.



Check this answer: Android Services for Android 6.5: LocationClient is missing

+2


source


Try the following:

dependencies 
{
    classpath 'com.android.tools.build:gradle:1.0.0+'
    classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.9.+'
}

      



And also

    buildTypes 
   {
        release 
       {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-    rules.txt'
        }
    }

      

+1


source







All Articles