Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

项目在Kotlin中调用有点问题 #4

Closed
simplepeng opened this issue Nov 11, 2019 · 8 comments
Closed

项目在Kotlin中调用有点问题 #4

simplepeng opened this issue Nov 11, 2019 · 8 comments

Comments

@simplepeng
Copy link

建议

1

implementation files('libs/alipaySdk-15.6.5-20190718211159-noUtdid.aar') 改为api方式引用

2

WXPay.getInstance().onResp(baseResp.errCode, baseResp.errStr)onResp方法的参数
IPayCallbackfailed(int code, @Nullable String message)方法的参数
加上@Nullable注解,不然会报如下错误

E/MicroMsg.SDK.WXApiImplV10: handleIntent fail, ex = Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter msg

@kingofglory
Copy link
Owner

建议

1

implementation files('libs/alipaySdk-15.6.5-20190718211159-noUtdid.aar') 改为api方式引用

2

WXPay.getInstance().onResp(baseResp.errCode, baseResp.errStr)onResp方法的参数
IPayCallbackfailed(int code, @Nullable String message)方法的参数
加上@Nullable注解,不然会报如下错误

E/MicroMsg.SDK.WXApiImplV10: handleIntent fail, ex = Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter msg

好的,我看看。第一条,你是在外面还有引用支付宝SDK代码是吗?第二条,你是碰到空的情况了吗?怎么出现的?

@simplepeng
Copy link
Author

嗯,是的,第一条是在直接gradle依赖Alipay的引用出现的,报找不到Alipay相关Class的错误,
第二条是用kotlin写回调的时候,如果message为空的时候就会报错。

@asjqkkkk
Copy link

嗯,是的,第一条是在直接gradle依赖Alipay的引用出现的,报找不到Alipay相关Class的错误,
第二条是用kotlin写回调的时候,如果message为空的时候就会报错。

第一个问题,目前依旧存在。
使用api的方式貌似也是不行的。
目前有解决方案吗😳

@kingofglory
Copy link
Owner

嗯,是的,第一条是在直接gradle依赖Alipay的引用出现的,报找不到Alipay相关Class的错误,
第二条是用kotlin写回调的时候,如果message为空的时候就会报错。

两个问题已经解决。哥们,有空验证一下。

@kingofglory
Copy link
Owner

2.0.1已推送。

@meiyoucai
Copy link

alipay支付还是会报找不到 Didn't find class "com.alipay.sdk.app.PayTask" 这个得怎么解决啊 都升级到2.0.1了

@kingofglory
Copy link
Owner

alipay支付还是会报找不到 Didn't find class "com.alipay.sdk.app.PayTask" 这个得怎么解决啊 都升级到2.0.1了

你先用下载源码集成方式吧。这个问题我在处理中。

@Leovany
Copy link

Leovany commented Mar 16, 2020

alipay支付还是会报找不到 Didn't find class "com.alipay.sdk.app.PayTask" 这个得怎么解决啊 都升级到2.0.1了

你先用下载源码集成方式吧。这个问题我在处理中。

我也遇到这个问题了,希望大大能尽快处理一下,大大辛苦了
PS:这个EasyPay真的很强大好用,希望能在集成下 QQ钱包

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants