You are getting this error because "Text" is not a supported resource type.
When compiling resources on device, Interactive Ink SDK allows you to generate text lexicons and math grammars. You shall respectively choose "Text Lexicon" and "Math Grammar" as the target asset type for the Type argument of the compile method.
li perry
engine.createRecognitionAssetsBuilder().compile("Text", "1234567890");
java.lang.IllegalArgumentException: unsupported type of recognition asset
at com.myscript.iink.NativeFunctions.compile(Native Method)
at com.myscript.iink.RecognitionAssetsBuilder.compile(RecognitionAssetsBuilder.java:71)
这个错误我该如何处理?或该如何改造?
Hi Li,
Thank you for your update.
It is not possible to compile a Subset Knowledge resource on-device with RecognitionAssetsBuilder.
I you want to use a Subset Knowledge resource, you must compile them with the online tool via the Developer Portal :
https://developer.myscript.com/docs/interactive-ink/1.4/windows/advanced/build-custom-resources/#via-the-developer-portal
Best regards,
Gwenaëlle
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstGwenaelle @MyScript
Dear Li Perry,
Thank you for contacting us.
You are getting this error because "Text" is not a supported resource type.
When compiling resources on device, Interactive Ink SDK allows you to generate text lexicons and math grammars. You shall respectively choose
"Text Lexicon"
and"Math Grammar"
as the target asset type for the Type argument of the compile method.For further details, please refer to
https://developer.myscript.com/docs/interactive-ink/1.4/windows/advanced/build-custom-resources/#on-device
Best regards,
Gwenaëlle
li perry
那我需要支持 subset knowledge 这个类型可以么?
I need to support subset knowledge. Is that ok?
li perry
engine.createRecognitionAssetsBuilder().compile("Subset knowledge ", "1234567890");
String internalStoragePath = context.getFilesDir().getPath();
File file = new File(internalStoragePath, File.separator + "test3.res");
assetsBuilder.store(file.getPath());
我调用上面的方法生成的 subset knowledge test3.res文件,不经过重新编译打包apk直接使用,是否可行
Can I use APK directly without recompiling and packaging
Gwenaelle @MyScript
Hi Li,
Thank you for your update.
It is not possible to compile a Subset Knowledge resource on-device with RecognitionAssetsBuilder.
I you want to use a Subset Knowledge resource, you must compile them with the online tool via the Developer Portal :
https://developer.myscript.com/docs/interactive-ink/1.4/windows/advanced/build-custom-resources/#via-the-developer-portal
Best regards,
Gwenaëlle