Project in Android Studio won't start - 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:
- From top bar menu choose Run (ALT+U)
- Edit configuration... (ALT+R)
- Choose or add Android application
- In General tab choose project in Module navigation list
- Here I do not know what to choose Launch default activity or Launch
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?
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.
- Open Navigator
- Open Module settings
- From Project Settings choose Modules
- Select src and gen folders and marked them as Source folders by right-click on them and select Source
Hope that will help.
You may have to edit the launch configuration to tell it what Activity to run, or if it is running your default activity, ensure your Manifest is correctly stating this Activity.
Click the dropdown next to the Green Run Arrow on the top bar. And press 'Edit configurations':
Did you correctly imported also your library in Android Studio?
Check Files > Project Structures > Libraries
Did you see your library L?
Replace apply plugin: 'com.android.Library' (from module level gradle) to apply plugin: 'com.android.application'