Unable to launch app on device - android

I am trying to run a demo project to implement widgets, it compiles successfully but did not launch, also I did not find it installed in my phone.
I am following this tutorial http://www.tutorialspoint.com/android/android_widgets.htm
A also this tutorial https://github.com/TechIsFun/android-widget-example but getting the same problem.
My console shows
[2014-11-23 11:01:30 - WidgetExample] Performing sync
[2014-11-23 11:01:30 - WidgetExample] Automatic Target Mode: Unable to detect device compatibility. Please select a target device.
[2014-11-23 11:01:34 - WidgetExample] Uploading WidgetExample.apk onto device '1C9E_9E18_MicromaxA111'
[2014-11-23 11:01:34 - WidgetExample] Installing WidgetExample.apk...
[2014-11-23 11:01:37 - WidgetExample] Success!
[2014-11-23 11:01:37 - WidgetExample] \WidgetExample\bin\WidgetExample.apk installed on device
[2014-11-23 11:01:37 - WidgetExample] Done!
I think there is some problem with the manifest file ?
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.widgetexample"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<receiver
android:name="MyWidgetProvider"
android:icon="#drawable/ic_launcher"
android:label="Example Widget" >
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="#xml/widget_info" />
</receiver>
</application>
</manifest>

Your console message shows that your apk is isntalled sccuessfully on the device. Now the question is why it is not getting launched?
To launch any application, it should have at least one activity with action as main and category as launcher.
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
In your case, your application don't have any activity assoicated with it.
I think this is the casue why its not getting launched afer sccuessful installation. also thats why its not showing your application on application list.
As your application have only one widget hence it will show it under widgets list. Please check.
Hope it helps you.

Related

Android app is not showing installed on emulator and my device

I have tried converted my android app from eclipse to android studio project and app is working on testing on emulator and my real device but I couldn't find it when trying to exit the app .. After publishing to the store I got the same issue + app is never open .. after installing I just got uninstall only on google play store .. please help :)
this is app url to the store : https://play.google.com/store/apps/details?id=com.linkedtalents.app&hl=en
Here is my manifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.linkedtalents.app"
android:versionCode="10"
android:versionName="1.1" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#drawable/launch123"
android:label="#string/app_name"
android:largeHeap="true" >
<activity
android:name="com.linkedtalents.app.Splash"
android:theme="#style/AppBaseTheme"
android:screenOrientation="portrait"
android:configChanges="locale"
>
it seems that you are missing the intent filter. at least you didnt post it. can you have a look that you have the MAIN LAUNCHER like here? you need exactly one activity that matches this, if you want to be started from a homescreen.
<activity
android:name="..."
android:label="#string/app_name"
android:theme="#style/AppTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

Android app not showing on my device. No Launcher Activity Found

I am simply following the Android Developer training guide, and I am already running into troubles on the second step.
I followed the guide (I don't even have to do anything..) and clicked on Run, selected my Galaxy S4 from the screen, and clicked okay. I get the following error
[2014-07-06 19:56:27 - MyFirstApp] Android Launch!
[2014-07-06 19:56:27 - MyFirstApp] adb is running normally.
[2014-07-06 19:56:27 - MyFirstApp] No Launcher activity found!
[2014-07-06 19:56:27 - MyFirstApp] The launch will only sync the application package on the device!
[2014-07-06 19:56:27 - MyFirstApp] Performing sync
[2014-07-06 19:56:27 - MyFirstApp] Automatic Target Mode: Unable to detect device compatibility. Please select a target device.
[2014-07-06 19:56:31 - MyFirstApp] Application already deployed. No need to reinstall.
[2014-07-06 19:56:31 - MyFirstApp] \MyFirstApp\bin\MyFirstApp.apk installed on device
[2014-07-06 19:56:31 - MyFirstApp] Done!
I honestly have no idea what I am doing wrong, as I have absolutely no experiences with android.
The only thing that is different is in the tutorial their targetSdkVersion is 19, but I am using 21
The following is my AndroidManefiest.xml
<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 forgot to declare your activity to your Manifest.xml.
Everytime you create an activity (blablabla class extends Activity) you have to declare it to your Android Manifest.xml, in order to de device be able to track your App's life cicle.
What we call Activity is a class that provide information to host a window, the class should extends Activity, all of this classes must be declared on the Manifest.xml file as below:
<application>
...
<activity
android:name="com.yourpackage.ClassName">
</activity>
</application>
Probably your activity class is called MainActivity, you just have to add this to your code, between <application> </application> tag:
<activity
android:name="com.example.myfirstapp.MainActivity"
android:label="#string/app_name"> <!-- This is the text that will appear on your action bar -->
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
The <intent-filter> tells to android that this class is the "main entrance", the first activity that need to be loaded to your app be launched, only the first activity need the <intent-filter> tag, the others just need the fist example I gave.
If you are starting with Android development, I recommend you to read about ActionBar and What to do when the device is rotated
This and this may help you in the future.
Good coding :)
Put the following intent-filter for your activity to be launched.
<activity class=".YourActivity" android:label="your activity label">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
{ action=android.app.action.MAIN } matches all of the activities that
can be used as top-level entry points into an application.
{ action=android.app.action.MAIN,
category=android.app.category.LAUNCHER } is the actual intent used by
the Launcher to populate its top-level list.
Also, please refer to Intent

Android application installs but not launches [duplicate]

This question already has answers here:
My android app is not being displayed in the app drawer?
(3 answers)
Closed 8 years ago.
Before labeling this as a duplicate, please read. I have successfully installed an Android application I developed on Eclipse on to two different platforms: one emulator (Blue Stacks) and one actual device. Like I said, the app installs just fine on both platforms, but it doesn't appear on the list of apps that can be launched. When I go to settings, I can see the app on the list of installed applications, and it lets me uninstall it, but not open it. I've spent hours trying every remedy online, but nothing works. My app is only one activity, so it should be simple, but this is the first app I've developed. I'll attach my manifest xml file below.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.teamjava.theultimatetipcalculator"
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.teamjava.theultimatetipconverter.MainActivity"
android:screenOrientation="portrait" >
</activity>
<intent-filter>
<action android:name="android.intent.action.MainActivity" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</application>
You should probably try using the same package name for the app and location of your activity.
You have:
package="com.teamjava.theultimatetipcalculator"
android:name="com.teamjava.theultimatetipconverter.MainActivity"
Try
package="com.teamjava.theultimatetipcalculator"
android:name="com.teamjava.theultimatetipcalculator.MainActivity"
or
package="com.teamjava.theultimatetipconverter"
android:name="com.teamjava.theultimatetipconverter.MainActivity"
EDIT -
Also try placing the intent filter inside the activity. This is how my manifest looks on all my apps
<activity
android:name="com.example.exampleapp.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>
Change:
<action android:name="android.intent.action.MainActivity" />
to:
<action android:name="android.intent.action.MAIN" />
Have you checked your console in Eclipse? Sometimes, your program can compile fine, but display errors in the console on startup.
In Eclipse. Window - show view - Console

Android app does not start (and is invisible!) on device

I have a strange problem with my Android app. When I start it from Netbeans, the app gets installed on my device (attached via USB). After that nothing happens. I also can't find the app anywhere on the device!! (no icon, no nothing).
Still I know the app has been installed, because under the android settings, where it says "Manage Applications" (or something) the app is now listed and I can uninstall it.
I've tried the whole procedure with a blank HelloWorld app, which worked fine. Here an icon got created o the device and the app was started correctly by NetBeans.
So I guess there is something wrong with my app causing it not to appear in the phone's launcher?
EDIT:
Here's the manifest:
<?xml version="1.0" encoding="utf-8"?>
<uses-sdk android:minSdkVersion="4" />
<application
android:icon="#drawable/icon"
android:label="#string/app_name" android:debuggable="true">
</application>
you need to add below line in your Main activity in androidmanifest file
<activity android:label="#string/app_name"
android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

application not installing on android emulator

I am running tab based application in android.When i try to install the application on the emulator it gives output in the console as
[2011-03-08 12:40:35 - TabBar] Application already deployed. No need to reinstall.
[2011-03-08 12:40:35 - TabBar] \TabBar\bin\TabBar.apk installed on device
[2011-03-08 12:40:35 - TabBar] Done!
Can anyone tell how should i pursue
Thanks in advance
Tushar
I'm also tackled with this same problem and finally I found the solution for it. When you creating a new android project using Eclipes and if you didn't create a activity for your first window, your project's Manifest also don't create proper codings for you to application launch up.
So, you should hardcode them yourself.
First check these codes are available or not in your Project's Manifest file, within your main activity tags.
**
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
**
These two code lines are very important. Because these two lines are calling to android OS to launch this app.
So, Make sure these codes are available in your project's Manifest file. If it's not this below Manifest file code will gets you rough idea to fix this problem.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mershanfernando.testingappz"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="10" />
<application android:icon="#drawable/ic_launcher" android:label="#string/app_name">
<activity android:name=".Main"
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>

Categories

Resources