cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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

 

0 Replies 0
Need more support?