no launcher activity found smartatch - android

I'm trying to run sample for Sony site.
I attached SmartExtensionAPI and SmartExtensionUtils. I used Properties->Android->Library and checked is library.
When I ran a sample (for example HelloWidget) on Eclipse, I get this error on the console:
HelloWidget] No Launcher activity found!
HelloWidget] The launch will only sync the application package on the device!
But the installation is done... I can see the application is installed on my smartphone and I can see too on SmartConnect but not in the smartwatch.
Does anyone have an idea of what I'm doing wrong ?
EDIT:
AndroidManifest.xml
<activity android:name="com.example.sonymobile.smartextension.hellowidget.HelloWidgetPreferenceActivity"
android:label="#string/preference_activity_title" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

This is because no activity had set as a launcher to run when app is launched
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
no intent filter will be there in the code's manifest, just check it.

Related

Android App not installed with USB debug

I have a problem when I try to debug the App on my Phone. The App works, but It is not installed on the device. When I created the project I selected a project without Activity (option: "Add No Activity"). If I create an App with a blank Activity, this is installed when I launch the debug. I'm using Android Studio for the project.
What can I do? Thanks!
Because you have to Specify Your App's Launcher Activity. You should put this line into your manifest in actvity tag like this, For more reference check this link Specify Your App's Launcher Activity
<activity
android:name=".DemoActivity"
android:label="#string/app_name"
android:windowSoftInputMode="adjustResize|stateVisible" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.categor.LAUNCHER" />
</intent-filter>
</activity>
Problem solved!
Android Studio is stupid, it adviced me to write this in capital letters
<action android:name="ANDROID.INTENT.ACTION.MAIN" />
<category android:name="ANDROID.INTENT.CATEGORY.LAUNCHER" />
instead
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />

Problems when running or debugging application

Normally when I run or debugg my application, it unistalls the old version, installs new version and finally it runs the new application, same process when I debug. Some days ago my eclipse started to work in a different way, it installs my application but it does not get ran. Before intalling I get this LogCat:
No Launcher activity found!
The launch will only sync the application package on the device!
Here my Manifest:
<activity
android:name="com.company.app.activities.WelcomeActivity"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Can anybody help me with this? If I want to run the applications it's not a problem because I just have to do it manually but I can not debug.
Remove the follwing line from your manifest and try ,
<action android:name="android.intent.action.VIEW" />

Can't launch Android App in my device

I'm trying to run App that has a search in its action bar and also it shares in twitter. When I run my App, I got this message in console
Application already deployed. No need to reinstall.
\Healthy_Tips2\bin\Healthy_Tips2.apk installed on device
Done!
But I can't find my App with Apps menu in the device and the App is not launching..
The following is the code of my start activity manifest.xml
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.SEARCH" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="com.emy.healthytips.MainActivity"
android:scheme="oauth" />
</intent-filter>
<meta-data android:name="android.app.searchable"
android:resource="#xml/searchable"/>
<!-- enable the base activity to send searches to itself -->
<meta-data
android:name="android.app.default_searchable"
android:value=".MainActivity" />
</activity>
Aside from uninstalling the previous app through adb like the others have already mentioned.
In your manifest, you should increment your versionCode="1" by 1 more and break down your intent filter into two. This will still work. An activity can have more than one intent-filter.
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="com.emy.healthytips.MainActivity"
android:scheme="oauth" />
</intent-filter>
Go to Project -> clean -> run your project.
this will rebuild your project.
Then run your project again. Usually works. Or else are you sure you are not trying to run a library Project??
Use adb to uninstall your application:
adb uninstall package_name
See link:
http://adbshell.com/commands/adb-uninstall/how-to-use-adb-uninstall.html
Edit: Go to sdk/platformtools under command line tool. And write this line:
adb uninstall <package_name>
Make any change to your app. add a comment or so, or uninstall your app then deploy again.
I personally always have the same problem, when I'm trying to install an apk via phone, although it's already installed via PC. For me it works to simply deinstall the final app and try once more to install the apk.
I get this error when I try running my app without making changes when the app is already open.
Try closing/restarting your emulator/phone and reopening it.
Also try making a change to the app, then deleting it and save it (type "A" anywhere in the code then remove it).
Then try cleaning your project: project > clean
If that doesn't work, try uninstalling the app after trying above methods and try again. This should work.

No Launcher activity found, The launch will only sync the application package on the device

I got this warning from console when running my application on emulator
No Launcher activity found!
The launch will only sync the application package on the device!
In fact i have declared an activity as the main launcer in AndroidManifest.xml file
<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>
I don't need any other intent-filter to use on that activity.. just basic main and launcher
What's the reason? Please give me a solution..
If the launcher activity is in another package, you will need to specify that as well.
For instance, from one of my personal projects:
<activity
android:name=".activities.MainScreen"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
The MainScreen.java is in the activities package. Also, check spelling for upper or lower case letters.
It seems that you must have "android.intent.action.MAIN" specified immediately before "android.intent.category.LAUNCHER". I encountered the same issue as you when I had the following:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.SEARCH" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
The issue was resolved only when I re-orderd as follows:
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
In all normal circumstances, listen to what the other guy(s) said.
I was able to replicate your issue using a Mac Book Pro & Eclipse Indigo. when you create your android project, you MUST have Eclipse start you off with a templated activity (like a blank activity). if you don't, and you try to add an activity to your manifest later, Eclipse just derps and can't find the launcher. (i looked at other manifest files and i can't see any differences. i really don't think it's your poor manifest's fault in this special case.)
here's your lazy easy fix:
start a new project, and copy over all the files (make sure you back up ur files first, in case you delete something wrong or mess up the ordering)
Using Eclipse Indigo, open Run Configurations windows, click the project and use launch default activity on Android tab, choose Automatically pick compatible device...and apply.

No Launcher Activity found with .Launcher in Manifest.xml already included?

I am trying to run a source code I've found online for android. When I run it, it gives me:
No Launcher activity found!
The launch will only sync the application package on the device!
Performing sync
I already have in my Manifest.xml the following:
action android:name="android.intent.action.MAIN"
category android:name="android.intent.category.LAUNCHER"
What could be wrong? The weird thing is that it worked once. And then when I ran it again it gave me needs to force the application.
It is not a duplicate question because I've read that everyone is suggesting to place those in the Manifest.xml.
I think you need to define a launching activity. For example in my app
<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>
I have defined which activity is started on app start.
please make sur to add android:exported="true" it will be like that
<activity android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

Categories

Resources