根據許多Android lib模塊,我們有多個項目。 爲避免應用程序清單中出現重複的xml標記,我們將相關的接收者,服務和活動放入其各自的模塊中。Android構建不會合並庫中的清單
直到今天,我們使用:
- Android的工作室:2.2.1
- gradle這個:2.1.3
- buildToolsVersion:23.0.3
今天,我們已經更新到:
- Android Studio:2.3
- gradle這個:2.3.0
- buildToolsVersion:25.0.0
直到此更新,一切工作得很好,艙單合併,我們有衝突,我們解決它們。至於我們所做的更新,清單將不會合並!
---更新1 ---
我們使用的合併清單視圖,並認爲這只是不包括在合併的體現,唯一它從清單中的模塊合併是權限,例如,如果我向模塊清單添加新權限,它只會合併它,而不是其他元素!
我保證有很多東西合併!
---更新2 ---
似乎一切外應用程序標記其合併到主清單,並在應用程序標記一切,事實並非如此。
---更新3 ---
模塊不合並:
搖籃:
apply plugin: 'com.android.library'
android {
compileSdkVersion 23
buildToolsVersion '25.0.0'
defaultConfig {
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
jniDebuggable true
}
}
}
dependencies {
compile project(path: ':android-infra')
compile 'com.google.android.gms:play-services-gcm:9.0.0'
compile project(path: ':engine-core-server')
compile project(path: ':engine-core-aneeda')
}
清單:
<manifest package="com.sensiya.voip.managers.gcm"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="com.google.android.c2dm.permission.KAKI"/>
<application
tools:node="replace">
<service
android:enabled="true"
android:name="com.sensiya.voip.managers.gcm.GcmIntentService"/>
<receiver android:name="com.sensiya.voip.managers.gcm.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE"/>
<category android:name="com.iamplus.onenumber.device"/>
</intent-filter>
</receiver>
</application>
</manifest>
模塊,它將合併:
搖籃:
apply plugin: 'com.android.library'
android {
compileSdkVersion 23
buildToolsVersion '25.0.0'
defaultConfig {
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
jniDebuggable true
}
}
}
dependencies {
compile project(path: ':android-infra')
compile 'com.sensiya:sense-services-client:[email protected]'
compile project(path: ':engine-core-server')
compile project(path: ':engine-core-aneeda')
}
清單:
<manifest package="com.iamplus.android.senseServices"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application
tools:node="replace">
<service
android:name="com.iamplus.senseServices.ContextualEventService"
android:enabled="true"/>
<service
android:name="com.iamplus.senseServices.Serv"
android:enabled="true"/>
<service
android:name="com.iamplus.senseServices.Serv1"
android:enabled="true"/>
</application>
</manifest>
有什麼建議?
控制檯中沒有日誌?沒有錯誤? – azizbekian
Asolutly什麼都沒有... – TacB0sS
你可以分享你的應用程序gradle文件。 –