Closed ghost closed 8 years ago
I found a solution to this issue, it is: Converting switch to if-else:
were you able to use this library in android studio?
@joashLlaneza7: Yes I have been able to use it.
@joashLlaneza7 : If you want to import this library using android studio you can download this aar file: https://github.com/Malivuk/aar-library , which created by: @Malivuk and follow these instructions: http://stackoverflow.com/questions/16682847/how-to-manually-include-external-aar-package-using-new-gradle-android-build-syst#answer-34919810.
Thank you!!!
@joashLlaneza7 You are welcome.
Hello Yassine! i managed to import the library to android studio but can i ask another question cause im pretty new to android and Im trying to learn with this project. so i tried to test it out with the sample xml code in the read me file but i think i had the same errors as you did but not just in the switch statement but all the R.styleable even the ones outside of the switch. and i also think i have a build error. have you encountered any issues like this? thank you again!
Hi @joashLlaneza7! , Please try to download the library (not aar file), then import it to android studio by selecting "Import project (Eclipse ADT,Gradle, etc,)", after that fix the error in switch statement, and it will work!
Hi @yassine-lafryhi sorry i couldn't reply because of the heavy rains it kinda disabled out internet. Ive tried importing the test project as eclipse adt but it says "gradle sync failed: Cause: failed to find target with hash string 'Google Inc. :Google APIs:19'" i tried changing the compileSdkVersion to 24 and it still doesn't work it still says the same error. Thank you for all the help tho i really appreciated it
Hi @joashLlaneza7 there is no problem. Just open the SDK manager and install the following and re-import the project and it will work:
Hi @yassine-lafryhi!!! i imported it successfully finally! and no more errors on the code i changed the switch statement to if statement. its working perfectly!!! THANK YOU!
No problem @joashLlaneza7 we are here to help each other.