Scrounger / CountryCurrencyPicker

CountryCurrencyPicker is an android picker library for country and / or currency. You can implement it as fragment or dialog. It offers the option to search for country values and / or currency values. Inspired by country-picker-android and currency-picker-android
Apache License 2.0
36 stars 11 forks source link

App Crashes with 'Caused by: java.lang.IllegalArgumentException: Unsupported ISO 3166 country: _SP' #4

Open shwtnk7 opened 5 years ago

shwtnk7 commented 5 years ago

Hi, I have used the exact code which you have provided on Github. Still , the app crashes when i chose " Currency and Countries Dialog" from the menu option. Below is the error it shows -

12-25 21:45:40.407 22599-22653/example.example.com.currencylib E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1 Process: example.example.com.currencylib, PID: 22599 java.lang.RuntimeException: An error occurred while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:353) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383) at java.util.concurrent.FutureTask.setException(FutureTask.java:252) at java.util.concurrent.FutureTask.run(FutureTask.java:271) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) at java.lang.Thread.run(Thread.java:764) Caused by: java.lang.IllegalArgumentException: Unsupported ISO 3166 country: _SP at java.util.Currency.getInstance(Currency.java:139) at com.scrounger.countrycurrencypicker.library.Currency.getCurrency(Currency.java:123) at com.scrounger.countrycurrencypicker.library.Country.getCountryWithCurrency(Country.java:140) at com.scrounger.countrycurrencypicker.library.Country.listAllWithCurrencies(Country.java:177) at com.scrounger.countrycurrencypicker.library.Currency.getCurrencyWithCountries(Currency.java:151) at com.scrounger.countrycurrencypicker.library.Currency.listAllWithCountries(Currency.java:201) at com.scrounger.countrycurrencypicker.library.CountryCurrencyPicker$FilterListAsync.doInBackground(CountryCurrencyPicker.java:218) at com.scrounger.countrycurrencypicker.library.CountryCurrencyPicker$FilterListAsync.doInBackground(CountryCurrencyPicker.java:197) at android.os.AsyncTask$2.call(AsyncTask.java:333) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)  at java.lang.Thread.run(Thread.java:764) 

ElKacimiMohamed commented 3 years ago

khouya chouf lina m3ak chi 7al ?