My AVD is running properly and in the process tab, there's an emulator-arm.exe so i'm pretty sure about it but when i run my program with a run configuration that says to pick up this AVD, i get the following message.
Android Launch!
[2015-02-15 00:38:50 - FirstApp] adb is running normally.
[2015-02-15 00:38:50 - FirstApp] Performing com.protyay.example.firstapp.Splash activity launch
[2015-02-15 00:38:50 - FirstApp] No active compatible AVD's or devices found. Relaunch this configuration after connecting a device or starting an AVD.
This is the Manifest.xml looks like, and as a matter of fact, i have had absolutely no problems testing this app until yesterday. A strange problem
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.protyay.example.firstapp.MAINACTIVITY" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".Splash"
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>
API level for AVD is 19
Try to this, It may be a helpful
Go To Window->Show View->Others->Device->Reset Adb
Reset your ADB process. You can do that within the DDMS Perspective (then the Devices window). T he last menu on the right (the upside down triangle - on the main 'devices' panel - the one that 'should' show your device in the list) has this option in there - it is named 'Reset ADB'.
Also, you can do this following from the command-line:
1. adb kill-server
2. adb start-server
Related
Hi I have installed Android studio correctly. I made AVD for e.q Marshmallow and project on the same platform. after press RUN, AVD turns on. I can do everything on emulated android phone(other issue- after running this my computer dramticly slowing down) but I should see my "Hello world" app, there is not there. I'm getting following error
Unexpected error while executing: am start -n "com.example.zad2/com.example.zad2.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Error while Launching activity
where zad2 is my project name.
On Stacfoverflow i saw tips to add into manifest some filter code but I already have it:
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/Theme.Zad2">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Yea don't trouble friends. I found this post: Session 'app': Error Launching activity
and I unistalled my app from AVD :)
I think my issue has something to do with the adb. I searched a lot online and tried to shut it down about 4 different ways and nothing helps. I am using a Mac. Here is what the Run tab of Android Studio says when I run my app:
06/16 16:36:06: Launching app
$ adb push /Users/melloo/Desktop/UCI/Intro-to-Mobile-App-Development-with-
Android/A2-Antoniya.Puleva/app/build/outputs/apk/app-debug.apk
/data/local/tmp/x40240.antoniya.puleva.a2
$ adb shell pm install -r "/data/local/tmp/x40240.antoniya.puleva.a2"
pkg: /data/local/tmp/x40240.antoniya.puleva.a2
Success
$ adb shell am start -n
"x40240.antoniya.puleva.a2/x40240.antoniya.puleva.a2.MainActivity" -a
android.intent.action.MAIN -c android.intent.category.LAUNCHER
Client not ready yet..Waiting for process to come online
Connected to process 2983 on device Nexus_5X_API_22 [emulator-5554]
Application terminated.
and my manifest:
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme"
android:launchMode="standard"
>
<activity android:name=".MainActivity"
android:label="List O'Names">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".NameListActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name = "x40240.antoniya.puleva.intent.action.ACTION_VIEW" />
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="text/plain"/>
</intent-filter>
</activity>
</application>
Had similar error using Android Studio 3.0 Canary 3. Try doing following things:
Update your Android Studio to the latest version (if you are using 3.0, Canary 4 just came out yesterday)
I see you are using Emulator with Lolipop (api 22), try creating new device with api 25 (Nougat)
Try doing some change in manifest (like adding empty line, the point is to just change the manifest file), then go Build->Clean project and to run it again.
I created a splash screen for my android application. In my AndroidManifest I set the SplashScreen Activity as Launcher and action as MAIN. After that I changed the HomeActivity's intentfilter.
Here is my android manifest file:
<application
android:allowBackup="true"
android:icon="#mipmap/icon"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".SplashScreenActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ActivityHome"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.ACTIVITHOME" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<receiver android:name=".Receivers.NetworkReceiver"></receiver>
</application>
I have both these activities inside the default package. Now, when I try to test the application in device, I get the following error:
Error while executing: am start -n "com.sdz.myapp/com.sdz.myapp.SplashScreenActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.sdz.myapp/.SplashScreenActivity }
Error type 3
Error: Activity class {com.sdz.myapp/com.sdz.myapp.SplashScreenActivity} does not exist.
Error while Launching activity
This is how my project structure looks like:
src
-com.sdz.myapp
----ActivityHome
----SplashScreenActivity
I restarted android studio but still the error is there. I dont know what is causing this.
I ran into this as well. I actually had to uninstall the apk from the device before it would work... which was really odd as the app wasn't showing up on my list of apps on the phone.
Here's what I did:
Opened up command line
Ran 'adb devices' to make sure my device was connected
ran 'adb uninstall ' Replace with "com.whatever.blah"
You should see a message saying it uninstall successfully
Try installing from Android Studio again and it should work
I have no idea how it gets in this weird state. :-/
Please change your android:name value at your activity tag with full name and first clean project . After that try to run your application again
<activity android:name="com.sdz.myapp.SplashScreenActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
I have this same issue occasionally. The solution was to build the APK (menu "Build > Build APK") and install it manually in the phone. After that the error disappears.
I tried all of the above plus even delete the build folder and still did not work. The solution for me was: On your Android Studio go to File->Sync Project with Gradle Files
I have installed a new setup of adb-bundle. When I run the project apk installed on device/emulator but not opens automatically. This problem is not related to coding I this it is related to eclipse setup because it happens with all projects. Please Help. Facing issue with debugging due to this problem.
Manifest.xml:
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.demo.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>
Thanks
It seems like you have a problem with the adb. Open task manager and kill the adb process and restart everything and try again. If you have made some changes to the installed adb try to install it again properly.
Check the below links also,
https://lesleyharrison.wordpress.com/2011/01/15/solution-for-android-emulator-starts-but-app-doesnt-run/
Android application doesn't start from Eclipse
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>