Android Studio 中的项目无法启动 - 未指定活动类 [英] Project in Android Studio won't start - Activity Class Not Specified
问题描述
根据适用于 android 的新 IDE,我决定从我的旧 Eclipse 中导入项目.不幸的是,我无法运行它们,因为信息 Error: Activity Class not specified
这个错误可以在我用户重现步骤中找到:
According to new IDE for android I decided to import projects from my old eclipse.
Unfortunatelly I cannot run them because of information Error: Activity Class not specified
This error can be found I user reproduce steps:
- 从顶部栏菜单中选择运行 (ALT+U)
- 编辑配置... (ALT+R)
- 选择或添加 Android 应用程序
- 在常规选项卡中选择
模块导航列表
中的项目 - 这里不知道该选择
Launch default Activity
还是Launch
无论我做什么,我仍然遇到Run/Debug Configurations
windows 错误的底部.我应该如何开始我的 android 项目?
No matter what I do, I still get at the bottom of Run/Debug Configurations
windows error.
How am I supposed start my android projects?
推荐答案
请检查您的 src 文件夹是否已添加到构建路径中.我通过导出到 Gradle 的方式从 Eclipse 导入了我的工作区,默认情况下只有 gen 文件夹被标记为源文件.因此,IDE 无法编译您的源文件,也无法启动任何活动.
Please check if your src folders are added into the build path. I imported my workspace from Eclipse by export to Gradle, and by default only gen folders were marked as source files. Because of that, IDE cannot compile your source files and cannot launch any activities.
- 打开导航器
- 打开模块设置
- 从项目设置中选择模块
- 选择 src 和 gen 文件夹并通过右键单击它们并选择 Source 将它们标记为 Source 文件夹
希望会有所帮助.
这篇关于Android Studio 中的项目无法启动 - 未指定活动类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!