You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

在Android平台运行libGDX时遇MissingResourceException错误求助

Fixing the "Can't find bundle for base name messages.AndroidJpsBundle" Error in libGDX Android

Hey there, let's tackle this frustrating AndroidJpsBundle missing issue you're hitting with your libGDX project. I've seen this error pop up fairly often, and it's almost always tied to IDE caching, version mismatches, or plugin resource glitches. Here are the most reliable fixes to get your app running on Android again:

  • Clean, rebuild, and invalidate caches (start here!)
    This is the first go-to fix for almost all Android Studio build weirdness:

    1. Click Build > Clean Project to wipe old build artifacts
    2. Then run Build > Rebuild Project to generate fresh files
    3. If that doesn't work, go to File > Invalidate Caches..., check the "Invalidate and Restart" option, and let Android Studio restart. This clears out corrupted cached data that often causes resource bundle issues.
  • Check Android Gradle Plugin (AGP) and Gradle version compatibility
    Mismatched AGP and Gradle versions are a common culprit here:

    1. Open your project's root build.gradle file
    2. Look for the com.android.tools.build:gradle dependency in the buildscript > dependencies block
    3. Make sure this version is compatible with your project's Gradle version. You can use Android Studio's built-in checker: go to File > Project Structure > Project and select a recommended AGP/Gradle version pair from the dropdowns.
  • Switch to Android Studio's Embedded JDK
    System-installed JDKs sometimes have compatibility issues with Android Studio's plugins:

    1. Go to File > Project Structure > SDK Location
    2. Check the box for "Use embedded JDK (recommended)"
    3. Restart Android Studio to apply the change. This ensures you're using a JDK that's fully tested with your IDE version.
  • Verify libGDX Android module configuration
    Double-check that your Android module's setup is consistent:

    1. Open the Android module's build.gradle file
    2. Ensure compileSdkVersion and targetSdkVersion match the Android SDK versions you have installed
    3. Confirm all libGDX dependencies across modules use the same version (use the gdxVersion variable in your root build.gradle to keep this unified)
  • Manually clear Android Studio's plugin cache (last resort)
    If all else fails, the IDE's plugin resources might be corrupted:

    • On Windows: Delete the folder C:\Users\<YourUsername>\.AndroidStudio<Version>\system\caches
    • On Mac: Delete ~/Library/Caches/AndroidStudio<Version>
    • On Linux: Delete ~/.AndroidStudio<Version>/system/caches
      Restart Android Studio afterward—it will re-download and regenerate all necessary plugin resources, including the missing AndroidJpsBundle.

Start with the first couple of steps—cleaning caches and checking version compatibility usually resolves this error quickly. If you're still stuck, work your way through the rest of the list.

内容的提问来源于stack exchange,提问作者sadeghpro

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.22 09:45:42