升级统一版本后,Unity导出不适用于android

时间:2019-05-16 06:42:53

标签: android unity3d android-unity-plugin

旧的Unity版本:2018.1.6f1

Unity新版本:2019年版本

我正在开发一个统一的android项目,并且一切正常。我最近从2019年的最新统一版本生成了导出,但它不起作用。我在Android中收到 ResourceNotFound 异常。如果是从旧的统一版本生成的,则相同的导出有效。

我曾尝试升级android studio,但这似乎无济于事。 Android Studio是否需要进行任何更改才能使其与最新的统一版本导出一起使用?还是在生成导出时需要在Unity中进行任何更改?

我已附上以下日志:

    --------- beginning of crash
05-16 09:30:06.465 4495-4495/com.mytest.package E/AndroidRuntime: FATAL EXCEPTION: main
                                                                 Process: com.mytest.package, PID: 4495
                                                                 java.lang.Error: FATAL EXCEPTION [main]
                                                                 Unity version     : 2018.3.14f1
                                                                 Device model      : EPSON EMBT3C
                                                                 Device fingerprint: MOVERIO/embt3c/cht_cr_rvp:5.1.1/R1.4.0/H75607131158:user/release-keys

                                                                 Caused by: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mytest.package/com.mytest.package.activity.UnityPlayerActivity}: android.content.res.Resources$NotFoundException: String resource ID #0x0
                                                                     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
                                                                     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
                                                                     at android.app.ActivityThread.access$800(ActivityThread.java:151)
                                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
                                                                     at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                     at android.os.Looper.loop(Looper.java:135)
                                                                     at android.app.ActivityThread.main(ActivityThread.java:5258)
                                                                     at java.lang.reflect.Method.invoke(Native Method)
                                                                     at java.lang.reflect.Method.invoke(Method.java:372)
                                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
                                                                  Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x0
                                                                     at android.content.res.Resources.getText(Resources.java:299)
                                                                     at android.content.res.Resources.getString(Resources.java:385)
                                                                     at com.unity3d.player.UnityPlayer.a(Unknown Source)
                                                                     at com.unity3d.player.UnityPlayer.<init>(Unknown Source)
                                                                     at com.mytest.package.activity.UnityPlayerActivity.onCreate(UnityPlayerActivity.java:38)
                                                                     at android.app.Activity.performCreate(Activity.java:5994)
                                                                     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
                                                                     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
                                                                     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) 
                                                                     at android.app.ActivityThread.access$800(ActivityThread.java:151) 
                                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) 
                                                                     at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                     at android.os.Looper.loop(Looper.java:135) 
                                                                     at android.app.ActivityThread.main(ActivityThread.java:5258) 
                                                                     at java.lang.reflect.Method.invoke(Native Method) 
                                                                     at java.lang.reflect.Method.invoke(Method.java:372) 
                                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) 
                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) 
05-16 09:30:06.776 4495-4495/com.mytest.package I/Process: Sending signal. PID: 4495 SIG: 9

0 个答案:

没有答案