Custom Exception Handler for Cordova plugin - android

I developed an Exception handler for android apps and it is working fine inside android-studio native projects.
Now I am developing a cordova plugin and I want to add my Exception Handler to catch all the uncaught exceptions, whether they are inside the plugin or in some other native code.
The problem I am facing is, the PluginManager in CordovaLib catches all the exception. I want my Exception handler class to catch the exceptions, not PluginManager class. Does anyone know how to do it ?
Any help would be appreciated.
Note : I am usign Cordova 8.0.0

Related

java.lang.NoClassDefFoundError in android studio

getting the exception:
java.lang.NoClassDefFoundError:
i tried NoClassDefFoundError with libraries in Android Studio
./gradlew clean is successful from terminal
still i am getting same exception
You need to deploy the Activity in AndroidManifest.xml which threw the java.lang.NoClassDefFoundError. In your libraries, some classes may be a descendant of an Activity which need to be manifested in the AndroidManifest.xml when you want to call it.

trigger.io ios module build error from template

I started a new private module but got a build error without touching any code.
Error: framework not found WebKit
Any help would be great.
-Trav.

Unity DLL Not Found Exception in Android Application

I'm writing an android plugin for Unity, libSolidCapture.so. This plugin is using a shared library, named liblo.so, an OSC library When I'm trying to launch the application on an android device, I get the following error :
Unable to load library '/libSolidCapture.so', native render plugin
support disabled: java.lang.UnsatisfiedLinkError: dlopen failed:
library "liblo.so.7" not found
then :
DllNotFoundException: SolidCapture
When i build liblo for android, liblo.so.7 is created, but when I try to drag and drop it in Unity, it seems to be considered as a folder, and not a library !
When I build an apk, Unity includes liblo.so, but not liblo.so.7
Do you have any idea of what I'm doing wrong ?

Libgdx Desktop project: Exception in thread “main” java.lang.UnsatisfiedLinkError: no gdx in java.library.path

I created Lwjgl libgdx Desktop project in IntelliJ IDEA,
I added and binded the following libraries to /libs:
gdx-backend-lwjgl-natives.jar,
gdx-backend-lwjgl.jar,
gdx-natives.jar,
gdx.jar.
I got runtime error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no gdx in java.library.path
for the following line:
new LwjglApplication(new MyGame(), "MyGame",MyGame.SCREEN_WIDTH, MyGame.SCREEN_HEIGHT, false);
There was such thread here. They recommended to add *.so files to the project libraries.
But it seems this is obsolete answer.
I can create such project on Eclipse...
Thanks.
You code is right,maybe something is lost.I recommended you use a tool called Gdx Setup UI.
You can find it in office website.

Unable to deploy to emulated Android Devices - Could not load/find org.grade.wrapper.GradleWrapperMain

So the problem itself is I am unable to deploy my android builds to an emulator using either react-native run android or cordova emulate android. (I'm implementing solutions in both at the moment). These are brand new projects created using create-react-native-app my-project or the cordova equivalent.
To focus in a little I'll use my cordova project as an example but the error is exactly the same for both (below).
I have been following this guide to get started with the cordova project https://cordova.apache.org/docs/en/latest/guide/cli/ I have created a project and can run cordova requirements with no problems at all. I can use cordova emulate ios which builds and runs perfectly. I must stress that I haven't changed the actual build code from the sample at all.
However when I run cordova emulate android it throws the error below. I'm running Mac OS High Sierra 10.31.1.
So I'm kind of at the end of my tether with my current conundrum. I've followed four other similar Stack Overflow questions to no avail:
Could not find or load main class org.gradle.wrapper.GradleWrapperMain
React Native Android - Could not find or load main class org.gradle.wrapper.GradleWrapperMain
How/when to generate Gradle wrapper files?
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
Off the back of these posts I have:
Explicitly stated my ANDROID_HOME and JAVA_HOME env vars
Run gradle wrapper which builds successfully
Checked my file directory is correct and the gradle-wrapper.jar does exist
Explicitly stated versions and distributions in the build.gradle
Added tasks to the build.gradle
➜ cordova run android --stacktrace
Android Studio project detected
ANDROID_HOME=/Users/me/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
studio
Subproject Path: CordovaLib
Subproject Path: app
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
(node:17311) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: /Users/me/Documents/University 2017:18/Final Year Project/Source Code/Cordova Implementation/hello/platforms/android/gradlew: Command failed with exit code 1 Error output:
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
(node:17311) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Any help at all would be greatly appreciated, this has stopped me in my tracks for around a week now. My only planned recourse is to reinstall all things Android.
Thanks,
Crafty

Resources