********************** INTENT START **************************
Action: null
Component: null
Flags: 0
Scheme: null
key_error_code:0
key_error_msg
key_error_detail
key_action:action_login
key_response:{"ret":0,"openid":"BCD9247B467E78230550F7A3DC69A731","access_token":"A2925E540CEEFB534FAE54F06579C4FF","pay_token":"F6C9219B4297260D5A01ED880C928C8F","expires_in":7776000,"pf":"desktop_m_qq-10000144-android-2002-","pfkey":"12cbec2aa0531ab2daccf77ec42dfd33","msg":"","login_cost":84,"query_authority_cost":641,"authority_cost":0}
********************** INTENT END **************************
03-26 20:45:46.070 15664-15664/com.tencent.tmgp.hmsk.sansheng D/YSDK_USER_QQ: onActivityResult requestCode:11101
onActivityResult resultCode:-1
03-26 20:45:46.070 15664-15664/com.tencent.tmgp.hmsk.sansheng I/openSDK_LOG.Tencent: onActivityResultData() reqcode = 11101, resultcode = -1, data = null ? false, listener = null ? false
生命周期都配置完好,appid填写正确,能调到onActivityResult,但是无法收到成功回调?
网上也搜不到什么,文档也没有说明~~嘿嘿,那你找对地方了,解决办法如下:
应用宝技术的回答:
为保持游戏内场景在各个终端版本具备良好兼容性和一致体验,本次接入X5内核(TBS),需要对so库做调整(仅接YSDK的应用宝渠道包需要)
原因:
https://x5.tencent.com/tbs/technical.html#/detail/sdk/1/34cf1488-7dc2-41ca-a77f-0014112bcab7
处理方式:
打包时只保留armeabi文件夹以及对应运行库so文件,删掉其它的所有jni支持库的文件夹如(arm64 X86 X86_64 mips等)
如只有armeab_v7a则把YSDK JniLib 中armeabi目录下对应so库copy到armeab_v7a文件夹内。
但是我发现加入ndk{abiFilter “armeabi”}build不过,那就只能用armeabi-v7a了,做法如下:
在build.gradle中的android{defaultConfig中}添加
ndk{abiFilters "armeabi-v7a"}
在sourceSets.main{}中添加(也可以是别的,根据项目配置而定)
jniLibs.srcDir "libs"
android {
compileSdkVersion 22
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.tencent.tmgp.hmsk.sansheng"
minSdkVersion 14
targetSdkVersion PROP_TARGET_SDK_VERSION
versionCode 1
versionName "1.0.8"
ndk{abiFilters "armeabi-v7a"}
并且在libs下创建armeabi-v7a文件夹(如果没有的话),并将YSDK_Android_x.x.x_xxxx.aar里的armeabi文件夹下的.so文件拷贝放进去,然后项目rebuild就行啦~折腾了我挺久,为后人提醒