Eclipse showing No launcher Activity found - android

This is my android Manifest.xml.
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="uk.co.halfninja.wallpaper.parallax">
<uses-sdk android:minSdkVersion="7" />
<uses-feature android:name="android.software.live_wallpaper" />
<application
android:label="#string/app_name"
android:icon="#drawable/icon">
<service
android:label="#string/app_name"
android:name=".ParallaxWallpaper"
android:permission="android.permission.BIND_WALLPAPER">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="android.service.wallpaper" android:resource="#xml/wallpaper" />
</service>
<activity
android:label="#string/wallpaper_settings"
android:name=".ParallaxWallpaperSettings"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:exported="true">
</activity>
</application>
</manifest>
Still Eclipse showing the result
ParallaxWallpaper] No Launcher activity found!
ParallaxWallpaper] The launch will only sync the application package on the device!
ParallaxWallpaper] Performing sync
ParallaxWallpaper] Automatic Target Mode: Unable to detect device compatibility. Please select a target device.
Please let me Know where am i doing the mistake, and what would be the solution...???

Move the intent-filter tag from service to activity

These lines should be in Activity tag
<application
android:label="#string/app_name"
android:icon="#drawable/icon">
<activity
android:label="#string/wallpaper_settings"
android:name=".ParallaxWallpaperSettings"
android:theme="#android:style/Theme.Black.NoTitleBar" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service
android:label="#string/app_name"
android:name=".ParallaxWallpaper"
android:permission="android.permission.BIND_WALLPAPER">
</service>
<meta-data android:name="android.service.wallpaper" android:resource="#xml/wallpaper" />
</application>

make activity as launcher you have made service as launcher. like that
<activity
android:label="#string/wallpaper_settings"
android:name=".ParallaxWallpaperSettings"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

Related

My application icon doesn't appear when I debug or Run 'app' on android studio, what happened?

My application icon no longer appears on my android phone screen when I debug like it used to. I know this has something to do with the androidmanifest.xml file. I've looked up several solutions for me but those solutions resulted in my application being unable to even run in the first place.
What could be the problem here?
I have tried the solutions mentioned here:
Android Studio: App icon doesn't appear in the home screen or app list
Launcher icon missing in Android
This is my android manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="sg.edu.singaporetech.teamproject">
<uses-permission android:name="android.permission.INTERNET" /> <!-- allow usage of camera for Android -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/> <!-- to run foreground service for steps -->
<uses-feature
android:name="android.hardware.camera"
android:required="true" />
<application
android:name=".StepsNotification"
android:allowBackup="true"
android:icon="#drawable/exersize"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/Theme.AppCompat.Light.NoActionBar">
<activity android:name=".DispatchActivity">
<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.VIEW" />
</intent-filter>
</activity>
<activity android:name=".profile.editProfile"
android:screenOrientation="portrait"
android:configChanges="orientation|keyboardHidden" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:theme="#style/AppTheme.NoActionBar"
android:screenOrientation="portrait"
android:configChanges="orientation|keyboardHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".registration.RegisterActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".home.HomeActivity">
<!--<intent-filter>-->
<!--<action android:name="android.intent.action.MAIN" />-->
<!--<category android:name="android.intent.category.LAUNCHER" />-->
<!--</intent-filter>-->
</activity>
<receiver android:name=".StepsBroadcastReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
</intent-filter>
</receiver>
<service android:name=".StepsService"/>
</application>
</manifest>
I think the problem is in the line,
android:icon="#drawable/exersize"
In the application tag, app icon must he placed in the mipmap folder as it meant for the app icon only. Mipmap must have all scales of the icon.

android permission issue : apk not being accepted

I am submitting a new version of my app. But the developer console doesn't allow me to do so. It says that my app is not compliant with the new policies for the permission (ask for permission at runtime).
But as I can see, I don't use any dangerous permission...
My app is using the following permissions (according to the developer console) :
android.permission.ACCESS_NETWORK_STATE, android.permission.ACCESS_WIFI_STATE, android.permission.INTERNET, android.permission.WAKE_LOCK
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="fr.mehfile">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE" tools:node="remove"/>
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" tools:node="remove"/>
<!-- Keeps the processor from sleeping when a message is received. -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:name=".ApplicationMz">
<activity
android:name=".view.SplashScreen"
android:configChanges="keyboardHidden"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".view.Accueil"
android:configChanges="keyboardHidden"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".view.Programs"
android:configChanges="keyboardHidden"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
</activity>
<activity
android:name=".view.Infos"
android:configChanges="keyboardHidden"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".view.NousContacter"
android:configChanges="keyboardHidden"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".view.ProgramDetail"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".view.NewsList"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".view.News"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".view.TimeTable"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".view.TimeTableTab"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<service android:name="fr.mehfile.MyFirebaseMessagingService"
android:permission="">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
</application>
</manifest>
Thanks in advance for your help.
To find where permissions might be originating, you can look at the merged manifest file using Android Studio. Open your manifest file in Android Studio and the click the "Merged" tab at the bottom of the editor. Here is a picture for context:

Error running wear default device not found

I've created an android application and am now getting an "Error running wear, default device not found" error message. I can't think of anything I have done or changed that has made this start.
I have closed Android studio and re opened it
I've invalidated the caches and restarted
I've run a lint check
Looked at this question Android Studio cannot find default activity
Still no joy however.
My manifest is below
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.james.testing">
<uses-feature android:name="android.hardware.type.watch" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#android:style/Theme.DeviceDefault">
<activity
android:name=".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>
<activity
android:name=".ScrollingActivity"
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=".SimpleGridActivity"
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=".Drinks"
android:label="#string/app_name"
android:theme="#style/Theme.AppCompat.DayNight.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Food"
android:label="#string/app_name"
android:theme="#style/Theme.AppCompat.DayNight.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Fitness"
android:label="#string/app_name"
android:theme="#style/Theme.AppCompat.DayNight.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</>
</manifest>
Try changing the theme to something basic for now and see if it works.

No launcher in manifest?

I have 2 activity, I want to run one first. If I run this code, Console will write this: No Launcher activity found!, but i declared LAUNCHER in manifest?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.manif"
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=".splash"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.example.manif.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> //<--here is a problem, i think
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.example.manif.SECOND_CLASS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
Change the action name to :
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
try to replace this
<intent-filter>
<action android:name="com.example.manif.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
with this
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Don't use intent filter and other thing second time-
<activity
android:name=".MainActivity"
android:label="#string/app_name" />
This code is enough for second activity.
just remove tag:
<action android:name="com.example.manif.SECOND_CLASS" />

Program with widget

I want to develop a application with widget. Now i only can find the applicaion in widget but cannot find the application in "all programs"
Thank you
my AndroidMainfest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="test.testing_v1_0" android:versionCode="1"
android:versionName="1.0">
<application android:icon="#drawable/icon" android:label="#string/app_name">
<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>
<receiver android:name=".testing123" android:label="#string/app_name">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data android:resource="#xml/widget_provider_full"
android:name="android.appwidget.provider">
</meta-data>
</receiver>
<service android:name=".testing123$UpdateService" />
<activity android:name=".MyActivity">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
<meta-data android:resource="#xml/widget_provider_full" android:name="android.appwidget.provider">
</meta-data>
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="7" />
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>
</manifest>
Ok you must have inside your Manifest.xml
<application android:icon="#drawable/icon" android:label="#string/app_name">
<activity android:name=".GrupoReformaNews"
android:label="#string/app_name"
android:screenOrientation="portrait">
this in intent filter for your application
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
this in intent filter for your Widget
<receiver android:name="GR_Widget">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data android:name="android.appwidget.provider"
android:resource="#xml/imageswidget_info" />
</receiver>
...
...
...
</application>
if you still having problems, post your manifest.xml

Categories

Resources