GCM: java.lang.noclassdeffounderror: com.google.android.gcm.GCMRegistrar
Estou tentando registrar um dispositivo no GCM usando o seguinte código:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
GCMRegistrar.checkDevice(this);
// the following function can be removed when deploying the app
GCMRegistrar.checkManifest(this);
final String regId = GCMRegistrar.getRegistrationId(this);
if (regId.equals("")) {
GCMRegistrar.register(this, SENDER_ID);
} else {
Log.v(TAG, "Already registered");
}
Eu importei import com.google.android.gcm.GCMRegistrar;
e também adicionei o GCM.jar ao meu buildpath no Eclipse que eu obtive através do download do SDK
Por favor ajude !