Я использую HttpURLConnection для API в моем приложении. Он отлично работает на Android 5,7,8,9, но не 6. Проблема заключается в родном сбое (SIGSEGV) на getOutputStream () HttpURLConnection. Это мой код:
URL url = new URL(path);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setDoOutput(true);
OutputStream stream = connection.getOutputStream(); // Crash!
OutputStreamWriter osw = new OutputStreamWriter(stream);
Журнал:
A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x6f42736d in tid 3669 (FinalizerDaemon)
У меня точно такая же проблема и та же ошибка (SIGSEGV), когда я использую Retrofit на Android 6.