我使用的服务是:离线安卓SDK 2.1.20 + Unity 5.3.7f1
调用的接口是:
参数设置情况:
开发平台和机型:小米4, android 6.0
SDK版本号:2.1.20
代码或日志截图(上传截图能帮助您更快解决问题):
复现步骤、现象及其他描述:
UI 能呼出来,但是按钮上没有文字
adb log cat 给出的信息为:
12-08 18:13:46.709 12329 12329 W BSDigitalDialog: loadI18N error
12-08 18:13:46.709 12329 12329 W BSDigitalDialog: java.util.MissingResourceException: Can't find resource for bundle 'BaiduASRDigitalDialog_zh_CN', key ''
12-08 18:13:46.709 12329 12329 W BSDigitalDialog: at java.util.ResourceBundle.missingResourceException(ResourceBundle.java:238)
12-08 18:13:46.709 12329 12329 W BSDigitalDialog: at java.util.ResourceBundle.getBundle(ResourceBundle.java:230)
12-08 18:13:46.709 12329 12329 W BSDigitalDialog: at java.util.ResourceBundle.getBundle(ResourceBundle.java:139)
12-08 18:13:46.709 12329 12329 W BSDigitalDialog: at com.baidu.voicerecognition.android.ui.BaiduASRDigitalDialog.loadI18N(BaiduASRDigitalDialog.java:484)
12-08 18:13:46.709 12329 12329 W BSDigitalDialog: at com.baidu.voicerecognition.android.ui.BaiduASRDigitalDialog.onCreate(BaiduASRDigitalDialog.java:283)
12-08 18:13:46.709 12329 12329 W BSDigitalDialog: at android.app.Activity.performCreate(Activity.java:6303)
12-08 18:13:46.709 12329 12329 W BSDigitalDialog: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
12-08 18:13:46.709 12329 12329 W BSDigitalDialog: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2376)
12-08 18:13:46.709 12329 12329 W BSDigitalDialog: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2483)
12-08 18:13:46.709 12329 12329 W BSDigitalDialog: at android.app.ActivityThread.access$900(ActivityThread.java:153)
12-08 18:13:46.709 12329 12329 W BSDigitalDialog: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1349)
12-08 18:13:46.709 12329 12329 W BSDigitalDialog: at android.os.Handler.dispatchMessage(Handler.java:102)
12-08 18:13:46.709 12329 12329 W BSDigitalDialog: at android.os.Looper.loop(Looper.java:148)
12-08 18:13:46.709 12329 12329 W BSDigitalDialog: at android.app.ActivityThread.main(ActivityThread.java:5438)
12-08 18:13:46.709 12329 12329 W BSDigitalDialog: at java.lang.reflect.Method.invoke(Native Method)
12-08 18:13:46.709 12329 12329 W BSDigitalDialog: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
12-08 18:13:46.709 12329 12329 W BSDigitalDialog: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
12-08 18:13:46.716 12329 12329 D ActivityThreadInjector: clearCachedDrawables
您好,目前怀疑是编译导致jar中的非class文件丢失所致
Unity 默认不会将 JAR 包里面的 ResourceBundle 打包到 apk 里面