2

I'm currently learning on how to use thermal printer, and found a library named Blueline. But when i implement it, app can't compile due to Manifest merger failed with multiple errors, see logs

This is my manifest :

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">

    <uses-permission android:name="android.permission.BLUETOOTH"/>
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
    <uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
    <uses-permission android:name="android.permission.BLUETOOTH_SCAN"/>

    <application
        android:allowBackup="true"
        android:dataExtractionRules="@xml/data_extraction_rules"
        android:fullBackupContent="@xml/backup_rules"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.ThermalPrinter">
        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:label="@string/app_name"
            android:theme="@style/Theme.ThermalPrinter">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>

And this is the merged, sorry i can't copy the merged manifest

Merged Manifest

Error log:

[com.dilivva.blueline:compose-builder-android:2.0.1] C:\Users\kamil\.gradle\caches\9.1.0\transforms\568ee62b03f196056791415a3732a0e1\workspace\transformed\compose-release\AndroidManifest.xml Error:
    Namespace 'com.dilivva.blueline.compose' is used in multiple modules and/or libraries: com.dilivva.blueline:compose-builder-android:2.0.1, com.dilivva.blueline:blueline-core-android:2.0.1. Please ensure that all modules and libraries have a unique namespace. For more information, See https://developer.android.com/studio/build/configure-app-module#set-namespace AndroidManifest.xml Error: Validation failed, exiting
2
  • "can't compile due to Manifest merger failed with multiple errors, see logs" -- then look at the build logs and see what specifically it is complaining about. Commented yesterday
  • sorry i've include the log now Commented yesterday

1 Answer 1

1

This feels like a bug in the libraries.

Both blueline-core-android and blueline-compose-builder use com.dilivva.blueline.compose as the namespace in the android closure in build.gradle.kts. Those need to be unique, and it feels like blueline-core-android has the wrong value.

You will need to reach out to the developer, perhaps by filing an issue in the GitHub project. Or, consider using some other library.

Sign up to request clarification or add additional context in comments.

3 Comments

so this is more of dependency problem? also i only use the compose blueline without. does it affect it?
"so this is more of dependency problem?" -- yes. It would appear that the developer of the libraries did not test them adequately. "also i only use the compose blueline without. does it affect it?" -- you seem to be missing a word or two there. Gradle thinks that you are using both of those dependencies, and blueline-compose-builder depends on blueline-core-android.
alr, thanks for the explanation. Sorry if my question is dumb. My apologies

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.