Problems in default android application


I'm trying to check how we can build apk for android using IntelliJ (11.1.2). I create project from scratch and follow steps and when running application on emulator is says:

"Unfortunately, proj has stopped."

I think its clearly a rookie error. The launch of application is:
"Launching application: com.example/com.example.MyActivity.
DEVICE SHELL COMMAND: am start -n "com.example/com.example.MyActivity"
Starting: Intent { cmp=com.example/.MyActivity }

I notice that on AndroidManifest.xml on this line:
        <activity android:name="MyActivity"

it cannot find "MyActivity".

And clearly it mention that in here:

My AndroidManifest.xml:
"<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=""
    <uses-sdk android:minSdkVersion="16"/>
    <application android:label="@string/app_name" android:icon="@drawable/ic_launcher">
        <activity android:name="MyActivity"
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>

I tried:
<activity android:name=".MyActivity"
<activity android:name="com.example.MyActivity"
<activity android:name=""

and still nothing. Any help?


1 comment
Comment actions Permalink


Solution was simple, Intellij was only adding gen as source files.

But now I have a bigger problem. I have a application that is working great on emulator version 4.1, but I found out that my nexus runs on 4.0.4 so I installed SDK 4.0.3 (API 15). But now it says:

Running on both my phone or on 4.0.3 emulator (that under settings-about phone shows 4.0.4).

Any help, please?



Please sign in to leave a comment.