cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Not happy with your Spotify Wrapped? Check out how Kevin on the Dropbox team used Paper to make sure he keeps discovering new music over 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: 
1
Ask
2
Reply and help

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?