cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We love to hear how every person gets the most from Dropbox, and it seems everyone has a slightly different use for it - tell us yours here!

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Crash when linking account on Dropbox JAVA API

Crash when linking account on Dropbox JAVA API

MatthieuDelisle
New member | Level 2

Hi, I'm trying to build a JAVA app on Android studio, and I want to upload a file to Dropbox. 

However, when linking my account, it crashes. image.png

 

I have put my right token. 

The error happen on this line :  

FullAccount account = client.users().getCurrentAccount();

I have followed the exact same official tutorial on github, so I don't know why it crashes.

 

Here is the error log : 

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.testdropbox, PID: 24166
android.os.NetworkOnMainThreadException

edit : I added the code into a Async task, and it's fixed

 

Need more support?