Code Monkey home page Code Monkey logo

Comments (6)

CarlosSac avatar CarlosSac commented on June 21, 2024

Hi, I could not reproduce the issue with the CircleImageView library on my end. Here is what I did:

  • I used Gradle 8.0 and Android Gradle Plugin 8.1.3 in my project settings.
  • I added the following line to the dependencies block of my app's build.gradle.kts file:
implementation("de.hdodenhof:circleimageview:3.1.0")
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("de.hdodenhof:circleimageview:3.1.0")
    
    testImplementation("junit:junit:4.13.2")
    androidTestImplementation("androidx.test.ext:junit:1.1.5")
    androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
}
  • I used the de.hdodenhof.circleimageview.CircleImageView class in my xml layout file.
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:background="#FD4568"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <de.hdodenhof.circleimageview.CircleImageView
        android:id="@+id/user_icon"
        android:layout_width="96dp"
        android:layout_height="96dp"
        android:src="@drawable/ic_launcher_foreground"
        app:civ_border_color="#FF000000"
        app:civ_border_width="2dp"
        tools:ignore="MissingClass,MissingConstraints" />

</androidx.constraintlayout.widget.ConstraintLayout>
  • I ran the app and everything worked fine. I did not encounter any errors or warnings. Here is a screenshot of how the app looks like on my device:

Screenshot of the app

I’m sorry to hear that you are having this problem. I was not able to replicate it on my end, so I’m not sure what is causing it. I hope you can find a way to fix the issue.

from circleimageview.

xinbai240524 avatar xinbai240524 commented on June 21, 2024

de.hdodenhof.circleimageview.CircleImageView

Thank you, but I still can't solve it at the moment, I looked at it again, and it says failed to resolve de.hdodenhof.circleimageview.CircleImageView, but I really don't know what to do...

from circleimageview.

MohammedAbidNafi avatar MohammedAbidNafi commented on June 21, 2024

Just make sure you have these in your settings.gradle file am not sure exactly which one would work so make sure you have all of the things below in your settings.gradle file

pluginManagement {
    repositories {
        google() //THESE
        mavenCentral() //THESE
        maven { url 'https://jitpack.io' } //THESE
        gradlePluginPortal()
    }
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google() //THESE
        mavenCentral() //THESE
        maven { url 'https://jitpack.io' } //THESE
    }
}


from circleimageview.

xinbai240524 avatar xinbai240524 commented on June 21, 2024

Just make sure you have these in your settings.gradle file am not sure exactly which one would work so make sure you have all of the things below in your settings.gradle file

pluginManagement {
    repositories {
        google() //THESE
        mavenCentral() //THESE
        maven { url 'https://jitpack.io' } //THESE
        gradlePluginPortal()
    }
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google() //THESE
        mavenCentral() //THESE
        maven { url 'https://jitpack.io' } //THESE
    }
}

Thank you for your answer, I followed your suggestion and added the above code to my setting file, now my setting file content is:

import javax.print.DocFlavor.URL

pluginManagement {
    repositories {
        google()
        mavenCentral()
        maven { url  = uri("https://jitpack.io") }
        //maven { url 'https://jitpack.io' } //THESE
        gradlePluginPortal()
    }
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven { url  = uri("https://jitpack.io") }
    }
}

rootProject.name = "music"
include(":app")
 

my xml file content is:

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:background="#FD4568"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <de.hdodenhof.circleimageview.CircleImageView
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:id="@+id/profile_image"
        android:layout_width="96dp"
        android:layout_height="96dp"
        android:src="@drawable/truck"
        app:civ_border_width="2dp"
        app:civ_border_color="#FF000000"
        tools:ignore="MissingClass,MissingConstraints" />

</androidx.constraintlayout.widget.ConstraintLayout>

my build.gradle.kts file content is:

import java.util.regex.Pattern.compile

plugins {
    id("com.android.application")
}

android {
    namespace = "com.wqx.music"
    compileSdk = 33

    defaultConfig {
        applicationId = "com.wqx.music"
        minSdk = 24
        targetSdk = 33
        versionCode = 1
        versionName = "1.0"

        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            isMinifyEnabled = false
            proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
        }
    }
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_1_8
        targetCompatibility = JavaVersion.VERSION_1_8
    }
}

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("de.hdodenhof:circleimageview:3.1.0")

    implementation(files("libs\\activation.jar"))
    implementation(files("libs\\additionnal.jar"))
    implementation(files("libs\\mail.jar"))
    testImplementation("junit:junit:4.13.2")
    androidTestImplementation("androidx.test.ext:junit:1.1.5")
    androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
}

This Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':app: The debugRuntimeClasspath error persists, do you have any other suggestions?

from circleimageview.

xinbai240524 avatar xinbai240524 commented on June 21, 2024

Hi, I could not reproduce the issue with the CircleImageView library on my end. Here is what I did:

  • I used Gradle 8.0 and Android Gradle Plugin 8.1.3 in my project settings.
  • I added the following line to the dependencies block of my app's build.gradle.kts file:
implementation("de.hdodenhof:circleimageview:3.1.0")
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("de.hdodenhof:circleimageview:3.1.0")
    
    testImplementation("junit:junit:4.13.2")
    androidTestImplementation("androidx.test.ext:junit:1.1.5")
    androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
}
  • I used the de.hdodenhof.circleimageview.CircleImageView class in my xml layout file.
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:background="#FD4568"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <de.hdodenhof.circleimageview.CircleImageView
        android:id="@+id/user_icon"
        android:layout_width="96dp"
        android:layout_height="96dp"
        android:src="@drawable/ic_launcher_foreground"
        app:civ_border_color="#FF000000"
        app:civ_border_width="2dp"
        tools:ignore="MissingClass,MissingConstraints" />

</androidx.constraintlayout.widget.ConstraintLayout>
  • I ran the app and everything worked fine. I did not encounter any errors or warnings. Here is a screenshot of how the app looks like on my device:

Screenshot of the app

I’m sorry to hear that you are having this problem. I was not able to replicate it on my end, so I’m not sure what is causing it. I hope you can find a way to fix the issue.

Can I ask you about the version of your Android SDK? I once asked my teacher and he suggested that I unify the version of the SDK with you

from circleimageview.

xinbai240524 avatar xinbai240524 commented on June 21, 2024

I solved it!!!!! It's because my gradle is there, I chose online, and I just canceled it!!! Thank you so much!!!!!

from circleimageview.

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.