Open Raghuramchowdary-tech opened 10 years ago
The problem is that you are setting a theme, but the library also has a theme set. If you look in your log you'll see this line:
Suggestion: add 'tools:replace="android:theme"' to element at AndroidManifest.xml:37:5 to override
This is saying that you need to add that metadata to your application's manifest, and it will force your theme to override the current one when the manifests are merged.
Here's an example from the Android documentation (http://tools.android.com/tech-docs/new-build-system/user-guide/manifest-merger):
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.tests.flavorlib.app"
xmlns:tools="http://schemas.android.com/tools">
<application
android:icon="@drawable/icon"
android:label="@string/app_name"
tools:replace=”icon, label”/>
</manifest>
You need to use tools:replace=android:theme
, rather than icon, label
.
I do understand that but is it for any specific reason u have got app icon for a library? On 5 Nov 2014 14:09, "curtinmartis" notifications@github.com wrote:
The problem is that you are setting a theme, but the library also has a theme set. If you look in your log you'll see this line:
Suggestion: add 'tools:replace="android:theme"' to element at AndroidManifest.xml:37:5 to override
This is saying that you need to add that metadata to your application's manifest, and it will force your theme to override the current one when the manifests are merged.
Here's an example from the Android documentation ( http://tools.android.com/tech-docs/new-build-system/user-guide/manifest-merger ):
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.tests.flavorlib.app" xmlns:tools="http://schemas.android.com/tools">
<application android:icon="@drawable/icon" android:label="@string/app_name" tools:replace=”icon, label”/>
You need to use tools:replace=android:theme, rather than icon, label.
— Reply to this email directly or view it on GitHub https://github.com/twotoasters/clusterkraf/issues/43#issuecomment-61811533 .
It likely was added by default when the library project was created, but never removed.
alright thanks.
good day On 5 Nov 2014 14:16, "curtinmartis" notifications@github.com wrote:
It likely was added by default when the library project was created, but never removed.
— Reply to this email directly or view it on GitHub https://github.com/twotoasters/clusterkraf/issues/43#issuecomment-61812507 .
@curtinmartis You should not package "sample" module when building library .aar. A Library is not supposed to inject redundant/sample resources, styles, manifests and themes into library's user's projects.
There must be a way to ignore a certain module when packaging with Gradle.
As the main application will already have application icon and theme in place. While building the app fails with following
Error:(39, 9) Attribute application@icon value=(@drawable/launcher_icon) from AndroidManifest.xml:39:9 Error:(41, 9) Attribute application@theme value=(@style/Theme.rctheme) from AndroidManifest.xml:41:9 is also present at com.twotoasters.clusterkraf:library:1.0.2:5:115 value=(@style/AppTheme) Suggestion: add 'tools:replace="android:theme"' to element at AndroidManifest.xml:37:5 to override
Error:Execution failed for task ':handset:processDebugManifest'.
Possible Resolution replace the manifest
current one
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.twotoasters.clusterkraf" android:versionCode="3" android:versionName="1.0.2" >
new one
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.twotoasters.clusterkraf" android:versionCode="3" android:versionName="1.0.2" >