So after a lot of searching i came to know that this problem was due to the multidexing. On some phones multidexing don’t work. May be due to their Android Version. However i fixed this by introductng an application class
public class MyApplication extends Application {
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
}
and in menifest i entered the name in application tag like:
<application
android:name=".MyApplication"
android:allowBackup="true"
android:icon="@mipmap/xxxxxx"
android:label="@string/app_name"
android:manageSpaceActivity="xxxxxxxxxx"
android:theme="@style/AppTheme" >