I'm going throught the tutorial on developer.android.com and I've gotten to the point where it wants me to run the program. I right click on the project in the project explorer, go to run as and click android application. The console displays the following
[2014-06-27 15:15:23 - myFirstApp] Android Launch!
[2014-06-27 15:15:23 - myFirstApp] adb is running normally.
[2014-06-27 15:15:23 - myFirstApp] No Launcher activity found!
[2014-06-27 15:15:23 - myFirstApp] The launch will only sync the application package on the device!
[2014-06-27 15:15:23 - myFirstApp] Performing sync
[2014-06-27 15:15:23 - myFirstApp] Automatic Target Mode: Unable to detect device compatibility. Please select a target device.
If you need to see the androidmanifest.xml file, here it is
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myfirstapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
</application>
</manifest>
You are missing activity tag like:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myfirstapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
***<activity
android:name="com.example.myfirstapp.YourActivity"
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>
Related
When I try to create a new Android project and run it it did not appear on the emulator.
This is the console message :
[2014-04-12 00:30:57 - Fir] Android Launch!
[2014-04-12 00:30:57 - Fir] adb is running normally.
[2014-04-12 00:30:57 - Fir] Performing com.example.fir.MainActivity activity launch
[2014-04-12 00:31:05 - Fir] Uploading Fir.apk onto device 'emulator-5554'
[2014-04-12 00:31:06 - Fir] Installing Fir.apk...
[2014-04-12 00:31:22 - Fir] Success!
[2014-04-12 00:31:22 - Fir] Starting activity com.example.fir.MainActivity on device emulator-5554
I wait more than one hour and its not appear? And I try to kill-server adb and start it again, but still the same problem.
Please help...
Try the genymotion Emulator. It is faster than the normal android Emulator.
Can you post your manifest.xml?
This is my manifest.xml ,And i will try the genymotion Emulator
` <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.fir"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.fir.MainActivity"
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 am working in android using eclipse. page navigation.
but i counldn't see my app on emulator.
I have posted my manifest file and the related errors.
plssss help me plsss.
Manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.navigate"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.navigate.SecondScreenActivity"
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>
Errors:
[2014-02-02 16:35:53 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for C:\Users\swathi\workspace\Navigate\AndroidManifest.xml: Attribute name "filter" associated with an element type "intent" must be followed by the ' = ' character.
[2014-02-02 16:35:53 - Navigate] Error in an XML file: aborting build.
[2014-02-02 16:36:01 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for C:\Users\swathi\workspace\Navigate\AndroidManifest.xml: Element type "action" must be followed by either attribute specifications, ">" or "/>".
[2014-02-02 16:36:01 - Navigate] Error in an XML file: aborting build.
[2014-02-02 16:36:16 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for C:\Users\swathi\workspace\Navigate\AndroidManifest.xml: The element type "intentfilter" must be terminated by the matching end-tag "</intentfilter>".
[2014-02-02 16:36:16 - Navigate] Error in an XML file: aborting build.
try using this .SecondScreenActivity instead of "com.example.navigate.SecondScreenActivity"
I am learning Android and can not get my program to show up in the program listings drawer of my Nexus S emulated device. When I load up the emulator, it does load my program successfully, after hitting "run new configuration". I know there are a ton of threads on this...but from what I can tell I have everything right in my manifest with:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Also, to be clear the run configuration in Eclipse does run my program successfully. It's just not in the apps menu/drawer of the emulated device to click and run:
[2013-03-07 20:14:04 - TodDoList] New emulator found: emulator-5554
[2013-03-07 20:14:04 - TodDoList] Waiting for HOME ('android.process.acore') to be launched...
[2013-03-07 20:14:46 - TodDoList] HOME is up on device 'emulator-5554'
[2013-03-07 20:14:46 - TodDoList] Uploading TodDoList.apk onto device 'emulator-5554'
[2013-03-07 20:14:47 - TodDoList] Installing TodDoList.apk...
[2013-03-07 20:15:23 - TodDoList] Success!
[2013-03-07 20:15:23 - TodDoList] Starting activity com.paad.toddolist.ToDoListActivity on device emulator-5554
[2013-03-07 20:15:24 - TodDoList] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.paad.toddolist/.ToDoListActivity }
Here is my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.paad.toddolist"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="4"
android:targetSdkVersion="15" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.paad.toddolist.ToDoListActivity"
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>
Here is my strings.xml file:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">TodDoList</string>
<string name="addItemHint">New To Do List</string>
<string name="addItemContentDescription">New To Do Item</string>
</resources>
Try replacing
android:name="com.paad.toddolist.ToDoListActivity"
with
android:name=".ToDoListActivity"
I just changed the main activity name after creating the app and updated the same in Manifest file.
But now the app is getting built without any error, its not at all getting launched. Here is what i get as output in eclips
[2012-05-05 21:32:12 - Test] Performing sync [2012-05-05
21:32:12 - Test] Automatic Target Mode: Preferred AVD
'Test_G' is available on emulator 'emulator-5554' [2012-05-05 21:32:12
- Test] Uploading Test.apk onto device 'emulator-5554' [2012-05-05 21:32:12 - Test] Installing Test.apk...
[2012-05-05 21:32:15 - Test] Success! [2012-05-05
21:32:16 - Test] \Test\binTest.apk installed on device
[2012-05-05 21:32:16 - Test] Done!
How to solve this
Manifest.xml
?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="Test"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity android:name="contactListTab"></activity>
</application>
</manifest>
You haven't provided the intent category. Try adding
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Between the acitivity tags!
Your activity declaration isn't saying it should be the first activity that should be opened after the app starts to do this you have to add the intent filters and you're activity name should be . because it's a java file in the package. And as mentioned in the other answer you have to set the package="" to the package name of your app.
Try changing your manifest to this:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="-->PACKAGE NAME<--"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity android:name=".contactListTab">
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Ensure the activityname is contactListTab!
package="Test"
Instead of Test, put the package where your Activity resides. Also make sure contactListTab is your Activity.
I suggest you declaring such strings in your res/strings.xml file instead of having them here. This way changing them is easier.
I am getting an error in my manifest and I don't know why, please could you help
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.kaoticravers.djimmenze"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" android:testOnly="false" android:debuggable="false">
<activity
android:name=".startingmain"
android:screenOrientation="portrait"
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>
And in the console when I try run my app in my emulator I get this error:
[2012-04-03 23:10:31 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for C:\Users\mark\workspace\KR Radio app\AndroidManifest.xml: Element type "manifest" must be followed by either attribute specifications, ">" or "/>".
[2012-04-03 23:10:31 - KR Radio app] Error in an XML file: aborting build.
I also had the same issue, there was previous error logs under Problems so I deleted those logs sorted the issue