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>`
Related
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>
I tried a lot of time running my app in my cell Samsung Galaxy S3 but always getting the same thing
[2014-04-14 20:11:14 - BridgeText] Android Launch!
[2014-04-14 20:11:14 - BridgeText] adb is running normally.
[2014-04-14 20:11:14 - BridgeText] Performing com.bridge.text.ChatNameActivity activity launch
[2014-04-14 20:11:14 - BridgeText] No active compatible AVD's or devices found. Relaunch this configuration after connecting a device or starting an AVD.
Also tried to reset adb but getting following error:
[2014-04-14 20:15:22 - DeviceMonitor] Adb connection Error:An existing connection was forcibly closed by the remote host
[2014-04-14 20:15:23 - DeviceMonitor] Connection attempts: 1
my device's usb debugging mode is enabled and my device's android version is 4.3 and I also have updated my API. However I also show my AndroidManifest file if it makes it easy to understand.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.bridge.text"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
<application
android:allowBackup="true"
android:debuggable="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.bridge.text.ChatNameActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.bridge.text.TextActivity"
android:label="#string/text_messages_title"
android:parentActivityName="com.bridge.text.ChatNameActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.bridge.text.ChatNameActivity" />
</activity>
</application>
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
Any help would be appreciated.
You may need to manually enter a value in your adb_usb.ini file. On Windows, that can be done with:
echo 0xYYYY >> "%USERPROFILE%\.android\adb_usb.ini"
where YYYY is the 4-digit Vendor ID for your device. I believe that's '04e8' for Samsung devices.
You'll need to then restart ADB with:
adb kill-server
adb start-server
adb devices
Several known Android vendor IDs are at the bottom of this page. And here's a more complete list of USB IDs.
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'm having trouble running ANY app on both an emulator and a device. Just running the simple "Hello World" app is not working. The app gets installed on the emulator but never executes. I can find it when I go Menu -> Manage Apps but the only thing I can do from there is uninstall it. It seems there is a setting that is not forcing it to run automatically.
Also, something that was weird was my computer would never let me install the new updates. It would just say "Downloading ....." but nothing ever happened. I fixed the problem by going into Safe Mode with Networking but I can still not run any app. Any ideas???
Here is what it says when I go to Run as -> Android App
[2012-08-31 08:17:52 - at] New emulator found: emulator-5554
[2012-08-31 08:17:52 - at] Waiting for HOME ('android.process.acore') to be launched... [2012-08-31 08:19:13 - at] HOME is up on device 'emulator-5554'
[2012-08-31 08:19:13 - at] Uploading at.apk onto device 'emulator-5554'
[2012-08-31 08:19:13 - at] Installing at.apk...
[2012-08-31 08:20:03 - at] Success!
[2012-08-31 08:20:03 - at] \at\bin\at.apk installed on device
[2012-08-31 08:20:03 - at] Done!
Here is my Manifest File:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="c.panic"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="parent" />
</activity>
</application>
Thanks.
You've to change your main activity's <intent-filter> tag filter in AndroidManifest.xml file.
<application android:name="......"
android:icon="#drawable/app_icon"
android:label="#string/app_name" >
<activity android:name=".yourActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Means, you've to change your activity's <action> and <category>
Edit
Just change like below in your manifest file. It will launch your application.
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="parent" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
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.