gpt4 book ai didi

Android:可搜索词典错误:(R.raw.definitions)

转载 作者:搜寻专家 更新时间:2023-11-01 07:40:35 25 4
gpt4 key购买 nike

我是 android 的新手,我从谷歌开始这个示例,但我有一个问题,无法通过它。

此行在 DictonaryDatabase.java 中有错误。

InputStream inputStream = resources.openRawResource(R.raw.definitions);

并且错误提示“原始无法解析或不在字段中。”

我已经导入了 Java.R,但这似乎无法解决问题。我还创建了一个原始文件夹,但没有修复它。

感谢您的帮助。

最佳答案

您需要添加definitions.txt。文件目录应该像这样/res/raw/definitions.txt 。它只是字典的软拷贝。

并在 definition.txt 文件中复制以下文本

我只输入了“A”和“B”字母。如果你得到任何字典单词的文本,只需复制这些单词直到这个定义文件中的字母“Z”

abbey - n. a monastery ruled by an abbot
abide - v. dwell; inhabit or live in
abound - v. be abundant or plentiful; exist in large quantities
absence - n. the state of being absent
absorb - v. assimilate or take in
abstinence - n. practice of refraining from indulging an appetite especially alcohol
absurd - j. inconsistent with reason or logic or common sense
boycott - n. a group's refusal to have commercial dealings with some organization in
breach - n. an opening (especially a gap in a dike or fortification)
caricature - n. a representation of a person that is exaggerated for comic effect
casual - j. without or seeming to be without plan or method; offhand

关于Android:可搜索词典错误:(R.raw.definitions),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4246621/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com