gpt4 book ai didi

android - 为什么 R 不存在错误出现在 android 中?

转载 作者:可可西里 更新时间:2023-11-01 18:49:40 25 4
gpt4 key购买 nike

packages/apps/Myfolder/src/com/android/myfolder/MyFile.java:196: package R does not exist
addPreferencesFromResource(R.xml.myfile);
^
packages/apps/Myfolder/src/com/android/myfolder/MyFile.java:344: package R does not exist
menu.add(0, MENU_SAVE, 0, R.string.menu_save)
^
packages/apps/Myfolder/src/com/android/myfolder/MyFile.java:346: package R does not exist
menu.add(0, MENU_CANCEL, 0, R.string.menu_cancel)
^
packages/apps/Myfolder/src/com/android/myfolder/MyFile.java:454: package R does not exist
errorMsg = mRes.getString(R.string.error_empty);
^
packages/apps/Myfolder/src/com/android/myfolder/MyFile.java:458: package R does not exist
errorMsg = mRes.getString(R.string.error_empty);

最佳答案

确保你有:在调用 R 类的 java 文件中打包 'YOUR PACKAGE NAME'

关于android - 为什么 R 不存在错误出现在 android 中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4536680/

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