I'm trying to record audio and upload a file to a server, but in Samsung SM-G900W8 (Android 6.0.1, API 23) my app crashing
Here is my crash logs:
11-22 19:00:53.860 826-2055/com.app.posterity E/log_tag: imagePath2:
11-22 19:00:53.870 826-2055/com.app.posterity A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x324b3944 in tid 2055 (IntentService[u)
11-22 19:00:53.930 325-325/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/kltevl/kltecan:6.0.1/MMB29M/G900W8VLU1DQB2:user/release-keys'
Revision: '14'
ABI: 'arm'
pid: 826, tid: 2055, name: IntentService[u >>> com.app.posterity <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x324b3944
Here is my code for file uploading
Api code using retrofit
final File file = new File(outputFile); ProgressRequestBody fileBody = new ProgressRequestBody(file, new ProgressRequestBody.UploadCallbacks() { public long oldUplod = 0; @Override public void onProgressUpdate(int percentage) { } @Override public void onProgressByte(long uploaded, long total) { } @Override public void onError() { } @Override public void onFinish() { } }); Call<UploadVideoResponse> call; MultipartBody.Part body = null; List<MultipartBody.Part> parts = new ArrayList<>(); body = MultipartBody.Part.createFormData("video", "Test", fileBody); parts.add(body); String authentication_token = Pref.getValue(RecordAudioAnswerActivity.this, PrefKey.AUTHTOKEN, ""); call = ApiClient.getClientUpload().question_edit(parts, authentication_token, question_id, question, "false"); call.enqueue(new Callback<UploadVideoResponse>() { @Override public void onResponse(Call<UploadVideoResponse> call, Response<UploadVideoResponse> response) { Log.i("Response:1-", new Gson().toJson(response.body())); Toast.makeText(RecordAudioAnswerActivity.this, "onResponse", Toast.LENGTH_LONG).show(); if (response.isSuccessful()) { UploadVideoResponse commonResponse = response.body(); } else { LogM.e("errrrrrr" + "errr"); } } @Override public void onFailure(Call<UploadVideoResponse> call, Throwable t) { LogM.e("errrrrrr" + t.toString()); } });
Here is my gradle code
apply plugin: 'com.android.application'
apply plugin: 'realm-android'
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.app.posterity"
minSdkVersion 19
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
/*ndk {
abiFilters 'armeabi','x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
//abiFilters "armeabi-v7a", "arm64-v8a"
}*/
ndk {
// abiFilters "armeabi", "armeabi-v7a", "x86"
abiFilters "armeabi","armeabi-v7a","x86","x86_64"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.1'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.facebook.android:facebook-android-sdk:4.26.0'
implementation 'com.google.android.gms:play-services-base:11.0.4'
implementation 'com.google.android.gms:play-services:11.0.4'
implementation 'com.google.android.exoplayer:exoplayer:2.7.0'
implementation 'com.android.support:design:27.1.1'
implementation project(':scissors')
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.github.bumptech.glide:glide:4.6.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.google.firebase:firebase-messaging:11.0.4'
implementation 'com.google.android:flexbox:0.3.2'
implementation 'net.gotev:speech:1.3.1'
implementation 'com.xeoh.android:text-highlighter:1.0.2'
implementation 'com.android.support:multidex:1.0.3'
compile project(path: ':camerakit')
compile project(path: ':ffmpeg4android_lib')
}
apply plugin: 'com.google.gms.google-services'
I debug the code execution going perfectly to this line
call = ApiClient.getClientUpload().question_edit(parts, authentication_token, question_id, question, "false");
then is shows below error
SIGABRT (signal SIGABRT)
then app crash then I show error in the log file which I mentioned. I also check file size, variable detail etc which is alright.
Note : I used FFMPEG "ffmpeg4android" version is "322.00.02_LM322"
compile project(path: ':ffmpeg4android_lib')
This error is accue in specific devices like Samsung SM-G900W8 and Nexus 5
not understand what is an actual problem in this please help me out from this it will save my days.