'Android Manifest - duplicate registration for Activity but it's possible to register Service twice
When I add the same Activity twice to manifest, it's reported as error:
<activity
android:name=".another.MyActivity" />
<!-- second entry marked with error -->
<activity
android:name=".another.MyActivity" />
Duplicate registration for activity .another.MyActivity
But when I add the same Service twice, there is no error, why?
<!-- no error -->
<service
android:name="just.AnotherService"
android:exported="true">
<intent-filter>
<action android:name="some.ACTION" />
</intent-filter>
</service>
<service
android:name="just.AnotherService"
android:exported="true">
<intent-filter>
<action android:name="some.ACTION" />
</intent-filter>
</service>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
