Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

anaryx-plugin

7
Posts
9
Followers
1
Following
A member registered Aug 26, 2025 · View creator page →

Creator of

Recent community posts

Hello, thank you in advance. I really regret this bug; it might occur in MainActivity.java, because the latest WebView version is very sensitive and its security is very strict. I have already replaced the download file but still with the same version because this is just a small bug. If you are lazy to download the file because the size is large, you can modify MainActivity.java yourself.

Here is the file:

\AG APK Builder-win32-x64\resources\base_module\app\src\main\java\com\xxx\yyy\MainActivity.java

Replace all of this:

package com.xxx.yyy;
import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;
import androidx.appcompat.app.AppCompatActivity;
public class MainActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        WebView webView = new WebView(this);
        WebSettings settings = webView.getSettings();
        // Aktifkan JavaScript
        settings.setJavaScriptEnabled(true);
        // Aktifkan akses file
        settings.setAllowFileAccess(true);
        settings.setDomStorageEnabled(true);
        // Tambahan penting untuk Android 11+ agar WebView bisa load file lokal
        settings.setAllowFileAccessFromFileURLs(true);
        settings.setAllowUniversalAccessFromFileURLs(true);
        // Load index.html dari assets/www
        webView.loadUrl("file:///android_asset/www/index.html");
        setContentView(webView);
    }
}

replace with the legacy version, remember not to duplicate

package com.xxx.yyy; 
import android.os.Bundle;
import android.view.View;
import android.webkit.ConsoleMessage;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import androidx.appcompat.app.AppCompatActivity;
public class MainActivity extends AppCompatActivity {
    private WebView mWebView;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // ===============================
        // ENABLE WEBVIEW DEBUG (ADB)
        // ===============================
        WebView.setWebContentsDebuggingEnabled(true);
        // ===============================
        // INIT WEBVIEW
        // ===============================
        mWebView = new WebView(this);
        // Fullscreen immersive (RPG safe)
        mWebView.setSystemUiVisibility(
                View.SYSTEM_UI_FLAG_LOW_PROFILE
                        | View.SYSTEM_UI_FLAG_FULLSCREEN
                        | View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                        | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
                        | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                        | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
        );
        // ===============================
        // WEB SETTINGS (MV & MZ SAFE)
        // ===============================
        WebSettings settings = mWebView.getSettings();
        settings.setJavaScriptEnabled(true);
        settings.setDomStorageEnabled(true);
        settings.setAllowFileAccess(true);
        settings.setAllowContentAccess(true);
        settings.setAllowFileAccessFromFileURLs(true);
        settings.setAllowUniversalAccessFromFileURLs(true);
        settings.setMediaPlaybackRequiresUserGesture(false);
        // Android 9+ (WAJIB untuk local file + JS)
        settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
        // CACHE FIX (API BARU)
        settings.setCacheMode(WebSettings.LOAD_NO_CACHE);
        // Performance (MZ butuh ini)
        settings.setLoadWithOverviewMode(true);
        settings.setUseWideViewPort(true);
        // ===============================
        // WEBVIEW CLIENT
        // ===============================
        mWebView.setWebViewClient(new WebViewClient());
        // ===============================
        // WEBCHROME CLIENT (JS ERROR LOG)
        // ===============================
        mWebView.setWebChromeClient(new WebChromeClient() {
            @Override
            public boolean onConsoleMessage(ConsoleMessage msg) {
                android.util.Log.e(
                        "WEBVIEW",
                        msg.message()
                                + " [Line " + msg.lineNumber()
                                + "] " + msg.sourceId()
                );
                return true;
            }
        });
        setContentView(mWebView);
        // ===============================
        // LOAD RPG MAKER
        // ===============================
        mWebView.loadUrl("file:///android_asset/www/index.html");
    }
    // ===============================
    // KEEP FULLSCREEN
    // ===============================
    @Override
    public void onWindowFocusChanged(boolean hasFocus) {
        super.onWindowFocusChanged(hasFocus);
        if (hasFocus && mWebView != null) {
            mWebView.setSystemUiVisibility(
                    View.SYSTEM_UI_FLAG_LOW_PROFILE
                            | View.SYSTEM_UI_FLAG_FULLSCREEN
                            | View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                            | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
                            | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                            | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
            );
        }
    }
    @Override
    protected void onResume() {
        super.onResume();
        if (mWebView != null) {
            mWebView.onResume();
            mWebView.postDelayed(() -> mWebView.requestFocus(), 200);
        }
    }
    @Override
    protected void onPause() {
        if (mWebView != null) {
            mWebView.onPause();
        }
        super.onPause();
    }
}

I hope this can help fix your problem. If your problem isn't resolved, I would like a screenshot of the error from the built APK. Thank you.

Thank you for your feedback 🙏 To help me identify and reproduce this bug, please include the following information:

1. Device name 

2. Model Android version 

3. RPG Maker version used (MV/MZ, including version if possible) 


This information is very helpful for ensuring compatibility and fixing the issue in future updates. Thank you 🙏

Thanks for the report 🙏

The issue is caused by non-ASCII characters and spaces in the folder path.

Example of problematic path:

E:\RM��������\AG-APK-OFFLINE-VERSION\...

Android Gradle on Windows cannot reliably handle special/corrupted characters (like �) and spaces in paths.

Please move or rename the project to an ASCII-only path and avoid spaces.

If you need separation, use hyphens (-) instead of spaces.

Recommended example:

C:\AG-APK\

D:\RPGMaker\AG-APK-Builder\

After that, rebuild the APK/AAB. This should resolve the issue.

Okay, maybe tomorrow I will upload a truly portable one without internet, because there are some things that need to be changed, thank you for your enthusiasm. 😄

Ahhh, the error is obvious. When building an APK for the first time, make sure you have a stable internet connection. Ag APK Builder requires Gradle to build APKs and AABs. So, if the internet is down or slow, the download and installation will fail. This only applies to the first build.

Thanks for the feedback, perhaps the portable Java in that folder isn't being detected. May I ask what device you're using? And what version of Windows you're running? This will make it easier to fix in future updates. I'll probably update everything with the aab version tomorrow.

Hi bro, to use this, you must fill in all the required details. 

1.Fill in the game name, for example: 

anangame 

2. Fill in the package according to your game, for example: com.anangame

 3.enter your game version. If this is your first game, it's 1.0.0; if this is the second update, you can enter 1.0.1 and so on.

 Then, select the deployed RPG Maker project folder, and the folder must be named www. I haven't released a tutorial yet. Maybe I will release one for a future update.

Hope this helps, if you have any other questions just ask, I'm happy to answer them