Skip to content

Instantly share code, notes, and snippets.

@tuttelikz
Last active March 6, 2018 04:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tuttelikz/8a86b67d211da0e40b44c66f13ddb8fe to your computer and use it in GitHub Desktop.
Save tuttelikz/8a86b67d211da0e40b44c66f13ddb8fe to your computer and use it in GitHub Desktop.
How to fix NetworkOnMainThreadException when uploading to ftp
android.os.NetworkOnMainThreadException?
You should almost always run network operations on a thread or as an asynchronous task.
https://stackoverflow.com/a/9289190/5151687
com.jcraft.jsch.JSchException: UnknownHostKey:
session.setConfig("StrictHostKeyChecking", "no");
Working ftp:
https://stackoverflow.com/questions/2003419/com-jcraft-jsch-jschexception-unknownhostkey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment