Code Monkey home page Code Monkey logo

Comments (23)

psambit9791 avatar psambit9791 commented on July 23, 2024 2

Based on this solution for the same issue with the DefaultDependencyHandler , this is an issue with the syntax used for including JDSP - the exclusions require the unsugared version.

Could you please replace:

implementation 'com.github.psambit9791:jdsp:2.0.1' {
        exclude group: 'org.apache.maven.surefire', module: 'common-java'
        exclude group: 'org.apache.maven.surefire', module: 'surefire-api'
    }

with this:

implementation('com.github.psambit9791:jdsp:2.0.1', {
        exclude group: 'org.apache.maven.surefire', module: 'common-java'
        exclude group: 'org.apache.maven.surefire', module: 'surefire-api'
    })

OR

implementation('com.github.psambit9791:jdsp:2.0.1') {
        exclude group: 'org.apache.maven.surefire', module: 'common-java'
        exclude group: 'org.apache.maven.surefire', module: 'surefire-api'
    }

from jdsp.

tusharrain28 avatar tusharrain28 commented on July 23, 2024 1

@psambit9791 i can confirm the fix is working correctly. Somehow i was not able to post any comment before :)

from jdsp.

psambit9791 avatar psambit9791 commented on July 23, 2024

@tusharrain28 can you share the gradle file please?

from jdsp.

tusharrain28 avatar tusharrain28 commented on July 23, 2024

I just created a new projected and added the lib

Project gradle file :

// Top-level build file where you can add configuration options common to all sub-projects/modules.


buildscript {
    repositories {
        jcenter()
        maven {
            url "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
        }
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:7.4.2'
    }
}

plugins {
    id 'com.android.application' version '7.4.2' apply false
    id 'com.android.library' version '7.4.2' apply false
}

allprojects {
    repositories {
        jcenter()
        maven {
            url "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
        }
        google()
    }
}

Module gradle file:

plugins {
    id 'com.android.application'
}

android {
    namespace 'com.example.fft'
    compileSdk 33

    defaultConfig {
        applicationId "com.example.fft"
        minSdk 33
        targetSdk 33
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    packagingOptions {
        // Exclude these files because they conflict with those imported from the jDSP package
        exclude 'META-INF/*'
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    buildFeatures {
        viewBinding true
    }


}

dependencies {

    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.8.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'androidx.navigation:navigation-fragment:2.4.1'
    implementation 'androidx.navigation:navigation-ui:2.4.1'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
    implementation 'com.github.psambit9791:jdsp:2.0.1' {
        exclude group: 'org.apache.maven.surefire', module: 'common-java'
        exclude group: 'org.apache.maven.surefire', module: 'surefire-api'
    }
}

from jdsp.

psambit9791 avatar psambit9791 commented on July 23, 2024

@tusharrain28 Could you try and take a look at this: gradle/gradle#22550 (comment)?
Appears to be a similar issue to what you encountered.

from jdsp.

karansingla007 avatar karansingla007 commented on July 23, 2024

any update on this?
i am also getting same error

from jdsp.

skaran0007 avatar skaran0007 commented on July 23, 2024

image
@psambit9791 See still i am getting error after using

from jdsp.

psambit9791 avatar psambit9791 commented on July 23, 2024

As mentioned with the error, you will need to add packagingOptions in your build.gradle file

packagingOptions {
    exclude 'META-INF/DEPENDENCIES'
}

Although, I don't think this is directly linked to the issue originally reported herein.

from jdsp.

psambit9791 avatar psambit9791 commented on July 23, 2024

@tusharrain28 @skaran0007 @karansingla007 Can you confirm if this fixes the issue encountered?

from jdsp.

skaran0007 avatar skaran0007 commented on July 23, 2024

@tusharrain28 @psambit9791 i am getting the same error.

from jdsp.

psambit9791 avatar psambit9791 commented on July 23, 2024

@skaran0007 Can you elaborate on what the issue is? Maybe provide details on your gradle file.

from jdsp.

psambit9791 avatar psambit9791 commented on July 23, 2024

@skaran0007 I am not sure if this is the gradle file you wanted to share. This has no mention of jdsp in it.

from jdsp.

karansingla007 avatar karansingla007 commented on July 23, 2024

@psambit9791 see this

dependencies {

    implementation 'androidx.core:core-ktx:1.9.0'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.8.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'com.google.firebase:firebase-ml-common:22.1.2'
    implementation 'com.google.firebase:firebase-ml-model-interpreter:22.0.4'

    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

    /* Contracts */
    implementation 'androidx.activity:activity-ktx:1.7.0'
    implementation 'androidx.fragment:fragment-ktx:1.5.6'

    /* Bluetooth*/
    implementation 'com.github.LeandroSQ:android-ble-made-easy:1.8.0'

    /* Navigation */
    implementation "androidx.navigation:navigation-fragment-ktx:2.5.3"
    implementation "androidx.navigation:navigation-ui-ktx:2.5.3"
    implementation "androidx.navigation:navigation-dynamic-features-fragment:2.5.3"
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'

    // graph view
    implementation 'com.jjoe64:graphview:4.2.2'
    implementation 'com.pusher:pusher-java-client:1.8.0'
    implementation 'com.google.code.gson:gson:2.9.0'

    //tf lite
    implementation 'com.google.firebase:firebase-ml-modeldownloader-ktx:24.1.2'
    implementation 'org.tensorflow:tensorflow-lite:0.0.0-nightly'
    implementation 'org.tensorflow:tensorflow-lite-support:0.4.3'

    implementation('com.github.psambit9791:jdsp:2.0.1', {
        exclude group: 'org.apache.maven.surefire', module: 'common-java'
        exclude group: 'org.apache.maven.surefire', module: 'surefire-api'
    })


}

the error i am getting
image

from jdsp.

psambit9791 avatar psambit9791 commented on July 23, 2024

@karansingla007 It is difficult to identify issues regarding the build if the full gradle file is not provided. I would suggest sharing the entire content of the gradle file. From the error, it appears to be arising from DEPENDENCIES file not being ignored,

from jdsp.

karansingla007 avatar karansingla007 commented on July 23, 2024

@psambit9791

plugins {
    id 'com.android.application'
    id 'kotlin-android'
    id 'kotlin-kapt'
    id 'androidx.navigation.safeargs'
    id 'org.jetbrains.kotlin.android'

}
apply plugin: 'com.google.gms.google-services'

android {
    namespace 'com.aavaa'
    compileSdk 33

    aaptOptions {
        noCompress "tflite", "lite"
    }

    defaultConfig {
        applicationId "com.aavaa"
        minSdk 24
        targetSdk 33
        versionCode 1
        versionName "1.0"


        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

    buildFeatures {
        viewBinding true
    }

    packagingOptions {
        resources {
            excludes += '/META-INF/{AL2.0,LGPL2.1,NOTICE.md,LICENSE.md}'
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
}

dependencies {

    implementation 'androidx.core:core-ktx:1.9.0'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.8.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'com.google.firebase:firebase-ml-common:22.1.2'
    implementation 'com.google.firebase:firebase-ml-model-interpreter:22.0.4'

    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

    /* Contracts */
    implementation 'androidx.activity:activity-ktx:1.7.0'
    implementation 'androidx.fragment:fragment-ktx:1.5.6'

    /* Bluetooth*/
    implementation 'com.github.LeandroSQ:android-ble-made-easy:1.8.0'

    /* Navigation */
    implementation "androidx.navigation:navigation-fragment-ktx:2.5.3"
    implementation "androidx.navigation:navigation-ui-ktx:2.5.3"
    implementation "androidx.navigation:navigation-dynamic-features-fragment:2.5.3"
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'

    // graph view
    implementation 'com.jjoe64:graphview:4.2.2'
    implementation 'com.pusher:pusher-java-client:1.8.0'
    implementation 'com.google.code.gson:gson:2.9.0'

    //tf lite
    implementation 'com.google.firebase:firebase-ml-modeldownloader-ktx:24.1.2'
    implementation 'org.tensorflow:tensorflow-lite:0.0.0-nightly'
    implementation 'org.tensorflow:tensorflow-lite-support:0.4.3'

    implementation('com.github.psambit9791:jdsp:2.0.1', {
        exclude group: 'org.apache.maven.surefire', module: 'common-java'
        exclude group: 'org.apache.maven.surefire', module: 'surefire-api'
    })
}

from jdsp.

psambit9791 avatar psambit9791 commented on July 23, 2024

@karansingla007 Under packagingOptions, could you please try adding DEPENDENCIES as shown below.

packagingOptions {
    resources {
        excludes += '/META-INF/{DEPENDENCIES,AL2.0,LGPL2.1,NOTICE.md,LICENSE.md}'
    }
}

For details, please refer to this response

from jdsp.

karansingla007 avatar karansingla007 commented on July 23, 2024

@psambit9791 no luck
Error is same

image

from jdsp.

psambit9791 avatar psambit9791 commented on July 23, 2024

@karansingla007
This isn't the same error. As you see, it mentions LICENSE-notice.md and not DEPENDENCIES. So, you have to exclude the LICENSE-notice.md in the packagingOptions as well. You need to keep excluding all the files which show up as conflicts under the META-INF directory.

from jdsp.

psambit9791 avatar psambit9791 commented on July 23, 2024

Hi @karansingla007
Can you confirm that the build issue has been resolved?
Any further problems not pertaining to the build issue requires a new issue to be raised.

from jdsp.

karansingla007 avatar karansingla007 commented on July 23, 2024

yeah, it resolved
And very very thanks for that.

from jdsp.

psambit9791 avatar psambit9791 commented on July 23, 2024

@karansingla007 Can you please create a new ticket for the Butterworth issue you are encountering?

from jdsp.

humaneBicycle avatar humaneBicycle commented on July 23, 2024

implementation('com.github.psambit9791:jdsp:2.0.1', {
exclude group: 'org.apache.maven.surefire', module: 'common-java'
exclude group: 'org.apache.maven.surefire', module: 'surefire-api'
})

bro this actually worked!! really the brackets messed up my time. Thanks for the excellent library btw :)

from jdsp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.