Reputation: 1936
My application running in all device except some samsung device.. These device give exception
java.lang.NoClassDefFoundError: com.google.android.gms.R$string
I am using this dependency -
compile 'com.google.android.gms:play-services:8.4.0'
Upvotes: 2
Views: 1360
Reputation: 524
I had the same issue in Samsung tab 4.4.2 device. The issue is not because of the google play services. It is because of the multidex support enabled in Gradle script but forgot to update the AndroidManifest.xml.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myapp">
<application
android:name="android.support.multidex.MultiDexApplication" >
...
</application>
</manifest>
It is resolved after adding android:name into manifest file.
Upvotes: 0
Reputation: 1
According to that site,
You need to add the following @Override
method to the class that extends Application
:
public class FirebaseCntx extends Application {
...
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
...
}
Upvotes: 0
Reputation: 1936
I got solution its not about play service. it was multidex error in pre lollipop devices.
added mutidex dependency in build.gradle.
Upvotes: 4