Problems in default android application
Hi,
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: http://www.devdaily.com/android/android-unfortunately-your-app-has-stopped-error
My AndroidManifest.xml:
"<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="16"/>
<application android:label="@string/app_name" android:icon="@drawable/ic_launcher">
<activity android:name="MyActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>"
I tried:
<activity android:name=".MyActivity"
<activity android:name="com.example.MyActivity"
<activity android:name="proj.com.example.MyActivity"
and still nothing. Any help?
Thanks
Please sign in to leave a comment.
Hi,
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:
Failure [INSTALL_FAILED_OLDER_SDK]
Running on both my phone or on 4.0.3 emulator (that under settings-about phone shows 4.0.4).
Any help, please?
Thanks