LeandroSQ / android-ble-made-easy

An Android Library for handling Bluetooth Low Energy on Android Easy
MIT License
88 stars 29 forks source link

2 files found with path 'META-INF/NOTICE.md' #48

Open black opened 3 weeks ago

black commented 3 weeks ago

I have just this library to build in my blank Android project and I get the following error upon building

2 files found with path 'META-INF/NOTICE.md'.
Adding a packaging block may help, please refer to
https://developer.android.com/reference/tools/gradle-api/8.5/com/android/build/api/dsl/Packaging
for more information

My Gradle file

namespace = "com.experiment.bletest"
compileSdk = 34

defaultConfig {
    applicationId = "com.experiment.bletest"
    minSdk = 24
    targetSdk = 34
    versionCode = 1
    versionName = "1.0"

    testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
LeandroSQ commented 3 weeks ago

Hello, thank you for opening the issue

Would you be so kind to share the whole project? So I can take a deeper look

Thank you

black commented 3 weeks ago

Hey, I just created a blank project and added your library and try to build the project. I haven't added anything else. I am using latest Android Studio.

Also, I made it work by adding this to my app gradle

packaging {
        resources {
            excludes += "META-INF/NOTICE.md"
            excludes += "META-INF/LICENSE.md"
        }
    }

But I think there should be a fix directly in the library itself instead of adding the fix manually.

On, a different note: Is there a way to know connection status in the library ?

LeandroSQ commented 3 weeks ago

Got it, I will take a look at this later today. Thank you for sharing the details.

For your other question, in addition to the lifecycle callbacks such as onConnect and onDisconnect. You can also use this.

LeandroSQ commented 3 weeks ago

I changed the packaging exclusion on be282decc023225997ead4086d072e75572a2979 Please try 1.9.3 and let me know if it works for you :)

black commented 2 weeks ago

awesome thank you. Let me try that.

black commented 1 week ago

Hey Sorry, I was a bit busy. I checked your updated library and it wasn't working. I had to add packaging exclusion in order to make it work.