hbb20 / CountryCodePickerProject

Country Code Picker (CCP) is an android library which provides an easy way to search and select country or international phone code. Also supports Android EditText phone mask and international phone validation.
Apache License 2.0
1.52k stars 506 forks source link

I am getting an error just after pasting implementation 'com.hbb20:ccp:2.5.0' #604

Open Brayan603 opened 3 months ago

Brayan603 commented 3 months ago

dependencies {

implementation(libs.appcompat)
implementation(libs.material)
implementation(libs.activity)
implementation(libs.constraintlayout)
implementation(libs.navigation.fragment)
implementation(libs.navigation.ui)
testImplementation(libs.junit)
androidTestImplementation(libs.ext.junit)
androidTestImplementation(libs.espresso.core)
implementation 'com.hbb20:ccp:2.5.0'

}

Elite230 commented 3 months ago

are you following this tutorial? the latest version is already2.7.0 Your gradle probably ends in .kts, it is a cotlin file. the implementation you pasted in is in java. I am also trying to find a solution.

Elite230 commented 3 months ago

Here's what I found works:


    implementation(libs.appcompat)
    implementation(libs.material)
    implementation(libs.activity)
    implementation(libs.constraintlayout)
    testImplementation(libs.junit)
    androidTestImplementation(libs.ext.junit)
    androidTestImplementation(libs.espresso.core)
    implementation("com.github.hbb20:CountryCodePickerProject:2.7.0")

copy the last line

implementation("com.github.hbb20:CountryCodePickerProject:2.7.0")
guptaditya123 commented 3 months ago

implementation("com.github.hbb20:CountryCodePickerProject:2.7.0") not working country code picker is not showing in option

waffiqaziz commented 5 days ago

If youre using gradle version catalogs

  1. Add
    
    # libs.versions.toml

[versions] countryPicker = "2.7.0"

[libraries] country-picker = { group = "com.hbb20", name = "ccp", version.ref = "countryPicker" }


3. Sync the project
4. Add in your gradle module
``` kotlin
// build.gradle.kts (module)

dependencies {
// others dependency

implementation(libs.country.picker) // here
}
  1. Sync the project again