- Home /
How to integrate a authorize.net android plugin in Unity?
Hey All,
I am trying to integrate a native plugin which is made in android studio. I have unzipped the .aar file for the following :
Copied the classes.jar file in Assets\Plugins\Android folder.
Copied the res folder in Assets\Plugins\Android folder.
Copied the Manifest under Assets\Plugins\Android\Manifest folder since I have other Manifest files in Assets\Plugins\Android.
This is a the screen:
The problem with my app is that it is Crashing at the time of clicking the Get Token button.
This is the logcat I am getting: -
08-21 11:29:36.376 11579 11579 E AndroidRuntime: java.lang.Error: FATAL EXCEPTION [main]
08-21 11:29:36.376 11579 11579 E AndroidRuntime: Unity version : 5.6.2f1
08-21 11:29:36.376 11579 11579 E AndroidRuntime: Device model : motorola XT1068
08-21 11:29:36.376 11579 11579 E AndroidRuntime: Device fingerprint: motorola/titan_retaildsds/titan_umtsds:6.0/MPB24.65-34-3/3:user/release-keys
08-21 11:29:36.376 11579 11579 E AndroidRuntime:
08-21 11:29:36.376 11579 11579 E AndroidRuntime: Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lnet/authorize/acceptsdk/AcceptSDKApiClient$Builder;
08-21 11:29:36.376 11579 11579 E AndroidRuntime: at net.authorize.acceptsdk.sampleapp.AndroidBridge$1$2$2.onClick(AndroidBridge.java:129)
08-21 11:29:36.376 11579 11579 E AndroidRuntime: at android.view.View.performClick(View.java:5201)
08-21 11:29:36.376 11579 11579 E AndroidRuntime: at android.view.View$PerformClick.run(View.java:21163)
08-21 11:29:36.376 11579 11579 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:746)
08-21 11:29:36.376 11579 11579 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)
08-21 11:29:36.376 11579 11579 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
08-21 11:29:36.376 11579 11579 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5443)
08-21 11:29:36.376 11579 11579 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
08-21 11:29:36.376 11579 11579 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
08-21 11:29:36.376 11579 11579 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
08-21 11:29:36.376 11579 11579 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "net.authorize.acceptsdk.AcceptSDKApiClient$Builder" on path: DexPathList[[zip file "/data/app/com.keeves.gachaapp-1/base.apk"],nativeLibraryDirectories=[/data/app/#######-1/lib/arm, /data/app/#######/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
08-21 11:29:36.376 11579 11579 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
08-21 11:29:36.376 11579 11579 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
08-21 11:29:36.376 11579 11579 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
08-21 11:29:36.376 11579 11579 E AndroidRuntime: ... 10 more 08-21 11:29:36.376 11579 11579 E AndroidRuntime: Suppressed: java.lang.ClassNotFoundException: net.authorize.acceptsdk.AcceptSDKApiClient$Builder
08-21 11:29:36.376 11579 11579 E AndroidRuntime: at java.lang.Class.classForName(Native Method)
08-21 11:29:36.376 11579 11579 E AndroidRuntime: at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
08-21 11:29:36.376 11579 11579 E AndroidRuntime: at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
08-21 11:29:36.376 11579 11579 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:504) 08-21 11:29:36.376 11579 11579 E AndroidRuntime: ... 11 more
08-21 11:29:36.376 11579 11579 E AndroidRuntime: Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
08-21 11:29:36.431 1801 2957 W ActivityManager: Force finishing activity #######/com.unity3d.player.UnityPlayerActivity
I've also tried copying the whole .aar release file but it did not work. There were no errors, also no activity appeared.
Thanks.
Your answer
Follow this Question
Related Questions
Low-level native plugins not working in 4.3 on Windows 3 Answers
DllNotFound when unmanaged c++ plugin library links to another unmanaged c++ library 1 Answer
Using DirectX 11 matrices in a native plugin 0 Answers
Native Rendering Plugin with UI Image 0 Answers
scan wifi using AndroidJavaObject 0 Answers