使用这个平台的产品p++:https://www.pingxx.com/guidance/client/sdk/android
步骤:
1.新建module--》paysdk
2.将jar包加进去
3.找到paysdk的build,将里面的
// testCompile 'junit:junit:4.12' // compile 'com.android.support:appcompat-v7:23.2.0'注释掉
4.在main下面新建jin的folder文件夹,名字叫jniLibs ,paste
5.在main下新建assert的folder的文件夹,paste
Error:Execution failed for task ':paysdk:compileDebugNdk'.
> Error: NDK integration is deprecated in the current plugin. Consider trying the new experimental plugin. For details, see http://tools.android.com/tech-docs/new-build-system/gradle-experimental. Set "android.useDeprecatedNdk=true" in gradle.properties
to continue using the current NDK integration.
******************重点;
在上面创建jniLibs文件的时候,会出现错误,只需要在上面的提示加上代码即可解决问题
6.将paysdk和app关联
7.添加权限(百度钱包的权限)
8.加入activity的注册
*******会报错因为没有集成百度钱包的sdk
1.创建module--》baidupaysdk
2.在lib中添加 ,paset
3.创建jniLibs,paste
4.添加资源文件res
5.覆盖注册文件
6.用paysdk引用baidupaysdk
7.结束