AIDE“未知实体‘R’"Android Studio 应用项目出错 [英] AIDE "Unknown entity 'R'" Error with Android Studio App Project

查看:105
本文介绍了AIDE“未知实体‘R’"Android Studio 应用项目出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 AIDE 开始使用 Android Studio 编写的 Android 应用程序,但我遇到了项目在 AIDE 中抛出 Unknown entity 'R' 错误的问题,我从来没有在 Android Studio 中看到.我想不知何故,Android Studio 使用 Gradle 来管理它并防止它成为一个问题,但由于 AIDE 不支持 Gradle,该项目无法正常运行.

I am trying to work on an Android App that I started writing with Android Studio using AIDE, but I have an issue with the project throwing an Unknown entity 'R' error in AIDE that I never saw in Android Studio. I would imagine that somehow, Android Studio uses Gradle to manage this and prevent this from being an issue, but since AIDE does not support Gradle, the project does not function properly.

我必须做些什么才能使项目在 AIDE 中运行,同时仍保持与 Android Studio 的兼容性?这似乎是其他人遇到的问题,但我一直无法找到解决问题的方法.

What must I do to make the project work in AIDE while still maintaining compatibility with Android Studio? This seems to be an issue that others have experienced, but I have been unable to find a solution to the problem.

推荐答案

只需使用 R 添加一个带有项目名称的导入.例如,我的包名称是 - com.xyz.app 然后添加一个 Import as import com.xyz.app.R;

Just add an import with R with the name of your Project. Like for example, my package name is - com.xyz.app then add an Import as import com.xyz.app.R;

这篇关于AIDE“未知实体‘R’"Android Studio 应用项目出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆