Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Activity class does not exist

Tags:

android

Aaaargh! I don't know what's going on, but suddenly I can't launch my app. I'm using IntelliJ and I keep getting this error. I thought maybe there was a typo somewhere in the manifest, but there doesn't seem to be. Heres' the error:

Launching application: com.foo.app/com.foo.app.main. DEVICE SHELL COMMAND: am start -n "com.foo.app/com.foo.app.main" Starting: Intent { cmp=com.foo.app/.main} Error type 3 Error: Activity class {com.foo.app/com.foo.app.main} does not exist. 

And here's my Manifest:

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.foo.app">     <application android:icon="@drawable/icon" android:label="@string/app_name">         <activity android:name=".main">             <intent-filter>                 <action android:name="android.intent.action.MAIN"/>                 <category android:name="android.intent.category.LAUNCHER"/>             </intent-filter>         </activity>         <activity android:name=".NoBellsActivity"/>     </application> </manifest> 

And the strange thing is that ADB shows me that the ActivityManager is starting the intent just fine...

like image 626
LuxuryMode Avatar asked Aug 15 '11 21:08

LuxuryMode


1 Answers

The problem is in the build / run configuration of your project. You have to check the "Deploy application" checkbox in the Run/Debug Configuration screen, under the General tab.

This solved my problem.

like image 52
Botond Kopacz Avatar answered Oct 03 '22 21:10

Botond Kopacz