“settings.gradle (项目设置)” 错误

huangapple go评论60阅读模式
英文:

"settings.gradle (Project Setting)" errore

问题

<?xml version="1.0" encoding="UTF-8"?>
<!--   

在项目工具栏中描述了一个错误,所以我双击它,它只是写着:

<?xml version="1.0" encoding="UTF-8"?>
<!--   

就像在这个截图中所示:

enter image description here

这不会影响我运行项目,但我不知道这是否正常,看起来似乎不是。

在此之前,我删除了.idea目录以解决另一个问题,而且解决得很好,但也许这与我的错误有关。

我再也看不到我的项目结构,就像我无法更改API级别,它只是显示给我这个:

enter image description here

我对使用Android Studio并不是很熟悉,大约3个月前开始做项目...所以希望您能帮助我。

谢谢大家!


<details>
<summary>英文:</summary>

&quot;settings.gradle (Project Setting)&quot; describe me an mistake in the tool bar project so I double click on it and it&#39;s just wrote 

<?xml version="1.0" encoding="UTF-8"?>
<!--

Like on this screenShote

[enter image description here][1]

that does not prevent me to run my project but I don&#39;t know if it&#39;s normal, it doesn&#39;t seem to be.

before that a delete my `.idea` directory to solve an other problem and it solved it well but maybe is it related to my mistake.

And I can see my Project Structure anymore like I can&#39;t change the API level it&#39;s just show me this:

[enter image description here][2]

I&#39;m not really confortable with android studio a start ma project like 3 months ago.. so I hope you can help me

thanks y&#39;all

 [1]: https://i.stack.imgur.com/rslQT.png
 [2]: https://i.stack.imgur.com/2Nwi2.png

</details>


# 答案1
**得分**: 0

你的`settings.gradle`不应包含这些行。

通常情况下,它包含有关应用模块和项目名称的信息。

```groovy
include ':app'
rootProject.name = "YourProjectName"

对于你的项目,我注意到你应该替换为stapsQCM,所以

include ':app'
rootProject.name = "stapsQCM"

完成这些后,重新构建你的项目。
同时阅读文档

英文:

Your settings.gradle should not contain those lines.

This is what it usually has. Information about app module and project name

include &#39;:app&#39;
rootProject.name = &quot;YourProjectName&quot;

For your project i can notice that you should replace with stapsQCM, so

include &#39;:app&#39;
rootProject.name = &quot;stapsQCM&quot;

After this rebuild your project.
Also read documentation.

huangapple
  • 本文由 发表于 2020年9月19日 00:07:44
  • 转载请务必保留本文链接:https://go.coder-hub.com/63959208.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定