Reputation: 275
i try using libphonenumber from https://github.com/googlei18n/libphonenumber, i already add it in the dependency but it shows "cannot resolve symbol PhoneNumberUtil". Why is that? By the way, i'm using android studio
Upvotes: 7
Views: 4203
Reputation: 1259
Here are instructions in 6 steps for Android Studio 3.1:
That's it.
Upvotes: 6
Reputation: 275
Thanks everyone I've found my answer i manually add compile 'com.googlecode.libphonenumber:libphonenumber:7.0.4' in build.gradle
when i try to find it by searching in adding library, i can't find it
Upvotes: 13
Reputation: 2257
Downlaod the libphonenumber Jar from Here libphonenumber-3.0.0-javadoc.jar
Add the above obtained libphonenumber-3.0.0-javadoc.jar into libs folder of your project.
Now add dependency in your Apps gradle File by adding following line
compile files ('libs/libphonenumber-3.0.0-javadoc.jar' )
Now click on Sync project with Gradle Files.
Now you should be able to use PhoneNumberUtil class.
Upvotes: 1