java 无法解析符号@dimen/activity_horizontal_margin
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/48002292/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Cannot resolve symbol @dimen/activity_horizontal_margin
提问by lmathurin
Im following this tutorial on parsing JSON within Android
我正在关注有关在 Android 中解析 JSON 的本教程
https://www.tutorialspoint.com/android/android_json_parser.htm
https://www.tutorialspoint.com/android/android_json_parser.htm
when I copy and paste the data from list_item.xml I get "cannot resolve symbol" and google searches are yielding nothing
当我从 list_item.xml 复制并粘贴数据时,我得到“无法解析符号”并且谷歌搜索没有产生任何结果
回答by chandani c patel
Please add this line into your dimens.xml
请将此行添加到您的 dimens.xml
<dimen name="activity_horizontal_margin">16dp</dimen>
you can give whatever value you want instead of 16dp
你可以给任何你想要的值而不是 16dp
if you have not created dimens.xml
, you can create it in values.xml
folder.
如果你还没有创建dimens.xml
,你可以在values.xml
文件夹中创建它。