rpg-封装接入指南


本文档是对 RPG MV Maker 引擎游戏的Android Studio模板工程的说明, 下载模板工程

由于此工程已接入 4399 版署SDK,游戏只需要确认版本和打包配置即可

集成流程

引入SDK

dependencies {
    // 运营 SDK,建议使用最新版本,可通过浏览仓库地址或向运营咨询版本
    implementation "cn.m4399.sdk:operateBZ:2.4.1"
}

调整游戏打包配置

android {
    defaultConfig {
        applicationId "cn.m4399.rpgsample"
        versionCode 20201001
        versionName "2.1.0b"
    }
}

AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.example.rpgsample">
...
    <application
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:theme="@style/AppTheme"
        tools:ignore="UnusedAttribute">
...
</manifest>

签名

游戏应使用apktool或 as 生成签名文件,或使用已有签名文件
并参考app/build.gradlesigningConfigs定义与使用方式配置打包签名

替换游戏包

最后,删除app/src/main/assets下原有所有文件,并将编译好的RPG Maker游戏文件移动到其下

完成最后的步骤后,同步项目,即可打包验证