addAccountExplicit löst durch Securityexception verursachte IllegalStateException aus

Die Verwendung dieses Codes löst diese Ausnahme aus und fügt dem Account Manager kein erstelltes Konto hinzu.

AccountManager am = AccountManager.get(activity);
Account acc = new Account(name,activity.getString(R.string.account_type));
am.addAccountExplicitly(acc,"Password",null);

Ich bin dem gefolgt -http://developer.android.com/training/id-auth/custom_auth.html

Irgendeine Idee, warum es verursacht wird?

// edit: Verursacht durch: java.lang.SecurityException: Aufrufer-UID 10035 unterscheidet sich von der UID des Authentifikators

Antworten auf die Frage(2)

Ihre Antwort auf die Frage