简体   繁体   English

Xamarin Android 原生绑定 Java.Lang.NoClassDefFoundError: 'Failed resolution of: [Lkotlin/reflect/KProperty

[英]Xamarin Android Native bindings Java.Lang.NoClassDefFoundError: 'Failed resolution of: [Lkotlin/reflect/KProperty;'

I'm binding Stripe's android library in Xamarin.Android.我在 Xamarin.Android 中绑定了 Stripe 的 android 库。 I succeeded in creating the binding project and building it finally after a lot of error resolutions.在解决了很多错误后,我成功地创建了绑定项目并最终构建了它。 Now, when I want to use the library I finally built in my project, I get this error without any additional information:现在,当我想使用我最终在项目中构建的库时,我得到了这个错误,没有任何额外的信息:

Java.Lang.NoClassDefFoundError: 'Failed resolution of: [Lkotlin/reflect/KProperty;' Java.Lang.NoClassDefFoundError: '解析失败: [Lkotlin/reflect/KProperty;'

I added the.aar library in my android project and set the build property to Androidaarlibrary, and referenced the binding project directly from the.dll created, but nothing worked.我在我的 android 项目中添加了 .aar 库,并将构建属性设置为 Androidaarlibrary,并直接从创建的 .dll 中引用了绑定项目,但没有任何效果。 I tried everything I could find but nothing worked.我尝试了我能找到的一切,但没有任何效果。

I have added the dependencies found in the kotlin library, as you can see below:我添加了 kotlin 库中的依赖项,如下所示: 在此处输入图像描述

Here is what I added as dependencies in the xamarin binding project:这是我在 xamarin 绑定项目中添加的依赖项:

在此处输入图像描述

I really don't know what else to try, can someone help please?我真的不知道还有什么可以尝试的,有人可以帮忙吗?

if you bind.aar or.jar file contain kotlin source code, you need install Xamarin.Kotlin.StdLib on your xamarin project via nuget , plz install this Link on your project and then build your project, maybe this way work for you. if you bind.aar or.jar file contain kotlin source code, you need install Xamarin.Kotlin.StdLib on your xamarin project via nuget , plz install this Link on your project and then build your project, maybe this way work for you.

在此处输入图像描述

even you can send your.aar file to my email address, and i can bind for you, or test.dll file on my project.即使您可以将 your.aar 文件发送到我的 email 地址,我也可以为您绑定,或者 test.dll 文件在我的项目中。

It seems that you want to use the Stripe payment platform, right?看来你要使用 Stripe 支付平台,对吧? Fortunately,it is available in nuget.幸运的是,它在 nuget 中可用。 You could check from the Github Project Site .您可以从Github 项目站点查看。 And you could refer the demo from https://github.com/NAXAM/stripe-android-binding/tree/master/Demo .您可以参考https://github.com/NAXAM/stripe-android-binding/tree/master/Demo中的演示。

The NAXAM's binding project mentioned in the last answer is outdated.上一个答案中提到的 NAXAM 绑定项目已过时。 I'm in the same situation, so I've tried to do my own binding and after two weeks of work resolving binding errors (both compile and run time) I finally gave up on that approach.我处于同样的情况,所以我尝试进行自己的绑定,经过两周的工作解决绑定错误(编译和运行时),我终于放弃了这种方法。

Now we are using the http API from stripe, and making some calls directly from the server, because you cannot authenticate against the stripe service from the client, specially if you need to comply with SCA and 3DSecure and all that new stuff.现在我们正在使用来自条带的 http API 并直接从服务器进行一些调用,因为您无法从客户端对条带服务进行身份验证,特别是如果您需要遵守 SCA 和 3DSecure 以及所有这些新东西。

So my recommendation will be to use the API as it is instructed here: https://stripe.com/docs/api因此,我的建议是按照此处的说明使用 API: https://stripe.com/docs/api

PRO tip (kind of...): You can still use the old bindings to implement the nice views that Stripe is provinding to enter the card information and to do the client verification of the entered number.专业提示(有点……):您仍然可以使用旧的绑定来实现 Stripe 提供的漂亮视图,以输入卡信息并对输入的号码进行客户端验证。

PRO tip 2: There is a channel where the Stripe employees will answer and help you with any doubt, they really know their jobs, are willing to help everybody and there is always someone answering your questions (This channel was a treasure really hard to find): https://freenode.logbot.info/stripe专业提示 2:有一个频道,Stripe 员工会回答并帮助您解决任何疑问,他们真正了解自己的工作,愿意帮助每个人,并且总是有人回答您的问题(这个频道真的很难找到): https://freenode.logbot.info/stripe

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Xamarin.Android 绑定 Java.Lang.NoClassDefFoundError: '解析失败: Landroidx/viewbinding/ViewBinding;' - Xamarin.Android binding Java.Lang.NoClassDefFoundError: 'Failed resolution of: Landroidx/viewbinding/ViewBinding;' Mixpanel绑定上的java.lang.NoClassDefFoundError - java.lang.NoClassDefFoundError on Mixpanel bindings java.lang.NoClassDefFoundError Android Studio Unity - java.lang.NoClassDefFoundError Android Studio Unity 如何修复 Xamarin.Android 绑定项目 (.aar) 中的“Java.Lang.NoClassDefFoundError” - How to fix "Java.Lang.NoClassDefFoundError" in a Xamarin.Android Binding Project (.aar) Xamarin Forms错误:Java.Lang.NoClassDefFoundError:android.support.graphics.drawable.VectorDrawableCompat - Xamarin Forms error: Java.Lang.NoClassDefFoundError: android.support.graphics.drawable.VectorDrawableCompat Java.Lang.NoClassDefFoundError:超时超过了获取异常详细信息Xamarin Android - Java.Lang.NoClassDefFoundError: Timeout exceeded getting exception details Xamarin Android Java.Lang.NoClassDefFoundError android.arch.core.internal.FastSafeIterableMap - Java.Lang.NoClassDefFoundError android.arch.core.internal.FastSafeIterableMap 扩展DataMediaSource时发生Java.Lang.NoClassDefFoundError - Java.Lang.NoClassDefFoundError on extending DataMediaSource Java.Lang.NoClassDefFoundError 实现 firebase 云消息传递 - Java.Lang.NoClassDefFoundError when implementing firebase cloud messaging 无法更改xamarin android界面剃刀页面错误java.lang.reflect.InvocationTargetException上的活动 - can't change activity on xamarin android interface razor page error java.lang.reflect.InvocationTargetException
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM