我目前有一个我已经构建的Android应用程序,我的公司计划实现它的几个不同的迭代 - 基本上是相同的应用程序,但具有修改的资源。因此,我没有创建完全独立的项目,而是将核心项目用作库,并为变体子应用程序创建了几个shell项目。在这里,我感到很困惑。当我启动我的子应用程序时,Eclipse会将库版本和子版本加载到设备上,这两者都是完全正常运行的应用程序。
这是图书馆的清单:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.alot.rssviewer"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="@drawable/launcher_96x96"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.alot.rssviewer.activities.AlotRSSMainActivity"
android:label="@string/app_name" >
<meta-data
android:name="android.app.default_searchable"
android:value="com.alot.rssviewer.activities.AlotRSSSearchResultsActivity" />
</activity>
<!-- Search results activity -->
<activity
android:name="com.alot.rssviewer.activities.AlotRSSSearchResultsActivity"
android:parentActivityName="com.alot.rssviewer.activities.AlotRSSMainActivity" >
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<meta-data
android:name="android.app.searchable"
android:resource="@xml/searchable" />
</activity>
<activity
android:name="com.alot.rssviewer.activities.AlotRSSWebViewActivity"
android:label="@string/title_activity_web_view"
android:parentActivityName="com.alot.rssviewer.activities.AlotRSSMainActivity" >
</activity>
<activity
android:name="com.alot.rssviewer.activities.AlotRSSFeedSettingsActivity"
android:parentActivityName="com.alot.rssviewer.activities.AlotRSSMainActivity" >
</activity>
<activity android:name="com.mopub.mobileads.MoPubActivity" android:configChanges="keyboardHidden|orientation"/>
<activity android:name="com.mopub.mobileads.MraidActivity" android:configChanges="keyboardHidden|orientation"/>
<activity android:name="com.mopub.mobileads.MraidBrowser" android:configChanges="keyboardHidden|orientation"/>
<activity android:name="com.mopub.mobileads.MraidVideoPlayerActivity" android:configChanges="keyboardHidden|orientation"/>
<receiver android:name="com.track.conversion.TrackingReceiver" android:exported="true" >
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
</application>
这是我孩子项目的清单:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.alot.rssviewer.worldnews"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="@drawable/launcher_96x96"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.alot.rssviewer.activities.AlotRSSMainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data
android:name="android.app.default_searchable"
android:value="com.alot.rssviewer.activities.AlotRSSSearchResultsActivity" />
</activity>
<!-- Search results activity -->
<activity
android:name="com.alot.rssviewer.activities.AlotRSSSearchResultsActivity"
android:parentActivityName="com.alot.rssviewer.activities.AlotRSSMainActivity" >
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<meta-data
android:name="android.app.searchable"
android:resource="@xml/searchable" />
</activity>
<activity
android:name="com.alot.rssviewer.activities.AlotRSSWebViewActivity"
android:label="@string/title_activity_web_view"
android:parentActivityName="com.alot.rssviewer.activities.AlotRSSMainActivity" >
</activity>
<activity
android:name="com.alot.rssviewer.activities.AlotRSSFeedSettingsActivity"
android:parentActivityName="com.alot.rssviewer.activities.AlotRSSMainActivity" >
</activity>
<activity android:name="com.mopub.mobileads.MoPubActivity" android:configChanges="keyboardHidden|orientation"/>
<activity android:name="com.mopub.mobileads.MraidActivity" android:configChanges="keyboardHidden|orientation"/>
<activity android:name="com.mopub.mobileads.MraidBrowser" android:configChanges="keyboardHidden|orientation"/>
<activity android:name="com.mopub.mobileads.MraidVideoPlayerActivity" android:configChanges="keyboardHidden|orientation"/>
<receiver android:name="com.track.conversion.TrackingReceiver" android:exported="true" >
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
</application>
</manifest>
我真的很困惑我做错了什么。我已经知道你应该让所有的依赖项同时在两个应用程序中同步,而且我还确保我只有一个活动只有Launcher意图,但我只是有点不知所措
谢谢大家的帮助。
答案 0 :(得分:0)
您是否尝试过从Lib清单中移除更多或更少的东西?您不需要lib中的权限或活动声明。