2.1 RNSDK application初始化
(1)自定义application并继承RNApplication,如下所示:
public class GameApplication extends RNApplication {
@Override
public void onCreate() {
super.onCreate();
RNSDK.init(this);
}
}
(2)在游戏自身的AndroidManifest.xml tag中声明如下:
<application
......
android:name="com.rn.sdk.demo.GameApplication "
...... >
备注:建议将android:hardwareAccelerated="false"改成true
(3)打开游戏应用模块的 build.gradle 文件,配置aihelp的信息(具体参数请咨询运营同学),添加如下内容块:
android{
....
defaultConfig {
.....
resValue "string", "r2aihelp_app_key" ,"R2GAMES_app_5518756774984196b710a793bf4c061d"
resValue "string", "r2aihelp_app_id" ,"r2games_platform_455ee6b95d0412fc1a969a6a4daa86f0"
resValue "string", "r2aihelp_domain" ,"r2games.aihelp.net"
.......
}
.....
}
Last updated
Was this helpful?