FelixL
Ehrenmitglied
- 821
Ich bekomme heute ständig NPEs, wenn ich von einer ApplicationInfo .name oder .className auslesen will.
ai.toString() gibt mir im unteren Beispiel das hier zurück:
Irgendjemand ne Ahnung?
ai.toString() gibt mir im unteren Beispiel das hier zurück:
Code:
ApplicationInfo{492a4500 org.abrantix.rockon.rockonnggl}
Irgendjemand ne Ahnung?
Code:
ApplicationInfo ai = pm.getApplicationInfo(pkg,0);
Log.i(TAG, "ai empfangen");
if (ai==null)
{
Log.i(TAG, "ai==null");
return;
}
Log.i(TAG, ai.toSting());
String cla = ai.name;
Log.i(TAG, cla);
Code:
ERROR/AndroidRuntime(31009): java.lang.RuntimeException: Unable to start service com.felixl.tracktospeech.service.ScrobblingService@4942bd50 with Intent { act=com.felixl.tracktospeech.service.playstatechanged (has extras) }: java.lang.NullPointerException: println needs a message