修复游戏SDK在Android14时无法加载的问题

This commit is contained in:
zlzw 2024-07-29 11:04:47 +08:00
parent 63b7a18c0b
commit 516a068c25
2 changed files with 6 additions and 2 deletions

View File

@ -222,10 +222,10 @@ dependencies {
// api(name: 'umeng-common-9.6.8+000', ext: 'aar')
//使使common需搭配v9.6.3asms需搭配v1.7.0
// SudMGP SDK
api 'tech.sud.mgp:SudMGP:1.3.3.1158'
api 'tech.sud.mgp:SudMGP:1.4.3.1201'
// ()
api 'tech.sud.mgp:SudASR:1.3.3.1158'
api 'tech.sud.mgp:SudASR:1.4.3.1201'
//
api 'com.yanzhenjie.recyclerview:x:1.3.2'

View File

@ -10,6 +10,7 @@ import android.view.ViewTreeObserver;
import android.widget.Toast;
import com.alibaba.fastjson.JSONObject;
import com.yunbao.common.BuildConfig;
import com.yunbao.common.sud.decorator.SudFSMMGCache;
import com.yunbao.common.sud.decorator.SudFSMMGDecorator;
import com.yunbao.common.sud.decorator.SudFSMMGListener;
@ -113,6 +114,9 @@ public abstract class BaseGameViewModel implements SudFSMMGListener {
String appKey = getAppKey();
boolean testEnv = isTestEnv();
// 初始化sdk
if(BuildConfig.DEBUG) {
SudMGP.setLogLevel(Log.DEBUG);
}
SudMGP.initSDK(activity, appId, appKey, testEnv, new ISudListenerInitSDK() {
@Override
public void onSuccess() {