缺少 AndroidManifest.xml
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12525969/
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
AndroidManifest.xml is missing
提问by Prasad
I created one android application project in eclipse and whenever I tried to run that application its throwing an error message saying AndroidManifest.xml
file is missing. what is the reason for this ?
我在 Eclipse 中创建了一个 android 应用程序项目,每当我尝试运行该应用程序时,它都会抛出一条错误消息,指出AndroidManifest.xml
文件丢失。这是什么原因?
I am using eclipse with android-sdk and ADT version is 20. in SDK manager I installed android 2.2 API level only.. Is this is the problem for that error ?
我在 android-sdk 中使用 eclipse,ADT 版本为 20。在 SDK 管理器中,我只安装了 android 2.2 API 级别。这是该错误的问题吗?
回答by Rocky030
Delete bin
folder in project and your library dependencies. Then re-run application.
删除bin
项目中的文件夹和您的库依赖项。然后重新运行应用程序。
回答by Androholic
you should clean and refresh your project once.
您应该清理并刷新您的项目一次。
回答by Daniel F
I was able to fix this by manually deleting the bin directory, as well as the gen directory, right clicking project and selecting Android Tools->Fix Project Properties, then using Project->Build All.
我能够通过手动删除 bin 目录以及 gen 目录,右键单击项目并选择 Android Tools->Fix Project Properties,然后使用 Project->Build All 来解决此问题。
回答by Deepthi
Restart your eclipse and make sure that build automatically checked. It worked for me all the time. Hope this helps some one.
重新启动 eclipse 并确保自动检查构建。它一直对我有用。希望这对某人有所帮助。
回答by Jo?o Esquecido
I closed all projects that were unrelated with the one I was trying to run (right-click on project in Project Explorer and then selecting Close Project) and the problem magically disappeared (for no apparent reason). Then, even after I re-opened the closed projects, the problem did not come back.
我关闭了所有与我尝试运行的项目无关的项目(在项目资源管理器中右键单击项目,然后选择关闭项目),问题神奇地消失了(没有明显原因)。然后,即使我重新打开关闭的项目,问题也没有出现。
回答by NeverMind
I put the AndroidManifest.xml that in appcomatv7 and pasted to the project and problem solved
我把 AndroidManifest.xml 放在 appcomatv7 中并粘贴到项目中,问题解决了
回答by Riowaldy Indrawan
Click project -> Refresh (F5) -> Go to "Project" in the menu bar -> Clean. It works for me.
单击项目 -> 刷新 (F5) -> 转到菜单栏中的“项目” -> 清理。这个对我有用。
回答by FrankGeek
(what worked for me)
(什么对我有用)
1 - copy the file build.gradle
2 - drop the copied file in the android folder [example MyApp/android]
1 - 复制文件build.gradle
2 - 将复制的文件放到 android 文件夹中 [example MyApp/android]
回答by Raluca Lucaci
I had the problem in android studio after an update , it worked by Tools ->Android ->sync with gradle file
更新后我在 android studio 中遇到了问题,它通过工具 ->Android -> 与 gradle 文件同步
回答by J Webb
I was having the same problem and didn't understand why - followed all deletes of /bin, /gen, fixing AVD's, etc, still to no avail.
我遇到了同样的问题,不明白为什么 - 遵循 /bin、/gen 的所有删除,修复 AVD 等,仍然无济于事。
The /bin got me thinking though -
/bin 让我思考 -
I had previously used thisadvice to exclude /bin from the resource filters (in an effort to remove results from the search)....
我以前曾使用此建议从资源过滤器中排除 /bin(为了从搜索中删除结果)...
I removed the filter for /bin and voila.....
我删除了 /bin 的过滤器,瞧.....
Interesting this only affected me when I wanted to Debug or Run within Eclipse -- I could export a working APK without any problem, but debugging failed.
有趣的是,这仅在我想在 Eclipse 中调试或运行时影响我——我可以毫无问题地导出工作 APK,但调试失败。
Hope this helps.
希望这可以帮助。