Closed jiveshwar closed 7 years ago
As long as you can see the CountryCode with National Flag, your setup looks alright.
Can you please post the crash report? That is the best way for us to understand the problem.
Also please let us know the version of the Android studio.
Thanks for your prompt reply. I have uploaded the simple sample project i created at wetransfer - https://we.tl/hqn1AWkVkk
Simple Project I created after importing the .aar file and just including its xml and java file code as u mentioned in your github repo
Thanks. Actually i don't know what logcat is. I am a newbie.
Thank you for uploading this project, it helped me find the problem.
Here is how you can make this work:
When you are adding aar file for CCP it does not include other dependencies required by CCP. To include those missing dependencies you can add them in gradle file of your project.
Add following dependencies in your dependencies code block
compile 'com.android.support:recyclerview-v7:26.+'
compile 'com.futuremind.recyclerfastscroll:fastscroll:0.2.5'
compile 'com.googlecode.libphonenumber:libphonenumber:8.5.2'
so finally your gradle file will look like
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.test.testforusingccp"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:recyclerview-v7:26.+'
compile 'com.futuremind.recyclerfastscroll:fastscroll:0.2.5'
compile 'com.googlecode.libphonenumber:libphonenumber:8.5.2'
testCompile 'junit:junit:4.12'
compile project(':ccp-release')
}
If this works for you, please close the issue.
Did this work for you?
For now I'm closing this issue. If you still have the problem, feel free to comment below with details.
Please help. Whenever I am adding .aar to my project using the method - https://stackoverflow.com/questions/29826717/how-to-import-a-aar-file-into-android-studio-1-1-0-and-use-it-in-my-code
It doesn't work for me after screen becomes visible. The CountryPicker seems on the MainActivity screen in installed app, but when I click on the CountryCode with National-Flag icon to get the list of country dropdown, the app force closes on Android 6, Does not even opens the MainActivity in Android 4.4.4 (Custom Device) and Android 7.1.1 (OnePlus 5).
Please help