Urban Airship Crashes At Take Off. Illegal Argument Exception
Solution 1:
I have also encountered this problem, and I resolved it. I will suggest you to make sure you have created an app on UrbanAirship with the same package of application which your application have. And also make sure your key and secret are correct.
IllegalArgumentException
is thrown when the developmentAppKey and developmentAppSecret are wrong. Or key and secret are correct but your remote Urban Airship test application has a different Applicaion package set.
Solution 2:
One thing to note is that if you are using an airshipconfig.properties file, and you placed it at the same directory level as the project.properties file, the Urban Airship code won't be able to find it, and the call to AirshipConfigOptions.loadDefaultOptions(this) will return empty string values.
This can cause the exception you are seeing as well.
The solution in this case is to place the airshipconfig.properties file in the assets directory of your project.
Solution 3:
If you have checked every other suggestion, and still get an IllegalArgumentException, this exception is also thrown when the phone doesn't have any associated Google account tied to it.
If this is the case you should be able to login/associate a Google account, and then you have to restart the phone.
I would recommend wrapping the Urban Airship initialisation calls in a try catch to stop it bricking the app in this scenario! If you use error reporting it is wise to log this as a handled exception so you know if and when it is happening.
Post a Comment for "Urban Airship Crashes At Take Off. Illegal Argument Exception"