ServiceNotDeclaredException: The BeaconService is not properly declared in AndroidManifest.xml - android

I get the following error when i run a Unit Test in my Android project (I don't get the error while building the app and running it on a device):
The BeaconService is not properly declared in AndroidManifest.xml. If using Eclipse, please verify that your project.properties has manifestmerger.enabled=true
org.altbeacon.beacon.BeaconManager$ServiceNotDeclaredException: The BeaconService is not properly declared in AndroidManifest.xml. If using Eclipse, please verify that your project.properties has manifestmerger.enabled=true
Android Studio automatically merges the AndroidManifest.xml from the Android Beacon Library into my own AndroidManifest.xml, which makes it unnecessary to declare the Beacon Services in my AndroidManifest.xml.
This is my current AndroidManifest.xml (located in my /src/main/ folder, I don't have one in my /src/test/ folder):
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.xxx.xxx">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<permission
android:name="com.xxx.xxx.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="com.xxx.xxx.permission.C2D_MESSAGE" />
<application
android:name=".xxxApplication"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="#string/app_name"
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=".LoginActivity"
android:label="#string/title_activity_login" />
<receiver
android:name="org.jboss.aerogear.android.unifiedpush.gcm.AeroGearGCMMessageReceiver"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.xxx.xxx.android.test.xxxApp" />
</intent-filter>
<meta-data
android:name="DEFAULT_MESSAGE_HANDLER_KEY"
android:value="com.xxx.xxx.push.AGMessageListener" />
</receiver>
</application>
</manifest>
I already looked in my manifest-merger-release-report.txt inside my build folder (app/build/outputs/apk/manifest-merger-release-report.txt), but couldn't find any problems.
This is the part which contains the Android Beacon Library:
uses-permission#android.permission.BLUETOOTH
ADDED from org.altbeacon:android-beacon-library:2.1.3:11:5
android:name
ADDED from org.altbeacon:android-beacon-library:2.1.3:11:22
uses-permission#android.permission.BLUETOOTH_ADMIN
ADDED from org.altbeacon:android-beacon-library:2.1.3:12:5
android:name
ADDED from org.altbeacon:android-beacon-library:2.1.3:12:22
uses-permission#android.permission.RECEIVE_BOOT_COMPLETED
ADDED from org.altbeacon:android-beacon-library:2.1.3:13:5
android:name
ADDED from org.altbeacon:android-beacon-library:2.1.3:13:22
receiver#org.altbeacon.beacon.startup.StartupBroadcastReceiver
ADDED from org.altbeacon:android-beacon-library:2.1.3:16:9
android:name
ADDED from org.altbeacon:android-beacon-library:2.1.3:16:19
intent-filter#android.intent.action.ACTION_POWER_CONNECTED+android.intent.action.ACTION_POWER_DISCONNECTED+android.intent.action.BOOT_COMPLETED
ADDED from org.altbeacon:android-beacon-library:2.1.3:17:13
action#android.intent.action.BOOT_COMPLETED
ADDED from org.altbeacon:android-beacon-library:2.1.3:18:17
android:name
ADDED from org.altbeacon:android-beacon-library:2.1.3:18:25
action#android.intent.action.ACTION_POWER_CONNECTED
ADDED from org.altbeacon:android-beacon-library:2.1.3:19:17
android:name
ADDED from org.altbeacon:android-beacon-library:2.1.3:19:25
action#android.intent.action.ACTION_POWER_DISCONNECTED
ADDED from org.altbeacon:android-beacon-library:2.1.3:20:17
android:name
ADDED from org.altbeacon:android-beacon-library:2.1.3:20:25
service#org.altbeacon.beacon.service.BeaconService
ADDED from org.altbeacon:android-beacon-library:2.1.3:24:9
android:enabled
ADDED from org.altbeacon:android-beacon-library:2.1.3:26:13
android:label
ADDED from org.altbeacon:android-beacon-library:2.1.3:29:13
android:exported
ADDED from org.altbeacon:android-beacon-library:2.1.3:27:13
android:isolatedProcess
ADDED from org.altbeacon:android-beacon-library:2.1.3:28:13
android:name
ADDED from org.altbeacon:android-beacon-library:2.1.3:25:13
service#org.altbeacon.beacon.BeaconIntentProcessor
ADDED from org.altbeacon:android-beacon-library:2.1.3:30:9
android:enabled
ADDED from org.altbeacon:android-beacon-library:2.1.3:32:13
android:exported
ADDED from org.altbeacon:android-beacon-library:2.1.3:33:13
android:name
ADDED from org.altbeacon:android-beacon-library:2.1.3:31:13
Any idea what could cause this issue?

When using Robolectric tests with the Android Beacon Library, simply add this line to the top of your test:
BeaconManager.setsManifestCheckingDisabled(true);
This will disable the checking for the proper manifest entries when creating an instance of the BeaconManager. This is necessary, because Robolectric does not give you access to a real AndroidManifest when tests are run. I had encountered the same problem myself when building Robolectric tests inside the library itself. You can see an example of this here:
https://github.com/AltBeacon/android-beacon-library/blob/master/src/test/java/org/altbeacon/beacon/service/scanner/ScanFilterUtilsTest.java#L44

Related

INSTALL_PARSE_FAILED_MANIFEST_MALFORMED adb ERROR while running an app in Flutter

I am trying to launch an app on my Emulator (Android 12, API 31). I am receiving the following error which prevents the app from launching:
**adb: failed to install /Users/mac/Flutter_Projects/aatawala-app/build/app/outputs/flutter-apk/app.apk: Failure
[INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl506413608.tmp/base.apk (at
Binary XML file line #93): io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService: Targeting S+ (version 31
and above) requires that an explicit value for android:exported be defined when intent filters are present]
Error launching application on sdk gphone64 x86 64.**
I have added the following lines in my AndroidManifest.xml file, within both the and
android:exported="true"
AndroidManifest.xml Code:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="me.attawala.customer">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:name=".Application"
android:label="Mobile Chakki"
android:icon="#mipmap/ic_launcher"
android:requestLegacyExternalStorage="true">
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyC1aOrNPeOgQO822khXy3yT1Gvxg0RJVmM"/>
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="#style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<intent-filter android:exported="true">
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter android:exported="true">
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
I would like to know what exactly is causing this error and how to solve it.
It should be like
<activity
android:name="ActivityName"
android:exported="false"/>
or
check attached screenshots(check line number 14 for more details).

App database is not deleted on app uninstall Flutter

In my app I just realized that on Android Sembast db is not deleted when I uninstall the app, on iOS it does get deleted.
Looking at other answers here I saw that in order to prevent Android backup there is the flag android:allowBackup="false" to be set in AndroidManifest.xml. So I did for the Manifest in android/main/app. Nothing changed. Upon app uninstall and reinstall db is still there.
As my phone uses Android 7.0 API 24 I guess this flag will have affect on next installs, but I'll have to remove db manually. this time.
Did I add this flag correctly?
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.vinny.fixit_cloud_biking">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
android:name="io.flutter.app.FlutterApplication"
android:label="fixit"
android:icon="#mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="#style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize"
android:allowBackup="false">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" />
<receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
</intent-filter>
</receiver>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
I tried to look for the db folder in the phone directory Android/data/com.vinny.fixit_cloud_biking/files but there is only a Pictures folder. Where do I get to delete the old db? this is the path declared in the singleton final dbPath = join(appDocumentDir.path, 'device.db');
Try to add android:allowBackup="false" at the <application> level not the <activity> level
<application
android:name="io.flutter.app.FlutterApplication"
android:allowBackup="false"
try this
add this on the manifest tag
xmlns:tools="http://schemas.android.com/tools"<br>
tools:replace="allowBackup"<br>
android:allowBackup="false"<br>
<?xml version='1.0' encoding='utf-8'?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:replace="allowBackup"
android:allowBackup="false"/>
Also can add
android:allowBackup="false" (on application tag)

Error parsing the package

This error keeps comes on my phone but it did not come before,I saw all the stack overflow methods but non of them could help me.
I get this error when I test the app from android studio to my phone.I tried on other phones too but still the problem exist.
This is my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="my.patel.pritesh.smstimer">
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:icon="#drawable/sms_timer"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name=".Time_Picker"
android:theme="#style/AppTheme.NoActionBar" />
<receiver
android:name=".MyReceiver"
android:enabled="true"
android:excludeFromRecents="true"
android:exported="true"
android:process="remote"
android:taskAffinity="">
<intent-filter>
<action android:name="SEND" />
</intent-filter>
</receiver>
<receiver
android:name=".NotificationReciever"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="notification" />
</intent-filter>
</receiver>
<receiver
android:name=".deliveryReciever"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="notification_delivered" />
</intent-filter>
</receiver>
<activity android:name=".sms_list">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".sms_review" />
<service
android:name=".alarmService"
android:enabled="true"
android:exported="true"></service>
</application>
</manifest>
This error comes in the run tab:
Unexpected error while executing: am start -n "my.patel.pritesh.smstimer/my.patel.pritesh.smstimer.sms_list" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Error while Launching activity
Main tag of manifest file must be manifest. Instead of xml tag, write something like:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.dummy"
android:versionCode="100"
android:versionName="1.0.0" >
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:icon="#drawable/sms_timer"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
...
</application>
</manifest>
As you are using Android Studio, I believe that you are likely have the problem mentioned in this question, and as mentioned here in the answer this error happens when you change the build version for your project (like downgrading or upgrading):
I've been working on this same exact problem for the last 8
hours...you've had no issues after rolling back from 2.0 to 1.5.1?
I've noticed that, even with the error, running the app works fine
sometimes.
so you have to make sure that there is no problem with the new release you are using, then you have to clean and rebuild your project again like mentioned here.
Or you can use the following hint from this answer:
Remove the .idea folder and gradle folder, then click button sync
project with gradle gradle files, after this process finished, you are
able to run your app as normal.

Android Manifest: no default activity?

From an open source project I got this manifest file
<?xml version="1.0" encoding="utf-8"?>
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="20" />
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
<application
android:allowBackup="true"
android:icon="#drawable/icon"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<service
android:name="org.gege.caldavsyncadapter.syncadapter.SyncService"
android:exported="true">
<intent-filter>
<action android:name="android.content.SyncAdapter" />
</intent-filter>
<meta-data
android:name="android.content.SyncAdapter"
android:resource="#xml/syncadapter" />
</service>
<service
android:name="org.gege.caldavsyncadapter.authenticator.AuthenticationService"
android:exported="true">
<intent-filter>
<action android:name="android.accounts.AccountAuthenticator" />
</intent-filter>
<meta-data
android:name="android.accounts.AccountAuthenticator"
android:resource="#xml/authenticator" />
</service>
<activity
android:name="org.gege.caldavsyncadapter.authenticator.AuthenticatorActivity"
android:label="#string/title_activity_authenticator"
android:windowSoftInputMode="adjustResize|stateVisible"/>
</application>
I am a bit puzzled about that manifest. It has two services and one activity. The activity is not marked as default activity. When I run the project on my phone it doesn't show any icon to start the app neither does the app start automatically.
Does a manifest like this make sense? What does the Android OS based on such a manifest?
Does a manifest like this make sense?
Yes, since it declares a sync adapter an an authenticator.
Generally, such manifests would also make sense in a library project. The app project that uses the library then provides the main launcher activity. The build process merges manifest files together so you get one manifest per APK.
What does the Android OS based on such a manifest?
As such, it has the entry points such as an activity and two services declared. Generally you invoke these entry points via an Intent. The services are declared as a sync adapter and an authenticator, so they can be invoked by the framework. The activity is probably invoked by the authenticator service for UI purposes.
Because there's no main launcher activity, no menu icon is visible.

Running app gives 2 app icons in Android Studio

I am running an app in Android Studio and it gives 2 app icons in Androi Studio.
Also, I have moved from Eclipse to Android Studio and now I'm having trouble with how to make the color of logcat same as in Eclipse.
My question is that there are 2 app icons when I run the app, and when I uninstall it, 2 of them have been removed. Is that normal in Android Studio?
I have found that Android Studio can copy keys from Eclipse.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mytrack.ph"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<!-- Google Map v.2 permissions -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<!-- GCM permissions -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:name="com.example.gcm.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.gcm.permission.C2D_MESSAGE" />
<!-- Writing Persmission -->
<uses-permission android:name="android.permission.WRITE_USER_DICTIONARY" />
<uses-permission android:name="android.permission.WRITE_PROFILE" />
<uses-permission android:name="android.permission.READ_CONTACTS"/>
<uses-permission android:name="android.permission.READ_PROFILE"/>
<uses-permission android:name="android.permission.READ_CONTACT"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity android:name="com.mytrack.ph.SplashActivity"
android:label="#string/app_name"
android:noHistory="true"
android:screenOrientation="portrait"
android:theme="#style/splashScreenTheme" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.mytrack.ph.LoginActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
>
</activity>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="#string/google_map_api_key"/>
<activity android:name="com.facebook.LoginActivity"
android:theme="#android:style/Theme.Translucent.NoTitleBar"
android:label="#string/app_name" />
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/app_id"/>
<service android:name="com.my.track.service.MyTrackService"></service>
<receiver
android:name="com.my.track.service.MyTrackGcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.my.track.service" />
</intent-filter>
</receiver>
<service android:name="com.my.track.service.MyTrackGcmIntentService" />
<activity android:name="NavigationMenuActivity"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="portrait"
android:launchMode="singleTop"
android:permission="com.google.android.c2dm.permission.SEND" >
></activity>
<receiver android:name="com.my.track.results.ConnectionChangeReceiver" >
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
</intent-filter>
</receiver>
</application>
</manifest>
I though this is normal in android studio. Running an app gives 2 launcher icons.
PS:
my AndroidManifest.xml is inside main folder and I used eclipse to export to gradle build.
Im using Android Studio 0.8.6
thanks.
I got it! yes at last , i have to study gradles and stuff.
Actually I have 2 android projects inside the Project, one is a library and the other one is the main app.
I found out that when i imported those projects Android Studio (I exported the lib to gradle build from eclipse) doesn't care if that is a lib project or a main project. (Correct me if im wrong ).
so the only thing to make it work is to remove the intent-filter of that lib-android-project.
EDIT:
#all
solved it ! thanks to everyone, I never knew there was another AndroidManifest.xml , i thought eclipse removed it. and i thought Exporting it to gradle will remove it because it is checked as a library.
thanks for all your help.
The <intent-filter> that affects creating multiple launcher icon is the following one:
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
Android Studio's manifest merger will always combine <intent-filter>s in library projects into main project's manifest. You may end up having multiple LAUNCHER intents in your synthesized manifest, thus having multiple launcher icons. To avoid this, simply remove the LAUNCHER intents from the library projects' manifest.
You declare two intent filter, used only one Intent filter in the activity, on AndroidManifest.
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
If you used two or more intent filter in AndroidManifest, then you will have two app icon, So remove it & set one intent filter.
I hove this is usedful to you.
i agree, since i made 2 activity(one for splash, one for main). In manifest i forgot to delete
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
so in the end when i install app, i will have 2 app.
There is most likely an imported Library project that has this intent filter.
1. Open your app manifest
2. At the bottom left click on "Merged Manifest"
3. Search and find which library project has the attribute
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
4. Remove it and ensure that now the filter is only on your App's <Application >class activity.
In my case, it was just because, in the manifest file, two activities were declared as launcher. Actually, I clicked on the launcher checkbox while making new activity, thinking it will transfer the launcher tag from the previous activity to this, but it created both activities as launchers.
When running android and doing debug, there is an another AndroidManifest.xml under src/debug. Make sure this manifest file matches the main one under src/main.
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name=".MainActivity">
<!You need to delete launcher intent filter from every other activity ->
</activity>
The "android.intent.category.LAUNCHER" intent filter decides which activity will launch when you tap on the application icon. If there are more than 1 entries, OS will create more than one app icon after installation. You need to make sure that there is a single entry of above intent filter in the Manifest file.

Categories

Resources