couldn't find "libjniavutil.so" in my android studio - android

While initializing FFmpegFrameRecorder I'm getting crash in android PIE(9.0) and marshmallow as well.
Below I mentioned where exactly I'm getting a crash and logCat as well of a crash.
Can any one of you please help me to sort it out.?
mVideo = CameraUtil.getOutputMediaFile(recordedTime, CameraUtil.MEDIA_TYPE_VIDEO);
Log.i(LOG_TAG, "Output Video: " + mVideo);
mFrameRecorder = new FFmpegFrameRecorder(mVideo, videoWidth, videoHeight, 1);
mFrameRecorder.setFormat("mp4");
mFrameRecorder.setSampleRate(sampleAudioRateInHz);
mFrameRecorder.setFrameRate(frameRate);
mFrameRecorder.setGopSize(60);
Here I mentioned my LogCat File
Caused by: java.lang.NoClassDefFoundError: org.bytedeco.javacpp.avutil
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:453)
at org.bytedeco.javacpp.Loader.load(Loader.java:585)
at org.bytedeco.javacpp.Loader.load(Loader.java:530)
at org.bytedeco.javacpp.avcodec$AVPacket.<clinit>(avcodec.java:1694)
at org.bytedeco.javacv.FFmpegFrameRecorder.<init>(FFmpegFrameRecorder.java:152)
at org.bytedeco.javacv.FFmpegFrameRecorder.<init>(FFmpegFrameRecorder.java:132)
at com.starcam.test1.activities.EventLiveFrame3VideoQuestion.initRecorder(EventLiveFrame3VideoQuestion.java:606)
at com.starcam.test1.activities.EventLiveFrame3VideoQuestion.access$800(EventLiveFrame3VideoQuestion.java:83)
at com.starcam.test1.activities.EventLiveFrame3VideoQuestion$9.doInBackground(EventLiveFrame3VideoQuestion.java:458)
at com.starcam.test1.activities.EventLiveFrame3VideoQuestion$9.doInBackground(EventLiveFrame3VideoQuestion.java:453)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
at java.lang.Thread.run(Thread.java:764) 
Caused by: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.starcam.test1-Tndkf7jqvwcCdq5w3dj8CQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.starcam.test1-Tndkf7jqvwcCdq5w3dj8CQ==/lib/arm64, /data/app/com.starcam.test1-Tndkf7jqvwcCdq5w3dj8CQ==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]] couldn't find "libjniavutil.so"

Related

Android Chromium Build fail with NDK Library Load

Whenever we trying to build Chromium in android studio that time its fail to load NDK library.
Error logs are here :
org.chromium.base.library_loader.ProcessInitException: errorCode=4
at org.chromium.chrome.browser.init.AsyncInitializationActivity.onStartupFailure(AsyncInitializationActivity.java:286)
at org.chromium.chrome.browser.init.NativeInitializationController$1.onFailure(NativeInitializationController.java:101)
at org.chromium.chrome.browser.init.AsyncInitTaskRunner.tasksPossiblyComplete(AsyncInitTaskRunner.java:182)
at org.chromium.chrome.browser.init.AsyncInitTaskRunner.lambda$null$0$AsyncInitTaskRunner(AsyncInitTaskRunner.java:127)
at org.chromium.chrome.browser.init.-$$Lambda$AsyncInitTaskRunner$cJc0Kjib2rp_haGN4uefBvQ1s58.run(Unknown Source:4)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:8167)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
Caused by: org.chromium.base.library_loader.ProcessInitException: errorCode=2
at org.chromium.base.library_loader.LibraryLoader.loadMainDexAlreadyLocked(LibraryLoader.java:662)
at org.chromium.base.library_loader.LibraryLoader.ensureMainDexInitialized(LibraryLoader.java:456)
at org.chromium.base.library_loader.LibraryLoader.ensureInitialized(LibraryLoader.java:440)
at org.chromium.chrome.browser.init.AsyncInitTaskRunner.loadNativeLibrary(AsyncInitTaskRunner.java:138)
at org.chromium.chrome.browser.init.AsyncInitTaskRunner.lambda$startBackgroundTasks$1$AsyncInitTaskRunner(AsyncInitTaskRunner.java:126)
at org.chromium.chrome.browser.init.-$$Lambda$AsyncInitTaskRunner$xIQXLdsNGYGpypXLZkBvhfVEoSo.run(Unknown Source:2)
at java.lang.Thread.run(Thread.java:919)
Caused by: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/org.chromium.chrome-3FZb2O0sMrWWCQ2kNEh8Og==/base.apk"],nativeLibraryDirectories=[/data/app/org.chromium.chrome-3FZb2O0sMrWWCQ2kNEh8Og==/lib/arm, /data/app/org.chromium.chrome-3FZb2O0sMrWWCQ2kNEh8Og==/base.apk!/lib/armeabi-v7a, /system/lib]]] couldn't find "libc++_chrome.cr.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:1067)
at java.lang.Runtime.loadLibrary0(Runtime.java:1007)
at java.lang.System.loadLibrary(System.java:1667)
at org.chromium.base.library_loader.LibraryLoader.loadWithSystemLinkerAlreadyLocked(LibraryLoader.java:617)
at org.chromium.base.library_loader.LibraryLoader.loadMainDexAlreadyLocked(LibraryLoader.java:653)
Please review this and share solution if you have any thank you.

How fix My android app not working on android 9?

My android app works fine on android below 9 but on android 9 not working and app will close after run with Myappname Keeps Stop error on phone.
I've build app with SDKVersion & TargetSDKversion 28 ( Android 9 ) already. Please help me how can compatible my app with android 9
This is my Logcat when my app crashes , I think there is problem with background processes
--------- beginning of crash
2019-12-20 18:08:33.181 9444-9499/com.example.asanbekhar E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #2
Process: com.example.asanbekhar, PID: 9444
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:354)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/xml/bind/DatatypeConverter;
at org.scribe.services.DatatypeConverterEncoder.encode(DatatypeConverterEncoder.java:10)
at org.scribe.services.HMACSha1SignatureService.bytesToBase64String(HMACSha1SignatureService.java:51)
at org.scribe.services.HMACSha1SignatureService.doSign(HMACSha1SignatureService.java:46)
at org.scribe.services.HMACSha1SignatureService.getSignature(HMACSha1SignatureService.java:32)
at org.scribe.oauth.OAuth10aServiceImpl.getSignature(OAuth10aServiceImpl.java:151)
at org.scribe.oauth.OAuth10aServiceImpl.addOAuthParams(OAuth10aServiceImpl.java:75)
at org.scribe.oauth.OAuth10aServiceImpl.signRequest(OAuth10aServiceImpl.java:126)
at com.ciyashop.library.apicall.PostApi$postAPiCall.doInBackground(PostApi.java:109)
at com.ciyashop.library.apicall.PostApi$postAPiCall.doInBackground(PostApi.java:40)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
at java.lang.Thread.run(Thread.java:764) 
Caused by: java.lang.ClassNotFoundException: Didn't find class "javax.xml.bind.DatatypeConverter" on path: DexPathList[[zip file "/data/app/com.example.asanbekhar-YRxDnKrurpdOW4cXsei4lA==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.asanbekhar-YRxDnKrurpdOW4cXsei4lA==/lib/x86, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at org.scribe.services.DatatypeConverterEncoder.encode(DatatypeConverterEncoder.java:10) 
at org.scribe.services.HMACSha1SignatureService.bytesToBase64String(HMACSha1SignatureService.java:51) 
at org.scribe.services.HMACSha1SignatureService.doSign(HMACSha1SignatureService.java:46) 
at org.scribe.services.HMACSha1SignatureService.getSignature(HMACSha1SignatureService.java:32) 
at org.scribe.oauth.OAuth10aServiceImpl.getSignature(OAuth10aServiceImpl.java:151) 
at org.scribe.oauth.OAuth10aServiceImpl.addOAuthParams(OAuth10aServiceImpl.java:75) 
at org.scribe.oauth.OAuth10aServiceImpl.signRequest(OAuth10aServiceImpl.java:126) 
at com.ciyashop.library.apicall.PostApi$postAPiCall.doInBackground(PostApi.java:109) 
at com.ciyashop.library.apicall.PostApi$postAPiCall.doInBackground(PostApi.java:40) 
at android.os.AsyncTask$2.call(AsyncTask.java:333) 
at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
at java.lang.Thread.run(Thread.java:764) 
2019-12-20 18:08:33.192 9444-9499/com.example.asanbekhar E/UncaughtException: java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:354)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/xml/bind/DatatypeConverter;
at org.scribe.services.DatatypeConverterEncoder.encode(DatatypeConverterEncoder.java:10)
at org.scribe.services.HMACSha1SignatureService.bytesToBase64String(HMACSha1SignatureService.java:51)
at org.scribe.services.HMACSha1SignatureService.doSign(HMACSha1SignatureService.java:46)
at org.scribe.services.HMACSha1SignatureService.getSignature(HMACSha1SignatureService.java:32)
at org.scribe.oauth.OAuth10aServiceImpl.getSignature(OAuth10aServiceImpl.java:151)
at org.scribe.oauth.OAuth10aServiceImpl.addOAuthParams(OAuth10aServiceImpl.java:75)
at org.scribe.oauth.OAuth10aServiceImpl.signRequest(OAuth10aServiceImpl.java:126)
at com.ciyashop.library.apicall.PostApi$postAPiCall.doInBackground(PostApi.java:109)
at com.ciyashop.library.apicall.PostApi$postAPiCall.doInBackground(PostApi.java:40)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
at java.lang.Thread.run(Thread.java:764) 
Caused by: java.lang.ClassNotFoundException: Didn't find class "javax.xml.bind.DatatypeConverter" on path: DexPathList[[zip file "/data/app/com.example.asanbekhar-YRxDnKrurpdOW4cXsei4lA==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.asanbekhar-YRxDnKrurpdOW4cXsei4lA==/lib/x86, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at org.scribe.services.DatatypeConverterEncoder.encode(DatatypeConverterEncoder.java:10) 
at org.scribe.services.HMACSha1SignatureService.bytesToBase64String(HMACSha1SignatureService.java:51) 
at org.scribe.services.HMACSha1SignatureService.doSign(HMACSha1SignatureService.java:46) 
at org.scribe.services.HMACSha1SignatureService.getSignature(HMACSha1SignatureService.java:32) 
at org.scribe.oauth.OAuth10aServiceImpl.getSignature(OAuth10aServiceImpl.java:151) 
at org.scribe.oauth.OAuth10aServiceImpl.addOAuthParams(OAuth10aServiceImpl.java:75) 
at org.scribe.oauth.OAuth10aServiceImpl.signRequest(OAuth10aServiceImpl.java:126) 
at com.ciyashop.library.apicall.PostApi$postAPiCall.doInBackground(PostApi.java:109) 
at com.ciyashop.library.apicall.PostApi$postAPiCall.doInBackground(PostApi.java:40) 
at android.os.AsyncTask$2.call(AsyncTask.java:333) 
at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
at java.lang.Thread.run(Thread.java:764) 
The problem is because android 9 and above uses SSL socket ( HTTPS Ports ) to communicate and in this case the http port used. The problem solved with adding this line below to Manifest file
android:usesCleartextTraffic="true">
<uses-library android:name="org.apache.http.legacy" android:required="false" />

Failed resolution of: Lcom/facebook/internal/LoginAuthorizationType

I have an android app with Facebook login implemented. It has been working perfect for the last year, but today I started my app and got an error on this line:
final LoginButton loginButton = (LoginButton) findViewById(R.id.facebook_login_button);
loginButton.setReadPermissions(Arrays.asList("public_profile,email"));
Error
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.application.GlassFrogg, PID: 28151
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/facebook/internal/LoginAuthorizationType;
at com.facebook.login.widget.LoginButton$LoginButtonProperties.setReadPermissions(LoginButton.java:149)
at com.facebook.login.widget.LoginButton.setReadPermissions(LoginButton.java:276)
at com.application.GlassFrogg.LoginScreen.onCreate(LoginScreen.java:184)
at android.app.Activity.performCreate(Activity.java:7326)
at android.app.Activity.performCreate(Activity.java:7317)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3066)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3229)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1926)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:6981)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1445)
E/AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.facebook.internal.LoginAuthorizationType" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.application.GlassFrogg-9iEMWqfIsuzThI_-Q3q51w==/base.apk", zip file "/data/app/com.application.GlassFrogg-9iEMWqfIsuzThI_-Q3q51w==/split_lib_dependencies_apk.apk", zip file "/data/app/com.application.GlassFrogg-9iEMWqfIsuzThI_-Q3q51w==/split_lib_resources_apk.apk", zip file "/data/app/com.application.GlassFrogg-9iEMWqfIsuzThI_-Q3q51w==/split_lib_slice_0_apk.apk", zip file "/data/app/com.application.GlassFrogg-9iEMWqfIsuzThI_-Q3q51w==/split_lib_slice_1_apk.apk", zip file "/data/app/com.application.GlassFrogg-9iEMWqfIsuzThI_-Q3q51w==/split_lib_slice_2_apk.apk", zip file "/data/app/com.application.GlassFrogg-9iEMWqfIsuzThI_-Q3q51w==/split_lib_slice_3_apk.apk", zip file "/data/app/com.application.GlassFrogg-9iEMWqfIsuzThI_-Q3q51w==/split_lib_slice_4_apk.apk", zip file "/data/app/com.application.GlassFrogg-9iEMWqfIsuzThI_-Q3q51w==/split_lib_slice_5_apk.apk", zip file "/data/app/com.application.GlassFrogg-9iEMWqfIsuzThI_-Q3q51w==/split_lib_slice_6_apk.apk", zip file "/data/app/com.application.GlassFrogg-9iEMWqfIsuzThI_-Q3q51w==/split_lib_slice_7_apk.apk", zip file "/data/app/com.application.GlassFrogg-9iEMWqfIsuzThI_-Q3q51w==/split_lib_slice_8_apk.apk", zip file "/data/app/com.application.GlassFrogg-9iEMWqfIsuzThI_-Q3q51w==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.application.GlassFrogg-9iEMWqfIsuzThI_-Q3q51w==/lib/arm64, /data/app/com.application.GlassFrogg-9iEMWqfIsuzThI_-Q3q51w==/base.apk!/lib/arm64-v8a, /data/app/com.application.GlassFrogg-9iEMWqfIsuzThI_-Q3q51w==/split_lib_dependencies_apk.apk!/lib/arm64-v8a, /data/app/com.application.GlassFrogg-9iEMWqfIsuzThI_-Q3q51w==/split_lib_resources_apk.apk!/lib/arm64-v8a, /data/app/com.application.GlassFrogg-9iEMWqfIsuzThI_-Q3q51w==/split_lib_slice_0_apk.apk!/lib/arm64-v8a, /data/app/com.application.GlassFrogg-9iEMWqfIsuzThI_-Q3q51w==/split_lib_slice_1_apk.apk!/lib/arm64-v8a, /data/app/com.application.GlassFrogg-9iEMWqfIsuzThI_-Q3q51w==/split_lib_slice_2_apk.apk!/lib/arm64-v8a, /data/app/com.application.GlassFrogg-9iEMWqfIsuzThI_-Q3q51w==/split_lib_slice_3_apk.apk!/lib/arm64-v8a, /data/app/com.application.GlassFrogg-9iEMWqfIsuzThI_-Q3q51w==/split_lib_slice_4_apk.apk!/lib/arm64-v8a, /data/app/com.application.GlassFrogg-9iEMWqfIsuzThI_-Q3q51w==/split_lib_slice_5_apk.apk!/lib/arm64-v8a, /data/app/com.application.GlassFrogg-9iEMWqfIsuzThI_-Q3q51w==/split_lib_slice_6_apk.apk!/lib/arm64-v8a, /data/app/com.application.GlassFrogg-9iEMWqfIsuzThI_-Q3q51w==/split_lib_slice_7_apk.apk!/lib/arm64-v8a, /data/app/com.application.GlassFrogg-9iEMWqfIsuzThI_-Q3q51w==/split_lib_slice_8_apk.apk!/lib/arm64-v8a, /data/app/com.application.GlassFrogg-9iEMWqfIsuzThI_-Q3q51w==/split_lib_slice_9_apk.apk!/lib/arm64-v8a, /system/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 18 more
Suppressed: java.io.IOException: No original dex files found for dex location (arm64) /data/app/com.application.GlassFrogg-9iEMWqfIsuzThI_-Q3q51w==/split_lib_resources_apk.apk
at dalvik.system.DexFile.openDexFileNative(Native Method)
at dalvik.system.DexFile.openDexFile(DexFile.java:354)
at dalvik.system.DexFile.<init>(DexFile.java:101)
at dalvik.system.DexFile.<init>(DexFile.java:75)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:394)
at dalvik.system.DexPathList.makeDexElements(DexPathList.java:354)
at dalvik.system.DexPathList.<init>(DexPathList.java:164)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:74)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:65)
at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:64)
E/AndroidRuntime: at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:73)
at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:88)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:74)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:40)
at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:764)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:847)
at android.app.LoadedApk.getResources(LoadedApk.java:1088)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2563)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6031)
at android.app.ActivityThread.access$1200(ActivityThread.java:235)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1768)
... 6 more
For some reason I am getting three errors when the app crashes. A google search for the exact error code gave me 0 results (that was a first).
I have tried to change what read permissions I request do no avail. I checked to see if methods have been depreciated in the recent facebook API updated, but I don't think that is the issue either.
I solved this by updating to the latest version of the Facebook API. Some of the function calls changed slightly in the update which was causing the crash.

I do need help to understand a runtime error

I have following following error which will cause my android app to jump out, where it jumps out is very inconsistent i can't pin point the code causing it. Anyone can read and understand what it is?
E/AndroidRuntime: FATAL EXCEPTION: Thread-22
Process: my.zen.com.uselessapp.xxxxxxxx, PID: 16384
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/ProtocolVersion;
at com.google.android.gms.internal.ads.zzaj.zzb(Unknown Source:3)
at com.google.android.gms.internal.ads.zzai.zza(Unknown Source:4)
at com.google.android.gms.internal.ads.zzak.zzc(Unknown Source:32)
at com.google.android.gms.internal.ads.zzayl.zzc(Unknown Source:27)
at com.google.android.gms.internal.ads.zzn.processRequest(Unknown Source:28)
at com.google.android.gms.internal.ads.zzn.run(Unknown Source:12)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.http.ProtocolVersion" on path: DexPathList[[zip file "/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/base.apk", zip file "/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/split_lib_dependencies_apk.apk", zip file "/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/split_lib_resources_apk.apk", zip file "/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/split_lib_slice_0_apk.apk", zip file "/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/split_lib_slice_1_apk.apk", zip file "/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/split_lib_slice_2_apk.apk", zip file "/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/split_lib_slice_3_apk.apk", zip file "/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/split_lib_slice_4_apk.apk", zip file "/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/split_lib_slice_5_apk.apk", zip file "/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/split_lib_slice_6_apk.apk", zip file "/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/split_lib_slice_7_apk.apk", zip file "/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/split_lib_slice_8_apk.apk", zip file "/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/lib/arm64, /system/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.google.android.gms.internal.ads.zzaj.zzb(Unknown Source:3)
at com.google.android.gms.internal.ads.zzai.zza(Unknown Source:4)
at com.google.android.gms.internal.ads.zzak.zzc(Unknown Source:32)
at com.google.android.gms.internal.ads.zzayl.zzc(Unknown Source:27)
at com.google.android.gms.internal.ads.zzn.processRequest(Unknown Source:28)
at com.google.android.gms.internal.ads.zzn.run(Unknown Source:12)
Suppressed: java.io.IOException: No original dex files found for dex location /data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/split_lib_resources_apk.apk
at dalvik.system.DexFile.openDexFileNative(Native Method)
at dalvik.system.DexFile.openDexFile(DexFile.java:354)
at dalvik.system.DexFile.<init>(DexFile.java:101)
at dalvik.system.DexFile.<init>(DexFile.java:75)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:394)
at dalvik.system.DexPathList.makeDexElements(DexPathList.java:354)
at dalvik.system.DexPathList.<init>(DexPathList.java:164)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:74)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:65)
at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:64)
at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:73)
at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:88)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:74)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:40)
at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:727)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:810)
at android.app.LoadedApk.getResources(LoadedApk.java:1032)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2345)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5798)
at android.app.ActivityThread.access$1100(ActivityThread.java:200)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Application terminated.
Add this in you AndroidMenifest.xml inside <application> tag
<application
android:theme="#style/AppTheme">
<uses-library
android:name="org.apache.http.legacy"
android:required="false" />
</application>
You are getting a NoClassDefError
java.lang.NoClassDefFoundError: Failed resolution of:
Lorg/apache/http/ProtocolVersion;
caused by
java.lang.ClassNotFoundException:
because the Dalvik executable (Dex) class loader couldn't find a particular class for run time
:
Didn't find class: "org.apache.http.ProtocolVersion"
when it tries to run your app
on path: DexPathList[[zip file "/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/base.apk",
That is basically what it means. So check where this class could be used, I suspect one of your dependencies, and make sure everything is in order there, then try building again.

NoClassDefFoundError exception in android stuidio

Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/impl/client/DefaultHttpClient
I am not able to resolve below error :
Caused by: java.lang.NoClassDefFoundError: Failed resolution of:
Lorg/apache/http/impl/client/DefaultHttpClient;
at com.medicend.jykra.medicend.Async.Parser.LoginParser.hitWS(LoginParser.java:68)
at com.medicend.jykra.medicend.Async.Parser.LoginParser.postData(LoginParser.java:50)
at com.medicend.jykra.medicend.Activity.SignInActivity$LoginAsync.doInBackground(SignInActivity.java:91)
at com.medicend.jykra.medicend.Activity.SignInActivity$LoginAsync.doInBackground(SignInActivity.java:73)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
at java.lang.Thread.run(Thread.java:764) 
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.http.impl.client.DefaultHttpClient" on path:
DexPathList[[zip file
"/data/app/com.medicend.jykra.medicend-IiBcrMY7QQm4ixa9RIMICQ==/base.apk",
zip file
"/data/app/com.medicend.jykra.medicend-IiBcrMY7QQm4ixa9RIMICQ==/split_lib_dependencies_apk.apk",
zip file
"/data/app/com.medicend.jykra.medicend-IiBcrMY7QQm4ixa9RIMICQ==/split_lib_resources_apk.apk",
zip file
"/data/app/com.medicend.jykra.medicend-IiBcrMY7QQm4ixa9RIMICQ==/split_lib_slice_0_apk.apk",
zip file
"/data/app/com.medicend.jykra.medicend-IiBcrMY7QQm4ixa9RIMICQ==/split_lib_slice_1_apk.apk",
zip file
"/data/app/com.medicend.jykra.medicend-IiBcrMY7QQm4ixa9RIMICQ==/split_lib_slice_2_apk.apk",
zip file
"/data/app/com.medicend.jykra.medicend-IiBcrMY7QQm4ixa9RIMICQ==/split_lib_slice_3_apk.apk",
zip file
"/data/app/com.medicend.jykra.medicend-IiBcrMY7QQm4ixa9RIMICQ==/split_lib_slice_4_apk.apk",
zip file
"/data/app/com.medicend.jykra.medicend-IiBcrMY7QQm4ixa9RIMICQ==/split_lib_slice_5_apk.apk",
zip file
"/data/app/com.medicend.jykra.medicend-IiBcrMY7QQm4ixa9RIMICQ==/split_lib_slice_6_apk.apk",
zip file
"/data/app/com.medicend.jykra.medicend-IiBcrMY7QQm4ixa9RIMICQ==/split_lib_slice_7_apk.apk",
zip file
"/data/app/com.medicend.jykra.medicend-IiBcrMY7QQm4ixa9RIMICQ==/split_lib_slice_8_apk.apk",
zip file
"/data/app/com.medicend.jykra.medicend-IiBcrMY7QQm4ixa9RIMICQ==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.medicend.jykra.medicend-IiBcrMY7QQm4ixa9RIMICQ==/lib/x86,
/system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.medicend.jykra.medicend.Async.Parser.LoginParser.hitWS(LoginParser.java:68) 
at com.medicend.jykra.medicend.Async.Parser.LoginParser.postData(LoginParser.java:50) 
at com.medicend.jykra.medicend.Activity.SignInActivity$LoginAsync.doInBackground(SignInActivity.java:91) 
at com.medicend.jykra.medicend.Activity.SignInActivity$LoginAsync.doInBackground(SignInActivity.java:73) 
at android.os.AsyncTask$2.call(AsyncTask.java:333) 
at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
at java.lang.Thread.run(Thread.java:764) 
Suppressed: java.io.IOException: No original dex files found for dex location
/data/app/com.medicend.jykra.medicend-IiBcrMY7QQm4ixa9RIMICQ==/split_lib_resources_apk.apk
at dalvik.system.DexFile.openDexFileNative(Native Method)
at dalvik.system.DexFile.openDexFile(DexFile.java:354)
at dalvik.system.DexFile.(DexFile.java:101)
at dalvik.system.DexFile.(DexFile.java:75)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:394)
at dalvik.system.DexPathList.makeDexElements(DexPathList.java:354)
at dalvik.system.DexPathList.(DexPathList.java:164)
at dalvik.system.BaseDexClassLoader.(BaseDexClassLoader.java:74)
at dalvik.system.BaseDexClassLoader.(BaseDexClassLoader.java:65)
at dalvik.system.PathClassLoader.(PathClassLoader.java:64)
at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:73)
E/AndroidRuntime: at
com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:88)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:74)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:40)
at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:727)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:810)
at android.app.LoadedApk.getResources(LoadedApk.java:1032)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2345)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5749)
at android.app.ActivityThread.access$1100(ActivityThread.java:199)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Add the following to your manifest file under 'application':
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
https://developer.android.com/about/versions/pie/android-9.0-changes-28#apache-p
You are getting this error because your app uses the legacy org.apache.http.legacy client and your app's targetSdkVersion is set to 28 or higher.
Consider using HttpURLConnection or lowering your targetSdkVersion in build.gradle.

Categories

Resources