Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NoClassDefFoundError after AndroidStudio upgrade to 1.0 (December 8th)

with previous versions of Android Studio working properly with Release Candidate 4 (December 4th) or newer:

FATAL EXCEPTION: main

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

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

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

Edit

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

like image 371
Kamil Nękanowicz Avatar asked Dec 02 '25 13:12

Kamil Nękanowicz


2 Answers

This has nothing to do with gradle. It's an update for Google Play Services. The LocationClient class has been replaced with the new FusedLocationProviderApi.

Check this answer: Android play services 6.5: LocationClient is missing

like image 148
Androiderson Avatar answered Dec 04 '25 04:12

Androiderson


Try with this :

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

And also do

    buildTypes 
   {
        release 
       {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-    rules.txt'
        }
    }
like image 44
Amitabha Biswas Avatar answered Dec 04 '25 06:12

Amitabha Biswas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!