F
FlorianDS95
Neues Mitglied
- 0
Hallo Leute, ich hab ein bzw. eigentlich gleich 2 Probleme,
Erstmal zur kurzen Erklärung: ich bin grade dabei, Facebook in mein App einzubauen, man soll nämlich seinen Highscore letztendlich dann über das App auf die Pinnwand posten können. Aber soweit bin ich (leider) noch gar nicht. Ich bin jetzt eigentlich grade dabei, Benutzerdaten auszulesen und dann einen Text mit: Welcome xxx.xxx auszugeben (xxx steht für name) und das profilbild anzuzeigen.. Allerdings wird gar nichts angezeigt. Was komisch ist: ich habe noch eine weitere TextView um den Highscore auszugeben, und habe die mal zum Testen missbraucht und habe einfach versucht, einen beliebigen Text auszugeben, zum einen, in dem Teil des Programms, wo man sich einloggt, hat funktioniert. Aber als ich es dann in der Funktion versucht habe, wo der Login Button nach dem Login dann zum Logout button wird und eine Funktion zur Datenerfassung aufgerufen wird, ging es plötzlich nicht mehr. Warum auch immer (ich werde es nachher im Quelltext markieren, was ich mein). Was aber komisch ist(!!): Die Daten werden prinzipiell auf jeden Fall erfasst, denn ich habe mal in Logcat nachgeschaut, und da wurden mir bei einem Eintrag sämtliche Daten wie Name, Email, ID usw. angezeigt, allerdings habe ich dann versucht, genau zwischendrin (wo auch die Daten erfasst werden) auch einfach mal auf dieser Highscore-TextView etwas auszugeben, und siehe da: GAR NICHTS.... Das war also Problem Nr.1 ich hoff mir kann jemand helfen.
Zu Problem Nummer 2: der Logout....
Einloggen funktioniert problemlos (bis auf das obige Problem) aber sobald ich dann auf Logout drücke, stürzt die App ab. Ich habe schon unzählige Möglichkeiten versucht, wie:
oder
oder auch schonn mit dem AsyncFacebookRunner.logout und diverse andere Möglichkeit (mit Acitvity name, ohne Name und was weiß ich was alles) und ich weiß mir einfach nicht mehr zu helfen... Info am Rande: ich benutze die Facebook Android SDK 3.7
Ich bin echt langsam am verzweifeln und weiß nicht mehr was ich noch alles ausprobieren soll...
Hier also noch mein Quelltext (ich hoffe man findet sich halbwegs zurecht, hab ein paar Funktionen ausgelassen, die jetzt unwesentlich sind)
Ps: hier auch noch die Logcat-Ausgabe von der ich zumindest schwer davon ausgehe, dass da der Inhalt der Funktion getProfileinformation() ausgeführt wird (leider kenn ich mich mit Logcat gar nicht aus... (Namen und Ids durch sterne ersetzt)
02-28 15:39:22.423: D/Profile(26091): {"id":"1000*******","name":"Florian S********","first_name":"Florian","last_name":"S*******","link":"https:\/\/www.facebook.com\/florian.s********","gender":"male","email":"frab*********eb.de","timezone":1,"locale":"de_DE","verified":true,"updated_time":"2013-10-05T06:18:11+0000","username":"florian.s********"}
Hier auch nochmal die Logcat-Errors:
Beim Login:
wurden keine Fehler angezeigt (aber leider wird nach wie vor nicht das gewünschte "Welcome Florian S*****" angezeigt...
Beim Logout:
03-02 21:36:29.845: E/AndroidRuntime(32670): FATAL EXCEPTION: main
03-02 21:36:29.845: E/AndroidRuntime(32670): java.lang.NullPointerException
03-02 21:36:29.845: E/AndroidRuntime(32670): at de.ftProductions.volcanoJump.ScoreActivity.onClick(ScoreActivity.java:180)
03-02 21:36:29.845: E/AndroidRuntime(32670): at android.view.View.performClick(View.java:4232)
03-02 21:36:29.845: E/AndroidRuntime(32670): at android.view.View$PerformClick.run(View.java:17298)
03-02 21:36:29.845: E/AndroidRuntime(32670): at android.os.Handler.handleCallback(Handler.java:615)
03-02 21:36:29.845: E/AndroidRuntime(32670): at android.os.Handler.dispatchMessage(Handler.java:92)
03-02 21:36:29.845: E/AndroidRuntime(32670): at android.os.Looper.loop(Looper.java:137)
03-02 21:36:29.845: E/AndroidRuntime(32670): at android.app.ActivityThread.main(ActivityThread.java:4921)
03-02 21:36:29.845: E/AndroidRuntime(32670): at java.lang.reflect.Method.invokeNative(Native Method)
03-02 21:36:29.845: E/AndroidRuntime(32670): at java.lang.reflect.Method.invoke(Method.java:511)
03-02 21:36:29.845: E/AndroidRuntime(32670): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1027)
03-02 21:36:29.845: E/AndroidRuntime(32670): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
03-02 21:36:29.845: E/AndroidRuntime(32670): at dalvik.system.NativeStart.main(Native Method)
03-02 21:36:29.885: E/android.os.Debug(7266): !@Dumpstate > dumpstate -k -t -z -d -o /data/log/dumpstate_app_error
Eine NullPointerException heißt doch, dass irgendetwas wo man drauf zugreifen will null ist oder? Weißt du oder irgendjemand anderes wo? Oder wie hättest du denn den Logout gemacht?
Das waren jetzt übrigens die Logcat-Errors wenn ich den Logout-Vorgang mit
ausführe (hier wird in Zeile 2 die NullPointerException angezeigt...
Wenn ich es ändere und den Logout-Vorgang mit
ausführen will, bekomme ich folgende Logcat-Errors:
03-02 22:04:44.965: E/AndroidRuntime(3635): FATAL EXCEPTION: main
03-02 22:04:44.965: E/AndroidRuntime(3635): android.os.NetworkOnMainThreadException
03-02 22:04:44.965: E/AndroidRuntime(3635): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1118)
03-02 22:04:44.965: E/AndroidRuntime(3635): at java.net.InetAddress.lookupHostByName(InetAddress.java:385)
03-02 22:04:44.965: E/AndroidRuntime(3635): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
03-02 22:04:44.965: E/AndroidRuntime(3635): at java.net.InetAddress.getAllByName(InetAddress.java:214)
03-02 22:04:44.965: E/AndroidRuntime(3635): at libcore.net.http.HttpConnection.<init>(HttpConnection.java:70)
03-02 22:04:44.965: E/AndroidRuntime(3635): at libcore.net.http.HttpConnection.<init>(HttpConnection.java:50)
03-02 22:04:44.965: E/AndroidRuntime(3635): at libcore.net.http.HttpConnection$Address.connect(HttpConnection.java:340)
03-02 22:04:44.965: E/AndroidRuntime(3635): at libcore.net.http.HttpConnectionPool.get(HttpConnectionPool.java:87)
03-02 22:04:44.965: E/AndroidRuntime(3635): at libcore.net.http.HttpConnection.connect(HttpConnection.java:128)
03-02 22:04:44.965: E/AndroidRuntime(3635): at libcore.net.http.HttpEngine.openSocketConnection(HttpEngine.java:315)
03-02 22:04:44.965: E/AndroidRuntime(3635): at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.makeSslConnection(HttpsURLConnectionImpl.java:461)
03-02 22:04:44.965: E/AndroidRuntime(3635): at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.connect(HttpsURLConnectionImpl.java:433)
03-02 22:04:44.965: E/AndroidRuntime(3635): at libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:289)
03-02 22:04:44.965: E/AndroidRuntime(3635): at libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:239)
03-02 22:04:44.965: E/AndroidRuntime(3635): at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:273)
03-02 22:04:44.965: E/AndroidRuntime(3635): at libcore.net.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:168)
03-02 22:04:44.965: E/AndroidRuntime(3635): at libcore.net.http.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:271)
03-02 22:04:44.965: E/AndroidRuntime(3635): at com.facebook.android.Util.openUrl(Util.java:224)
03-02 22:04:44.965: E/AndroidRuntime(3635): at com.facebook.android.Facebook.requestImpl(Facebook.java:804)
03-02 22:04:44.965: E/AndroidRuntime(3635): at com.facebook.android.Facebook.request(Facebook.java:707)
03-02 22:04:44.965: E/AndroidRuntime(3635): at com.facebook.android.Facebook.logoutImpl(Facebook.java:649)
03-02 22:04:44.965: E/AndroidRuntime(3635): at com.facebook.android.Facebook.logout(Facebook.java:642)
03-02 22:04:44.965: E/AndroidRuntime(3635): at de.ftProductions.volcanoJump.ScoreActivity.onClick(ScoreActivity.java:180)
03-02 22:04:44.965: E/AndroidRuntime(3635): at android.view.View.performClick(View.java:4232)
03-02 22:04:44.965: E/AndroidRuntime(3635): at android.view.View$PerformClick.run(View.java:17298)
03-02 22:04:44.965: E/AndroidRuntime(3635): at android.os.Handler.handleCallback(Handler.java:615)
03-02 22:04:44.965: E/AndroidRuntime(3635): at android.os.Handler.dispatchMessage(Handler.java:92)
03-02 22:04:44.965: E/AndroidRuntime(3635): at android.os.Looper.loop(Looper.java:137)
03-02 22:04:44.965: E/AndroidRuntime(3635): at android.app.ActivityThread.main(ActivityThread.java:4921)
03-02 22:04:44.965: E/AndroidRuntime(3635): at java.lang.reflect.Method.invokeNative(Native Method)
03-02 22:04:44.965: E/AndroidRuntime(3635): at java.lang.reflect.Method.invoke(Method.java:511)
03-02 22:04:44.965: E/AndroidRuntime(3635): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1027)
03-02 22:04:44.965: E/AndroidRuntime(3635): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
03-02 22:04:44.965: E/AndroidRuntime(3635): at dalvik.system.NativeStart.main(Native Method)
03-02 22:04:45.030: E/android.os.Debug(7266): !@Dumpstate > dumpstate -k -t -z -d -o /data/log/dumpstate_app_error
Weiß leider nicht, was davon jetzt relevant ist....
Also wie gesagt, über schnelle Hilfe wäre ich echt dankbar!!
Mit freundlichen Grüßen
Florian S.
*UPDATE*:nachdem ich nun das welcome.setText() in der Methode GetProfileInformation nach oben direkt unter die Erfassung vom Namen gestellt habe, bekomme ich die Ausgabe auf der TextView ganz kurz, dann stürzt mein App allerdings ab, hier die Errors:
03-03 13:42:00.003: E/AndroidRuntime(23625): FATAL EXCEPTION: Thread-46963
03-03 13:42:00.003: E/AndroidRuntime(23625): android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
03-03 13:42:00.003: E/AndroidRuntime(23625): at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:4925)
03-03 13:42:00.003: E/AndroidRuntime(23625): at android.view.ViewRootImpl.requestLayout(ViewRootImpl.java:950)
03-03 13:42:00.003: E/AndroidRuntime(23625): at android.view.View.requestLayout(View.java:15461)
03-03 13:42:00.003: E/AndroidRuntime(23625): at android.view.View.requestLayout(View.java:15461)
03-03 13:42:00.003: E/AndroidRuntime(23625): at android.view.View.requestLayout(View.java:15461)
03-03 13:42:00.003: E/AndroidRuntime(23625): at android.view.View.requestLayout(View.java:15461)
03-03 13:42:00.003: E/AndroidRuntime(23625): at android.widget.RelativeLayout.requestLayout(RelativeLayout.java:292)
03-03 13:42:00.003: E/AndroidRuntime(23625): at android.view.View.requestLayout(View.java:15461)
03-03 13:42:00.003: E/AndroidRuntime(23625): at android.widget.TextView.checkForRelayout(TextView.java:6644)
03-03 13:42:00.003: E/AndroidRuntime(23625): at android.widget.TextView.setText(TextView.java:3732)
03-03 13:42:00.003: E/AndroidRuntime(23625): at android.widget.TextView.setText(TextView.java:3590)
03-03 13:42:00.003: E/AndroidRuntime(23625): at android.widget.TextView.setText(TextView.java:3565)
03-03 13:42:00.003: E/AndroidRuntime(23625): at de.ftProductions.volcanoJump.ScoreActivity$1.onComplete(ScoreActivity.java:111)
Erstmal zur kurzen Erklärung: ich bin grade dabei, Facebook in mein App einzubauen, man soll nämlich seinen Highscore letztendlich dann über das App auf die Pinnwand posten können. Aber soweit bin ich (leider) noch gar nicht. Ich bin jetzt eigentlich grade dabei, Benutzerdaten auszulesen und dann einen Text mit: Welcome xxx.xxx auszugeben (xxx steht für name) und das profilbild anzuzeigen.. Allerdings wird gar nichts angezeigt. Was komisch ist: ich habe noch eine weitere TextView um den Highscore auszugeben, und habe die mal zum Testen missbraucht und habe einfach versucht, einen beliebigen Text auszugeben, zum einen, in dem Teil des Programms, wo man sich einloggt, hat funktioniert. Aber als ich es dann in der Funktion versucht habe, wo der Login Button nach dem Login dann zum Logout button wird und eine Funktion zur Datenerfassung aufgerufen wird, ging es plötzlich nicht mehr. Warum auch immer (ich werde es nachher im Quelltext markieren, was ich mein). Was aber komisch ist(!!): Die Daten werden prinzipiell auf jeden Fall erfasst, denn ich habe mal in Logcat nachgeschaut, und da wurden mir bei einem Eintrag sämtliche Daten wie Name, Email, ID usw. angezeigt, allerdings habe ich dann versucht, genau zwischendrin (wo auch die Daten erfasst werden) auch einfach mal auf dieser Highscore-TextView etwas auszugeben, und siehe da: GAR NICHTS.... Das war also Problem Nr.1 ich hoff mir kann jemand helfen.
Zu Problem Nummer 2: der Logout....
Einloggen funktioniert problemlos (bis auf das obige Problem) aber sobald ich dann auf Logout drücke, stürzt die App ab. Ich habe schon unzählige Möglichkeiten versucht, wie:
Code:
Session session = Session.getActiveSession();
if (!session.isClosed()) {
session.closeAndClearTokenInformation();
}
Code:
fb.logout(ScoreActivity.this)
Ich bin echt langsam am verzweifeln und weiß nicht mehr was ich noch alles ausprobieren soll...
Hier also noch mein Quelltext (ich hoffe man findet sich halbwegs zurecht, hab ein paar Funktionen ausgelassen, die jetzt unwesentlich sind)
Code:
public class ScoreActivity extends Activity implements OnClickListener {
TextView anzeigen;
ImageView pic, button;
Facebook fb;
TextView welcome;
Session session;
JSONObject obj = null;
URL img_url = null;
public static AsyncFacebookRunner mAsyncRunner = null;
SharedPreferences sp;
@Override
protected void onCreate(Bundle savedInstanceState) {
requestWindowFeature(Window.FEATURE_NO_TITLE);
super.onCreate(savedInstanceState);
setContentView(R.layout.score);
String APP_ID = getString(R.string.app_id);
fb = new Facebook(APP_ID);
mAsyncRunner = new AsyncFacebookRunner(fb);
welcome = (TextView) findViewById(R.id.welcome);
sp = getPreferences(MODE_PRIVATE);
String access_token = sp.getString("access_token", null);
long expires = sp.getLong("access_expires", 0);
if (access_token != null) {
fb.setAccessToken(access_token);
}
if (expires != 0) {
fb.setAccessExpires(expires);
}
button = (ImageView) findViewById(R.id.login);
pic = (ImageView) findViewById(R.id.picture_pic);
button.setOnClickListener(this);
updateButtonImage();
init(); // (unwichtig)
}
private void updateButtonImage() {
// TODO Auto-generated method stub
if (fb.isSessionValid()) { //wenn eingeloggt
button.setImageResource(R.drawable.logout_button);
pic.setVisibility(ImageView.VISIBLE);
getProfileInformation();
} else { //wenn ausgeloggt
button.setImageResource(R.drawable.login_button);
pic.setVisibility(ImageView.INVISIBLE);
}
}
public void getProfileInformation() {
//[b]wenn ich hier den Text der TextView in einen beliebigen Text ändere funktioniert es komischerweise nicht, obwohl die Aktionen darunter denke ich eigentlich ausgeführt werden[/b]
mAsyncRunner.request("me", new RequestListener() {
public void onComplete(String response, Object state) {
Log.d("Profile", response);
String json = response;
try {
JSONObject profile = new JSONObject(json);
// getting name of the user
final String name = profile.getString("name");
// getting email of the user
final String email = profile.getString("email");
// getting email of the user
final String id = profile.getString("id");
img_url=new URL("http://graph.facebook.com/"+id+"/pictrue=type=normal");
Bitmap bmp = BitmapFactory.decodeStream(img_url.openConnection().getInputStream());
pic.setImageBitmap(bmp);
welcome.setText("Welcome " + name);
} catch (JSONException e) {
e.printStackTrace();
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public void onIOException(IOException e, Object state) {
}
public void onFileNotFoundException(FileNotFoundException e,
Object state) {
}
public void onMalformedURLException(MalformedURLException e,
Object state) {
}
public void onFacebookError(FacebookError e, Object state) {
}
});
}
@Override
public void onClick(View v) {
if (fb.isSessionValid()) {
Session session = Session.getActiveSession(); //hier soll der Logout-Vorgang passieren
if (!session.isClosed()) {
session.closeAndClearTokenInformation();
}
updateButtonImage();
} else {
// login to facebook --> funktioniert
fb.authorize(ScoreActivity.this, new String[] { "email" },
new DialogListener() {
@Override
public void onFacebookError(FacebookError e) {
// TODO Auto-generated method stub
Toast.makeText(ScoreActivity.this, "fbError",
Toast.LENGTH_SHORT).show();
}
@Override
public void onError(DialogError e) {
// TODO Auto-generated method stub
Toast.makeText(ScoreActivity.this, "onError",
Toast.LENGTH_SHORT).show();
}
@Override
public void onComplete(Bundle values) {
// TODO Auto-generated method stub
Editor editor = sp.edit();
editor.putString("access_token",
fb.getAccessToken());
editor.putLong("access_expires",
fb.getAccessExpires());
editor.commit();
updateButtonImage();
//[b]wenn ich hier den Text der Highscore-TextView (hier: anzeigen) ändere funktioniert es![/b]
}
@Override
public void onCancel() {
// TODO Auto-generated method stub
Toast.makeText(ScoreActivity.this, "onCancel",
Toast.LENGTH_SHORT).show();
}
});
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
// TODO Auto-generated method stub
super.onActivityResult(requestCode, resultCode, data);
fb.authorizeCallback(requestCode, resultCode, data);
}
}
Ps: hier auch noch die Logcat-Ausgabe von der ich zumindest schwer davon ausgehe, dass da der Inhalt der Funktion getProfileinformation() ausgeführt wird (leider kenn ich mich mit Logcat gar nicht aus... (Namen und Ids durch sterne ersetzt)
02-28 15:39:22.423: D/Profile(26091): {"id":"1000*******","name":"Florian S********","first_name":"Florian","last_name":"S*******","link":"https:\/\/www.facebook.com\/florian.s********","gender":"male","email":"frab*********eb.de","timezone":1,"locale":"de_DE","verified":true,"updated_time":"2013-10-05T06:18:11+0000","username":"florian.s********"}
Hier auch nochmal die Logcat-Errors:
Beim Login:
wurden keine Fehler angezeigt (aber leider wird nach wie vor nicht das gewünschte "Welcome Florian S*****" angezeigt...
Beim Logout:
03-02 21:36:29.845: E/AndroidRuntime(32670): FATAL EXCEPTION: main
03-02 21:36:29.845: E/AndroidRuntime(32670): java.lang.NullPointerException
03-02 21:36:29.845: E/AndroidRuntime(32670): at de.ftProductions.volcanoJump.ScoreActivity.onClick(ScoreActivity.java:180)
03-02 21:36:29.845: E/AndroidRuntime(32670): at android.view.View.performClick(View.java:4232)
03-02 21:36:29.845: E/AndroidRuntime(32670): at android.view.View$PerformClick.run(View.java:17298)
03-02 21:36:29.845: E/AndroidRuntime(32670): at android.os.Handler.handleCallback(Handler.java:615)
03-02 21:36:29.845: E/AndroidRuntime(32670): at android.os.Handler.dispatchMessage(Handler.java:92)
03-02 21:36:29.845: E/AndroidRuntime(32670): at android.os.Looper.loop(Looper.java:137)
03-02 21:36:29.845: E/AndroidRuntime(32670): at android.app.ActivityThread.main(ActivityThread.java:4921)
03-02 21:36:29.845: E/AndroidRuntime(32670): at java.lang.reflect.Method.invokeNative(Native Method)
03-02 21:36:29.845: E/AndroidRuntime(32670): at java.lang.reflect.Method.invoke(Method.java:511)
03-02 21:36:29.845: E/AndroidRuntime(32670): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1027)
03-02 21:36:29.845: E/AndroidRuntime(32670): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
03-02 21:36:29.845: E/AndroidRuntime(32670): at dalvik.system.NativeStart.main(Native Method)
03-02 21:36:29.885: E/android.os.Debug(7266): !@Dumpstate > dumpstate -k -t -z -d -o /data/log/dumpstate_app_error
Eine NullPointerException heißt doch, dass irgendetwas wo man drauf zugreifen will null ist oder? Weißt du oder irgendjemand anderes wo? Oder wie hättest du denn den Logout gemacht?
Das waren jetzt übrigens die Logcat-Errors wenn ich den Logout-Vorgang mit
Code:
Session session = Session.getActiveSession();
if (!session.isClosed()) {
session.closeAndClearTokenInformation();
}
Wenn ich es ändere und den Logout-Vorgang mit
Code:
fb.logout(ScoreActivity.this);
03-02 22:04:44.965: E/AndroidRuntime(3635): FATAL EXCEPTION: main
03-02 22:04:44.965: E/AndroidRuntime(3635): android.os.NetworkOnMainThreadException
03-02 22:04:44.965: E/AndroidRuntime(3635): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1118)
03-02 22:04:44.965: E/AndroidRuntime(3635): at java.net.InetAddress.lookupHostByName(InetAddress.java:385)
03-02 22:04:44.965: E/AndroidRuntime(3635): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
03-02 22:04:44.965: E/AndroidRuntime(3635): at java.net.InetAddress.getAllByName(InetAddress.java:214)
03-02 22:04:44.965: E/AndroidRuntime(3635): at libcore.net.http.HttpConnection.<init>(HttpConnection.java:70)
03-02 22:04:44.965: E/AndroidRuntime(3635): at libcore.net.http.HttpConnection.<init>(HttpConnection.java:50)
03-02 22:04:44.965: E/AndroidRuntime(3635): at libcore.net.http.HttpConnection$Address.connect(HttpConnection.java:340)
03-02 22:04:44.965: E/AndroidRuntime(3635): at libcore.net.http.HttpConnectionPool.get(HttpConnectionPool.java:87)
03-02 22:04:44.965: E/AndroidRuntime(3635): at libcore.net.http.HttpConnection.connect(HttpConnection.java:128)
03-02 22:04:44.965: E/AndroidRuntime(3635): at libcore.net.http.HttpEngine.openSocketConnection(HttpEngine.java:315)
03-02 22:04:44.965: E/AndroidRuntime(3635): at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.makeSslConnection(HttpsURLConnectionImpl.java:461)
03-02 22:04:44.965: E/AndroidRuntime(3635): at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.connect(HttpsURLConnectionImpl.java:433)
03-02 22:04:44.965: E/AndroidRuntime(3635): at libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:289)
03-02 22:04:44.965: E/AndroidRuntime(3635): at libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:239)
03-02 22:04:44.965: E/AndroidRuntime(3635): at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:273)
03-02 22:04:44.965: E/AndroidRuntime(3635): at libcore.net.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:168)
03-02 22:04:44.965: E/AndroidRuntime(3635): at libcore.net.http.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:271)
03-02 22:04:44.965: E/AndroidRuntime(3635): at com.facebook.android.Util.openUrl(Util.java:224)
03-02 22:04:44.965: E/AndroidRuntime(3635): at com.facebook.android.Facebook.requestImpl(Facebook.java:804)
03-02 22:04:44.965: E/AndroidRuntime(3635): at com.facebook.android.Facebook.request(Facebook.java:707)
03-02 22:04:44.965: E/AndroidRuntime(3635): at com.facebook.android.Facebook.logoutImpl(Facebook.java:649)
03-02 22:04:44.965: E/AndroidRuntime(3635): at com.facebook.android.Facebook.logout(Facebook.java:642)
03-02 22:04:44.965: E/AndroidRuntime(3635): at de.ftProductions.volcanoJump.ScoreActivity.onClick(ScoreActivity.java:180)
03-02 22:04:44.965: E/AndroidRuntime(3635): at android.view.View.performClick(View.java:4232)
03-02 22:04:44.965: E/AndroidRuntime(3635): at android.view.View$PerformClick.run(View.java:17298)
03-02 22:04:44.965: E/AndroidRuntime(3635): at android.os.Handler.handleCallback(Handler.java:615)
03-02 22:04:44.965: E/AndroidRuntime(3635): at android.os.Handler.dispatchMessage(Handler.java:92)
03-02 22:04:44.965: E/AndroidRuntime(3635): at android.os.Looper.loop(Looper.java:137)
03-02 22:04:44.965: E/AndroidRuntime(3635): at android.app.ActivityThread.main(ActivityThread.java:4921)
03-02 22:04:44.965: E/AndroidRuntime(3635): at java.lang.reflect.Method.invokeNative(Native Method)
03-02 22:04:44.965: E/AndroidRuntime(3635): at java.lang.reflect.Method.invoke(Method.java:511)
03-02 22:04:44.965: E/AndroidRuntime(3635): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1027)
03-02 22:04:44.965: E/AndroidRuntime(3635): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
03-02 22:04:44.965: E/AndroidRuntime(3635): at dalvik.system.NativeStart.main(Native Method)
03-02 22:04:45.030: E/android.os.Debug(7266): !@Dumpstate > dumpstate -k -t -z -d -o /data/log/dumpstate_app_error
Weiß leider nicht, was davon jetzt relevant ist....
Also wie gesagt, über schnelle Hilfe wäre ich echt dankbar!!
Mit freundlichen Grüßen
Florian S.
*UPDATE*:nachdem ich nun das welcome.setText() in der Methode GetProfileInformation nach oben direkt unter die Erfassung vom Namen gestellt habe, bekomme ich die Ausgabe auf der TextView ganz kurz, dann stürzt mein App allerdings ab, hier die Errors:
03-03 13:42:00.003: E/AndroidRuntime(23625): FATAL EXCEPTION: Thread-46963
03-03 13:42:00.003: E/AndroidRuntime(23625): android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
03-03 13:42:00.003: E/AndroidRuntime(23625): at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:4925)
03-03 13:42:00.003: E/AndroidRuntime(23625): at android.view.ViewRootImpl.requestLayout(ViewRootImpl.java:950)
03-03 13:42:00.003: E/AndroidRuntime(23625): at android.view.View.requestLayout(View.java:15461)
03-03 13:42:00.003: E/AndroidRuntime(23625): at android.view.View.requestLayout(View.java:15461)
03-03 13:42:00.003: E/AndroidRuntime(23625): at android.view.View.requestLayout(View.java:15461)
03-03 13:42:00.003: E/AndroidRuntime(23625): at android.view.View.requestLayout(View.java:15461)
03-03 13:42:00.003: E/AndroidRuntime(23625): at android.widget.RelativeLayout.requestLayout(RelativeLayout.java:292)
03-03 13:42:00.003: E/AndroidRuntime(23625): at android.view.View.requestLayout(View.java:15461)
03-03 13:42:00.003: E/AndroidRuntime(23625): at android.widget.TextView.checkForRelayout(TextView.java:6644)
03-03 13:42:00.003: E/AndroidRuntime(23625): at android.widget.TextView.setText(TextView.java:3732)
03-03 13:42:00.003: E/AndroidRuntime(23625): at android.widget.TextView.setText(TextView.java:3590)
03-03 13:42:00.003: E/AndroidRuntime(23625): at android.widget.TextView.setText(TextView.java:3565)
03-03 13:42:00.003: E/AndroidRuntime(23625): at de.ftProductions.volcanoJump.ScoreActivity$1.onComplete(ScoreActivity.java:111)
Zuletzt bearbeitet: