My project works very well but when I made the APK file, the error appears.
The type or namespace name Windows' does not exist in the namespace
UnityEngine'. Are you missing an assembly reference?
The type or namespace name `ConfidenceLevel' could not be found. Are you missing an assembly reference?
The type or namespace name `PhraseRecognizer' could not be found. Are you missing an assembly reference?
The type or namespace name `PhraseRecognizedEventArgs' could not be found. Are you missing an assembly reference?
using UnityEngine.Windows.Speech; <-- These places show when I click top error.
I have found the solution as :
http://answers.unity3d.com/questions/42719/how-should-i-add-references-to-additional-mono-ass.html .
Assets --> ReimportAll.
I have added #if UNITY_EDITOR, the error is gone but it does not work on android: https://docs.unity3d.com/Manual/PlatformDependentCompilation.html
But It's not working.
Can some body help me? Thanks all!
The Windows
namespace in Unity is made for Windows PC build only. It will not and should not work on Android. It should not even build for Android to begin with and you should not try to make Unity use it on Android.
Use UNITY_STANDALONE_WIN
instead of UNITY_EDITOR
to prevent it from compiling for any other platform. If you are looking to do Speech Recognition in Unity, see this post where I described classes required to make our own plugin or use the already made asset I linked in that answer.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.