小编Ari*_*dov的帖子

尝试在 Android Studio 中打开 Unity 活动会产生 android.content.res.Resources$NotFoundException: String resource ID #0x0

我将一个统一项目导入到 android studio,因为 Android Studio 有应用程序和菜单,它应该打开统一游戏。导入统一项目的错误为零,我更新了所有 gradle 文件和清单。

我正在尝试使用按钮通过 android studio 活动打开 Unity 活动。

错误:

V/FA: onActivityCreated
E/ample.phonedue: Invalid ID 0x00000000.
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.phoneduel, PID: 31572
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.phoneduel/com.unity3d.player.UnityPlayerActivity}: android.content.res.Resources$NotFoundException: String resource ID #0x0
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2951)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3086)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6718)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
     Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x0
        at android.content.res.Resources.getText(Resources.java:348)
        at android.content.res.Resources.getString(Resources.java:441) …
Run Code Online (Sandbox Code Playgroud)

java android unity-game-engine android-studio

2
推荐指数
1
解决办法
492
查看次数

标签 统计

android ×1

android-studio ×1

java ×1

unity-game-engine ×1