所以我在Glass上工作的GlassVoice.jar VoiceListener直到我改變了一些東西。一個是我將Glass升級到XE18.11,另一個是我將VoiceListener移到了主要活動之外的自己的線程中。現在,當我運行代碼,我得到以下錯誤:Glass VoiceListener導致非法參數異常
06-24 12:46:35.844: E/AndroidRuntime(5425): FATAL EXCEPTION: main 06-24 12:46:35.844: E/AndroidRuntime(5425): Process: com.myapp, PID: 5425 06-24 12:46:35.844: E/AndroidRuntime(5425): java.lang.IllegalArgumentException: Unknown URI type: 1279544898 06-24 12:46:35.844: E/AndroidRuntime(5425): at android.os.Parcel.readException(Parcel.java:1469) 06-24 12:46:35.844: E/AndroidRuntime(5425): at android.os.Parcel.readException(Parcel.java:1419) 06-24 12:46:35.844: E/AndroidRuntime(5425): at com.google.glass.voice.IVoiceService$Stub$Proxy.setConfig(Unknown Source) 06-24 12:46:35.844: E/AndroidRuntime(5425): at com.google.glass.input.VoiceInputHelper.setVoiceConfig(Unknown Source) 06-24 12:46:35.844: E/AndroidRuntime(5425): at com.myapp.voice_recognition.VoiceRecognitionThread$MyVoiceListener.onVoiceServiceConnected(VoiceRecognitionThread.java:183) 06-24 12:46:35.844: E/AndroidRuntime(5425): at com.google.glass.input.VoiceInputHelper.dispatchVoiceServiceConnected(Unknown Source) 06-24 12:46:35.844: E/AndroidRuntime(5425): at com.google.glass.input.VoiceInputHelper.access$400(Unknown Source) 06-24 12:46:35.844: E/AndroidRuntime(5425): at com.google.glass.input.VoiceInputHelper$2.handleMessage(Unknown Source) 06-24 12:46:35.844: E/AndroidRuntime(5425): at android.os.Handler.dispatchMessage(Handler.java:102) 06-24 12:46:35.844: E/AndroidRuntime(5425): at android.os.Looper.loop(Looper.java:149) 06-24 12:46:35.844: E/AndroidRuntime(5425): at android.app.ActivityThread.main(ActivityThread.java:5061) 06-24 12:46:35.844: E/AndroidRuntime(5425): at java.lang.reflect.Method.invokeNative(Native Method) 06-24 12:46:35.844: E/AndroidRuntime(5425): at java.lang.reflect.Method.invoke(Method.java:515) 06-24 12:46:35.844: E/AndroidRuntime(5425): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) 06-24 12:46:35.844: E/AndroidRuntime(5425): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602) 06-24 12:46:35.844: E/AndroidRuntime(5425): at dalvik.system.NativeStart.main(Native Method)
我想可能是因爲與軟件升級的罐子發生了變化,所以我repulled的GlassVoice APK和重做了apk->罐子的過程,但是當我使用新的jar時,我甚至無法上傳應用程序,因爲內存不足。我不知道爲什麼會發生。
有什麼想法?代碼和它的工作方式一樣,但如果你需要查看它,我可以提供它。
更新:我使用git回到我將偵聽器移動到新線程之前。此版本在XE12上運行率達到100%。它現在不起作用,同樣的錯誤。嘗試使用新jar時出現同樣的內存問題。思考?