ライブラリ プロジェクトを使用して、同じコード ベースから派生した 2 つの異なる Android アプリを構築しようとしています。
アプリはさまざまな操作にインテント サービスを使用していますが、同じコード ベースを使用する 2 つのアプリを同時にインストールすると失敗するようです。
インストールしたアプリの最初のバージョンのみが機能するようで、2 番目のバージョンではサービスが実行されないようです。
誰もこれを経験したことがありますか?これはどのように解決できますか?
編集:これらはマニフェストです
ベース:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.codebase"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<supports-screens android:largeScreens="true" android:anyDensity="true" android:resizeable="true" android:smallScreens="true" android:normalScreens="true"></supports-screens>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<application android:icon="@drawable/icon_launcher" android:label="CodeBase" android:process="@string/app_name" android:name="com.codebase.activity.Application" android:theme="@android:style/Theme.NoTitleBar" android:debuggable="false">
<activity android:configChanges="orientation" android:name="com.codenase.activity.MainActivity" android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name="com.codebase.service.UpdateService" android:process="@string/app_name">
<intent-filter>
<action
android:name="com.codebase.service.UpdateService" />
</intent-filter>
</service>
</manifest>
ターゲット 1:
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="10" />
<supports-screens android:largeScreens="true" android:anyDensity="true" android:resizeable="true" android:smallScreens="true" android:normalScreens="true"></supports-screens>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<application android:icon="@drawable/icon_launcher" android:label="Target One" android:name="com.codebase.activity.Application" android:theme="@android:style/Theme.NoTitleBar">
<activity android:configChanges="orientation" android:name="com.codebase.activity.MainActivity" android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name="com.codebase.service.UpdateService" android:process="@string/app_name">
<intent-filter>
<action
android:name="com.codebase.service.UpdateService" />
</intent-filter>
</service>
</activity>
</application>
</manifest>
ターゲット 2:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.trg2"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="10" />
<supports-screens android:largeScreens="true" android:anyDensity="true" android:resizeable="true" android:smallScreens="true" android:normalScreens="true"></supports-screens>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<application android:icon="@drawable/icon_launcher" android:label="Target 2" android:name="com.codebase.activity.Application" android:theme="@android:style/Theme.NoTitleBar">
<activity android:configChanges="orientation" android:name="com.codebase.activity.MainActivity" android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name="com.codebase.service.UpdateService">
<intent-filter>
<action
android:name="com.codebase.service.UpdateService" />
</intent-filter>
</service>
</application>
</manifest>