Created
January 6, 2015 00:55
-
-
Save willrax/d4b666c56c83455f19d6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def setup_google_services | |
| @google_client = Com::Google::Android::Gms::Common::Api::GoogleApiClient::Builder.new(self) | |
| @google_client.addConnectionCallbacks(self) | |
| @google_client.addApi(Com::Google::Android::Gms::Location::LocationServices::API) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >> E/com/willrax/weather( 4087): Java exception raised: java.lang.NullPointerException: | |
| Attempt to invoke virtual method 'java.util.List com.google.android.gms.common.api.Api.gy()' on a null object reference | |
| --------- beginning of crash | |
| E/AndroidRuntime( 4087): FATAL EXCEPTION: main | |
| E/AndroidRuntime( 4087): Process: com.willrax.weather, PID: 4087 | |
| E/AndroidRuntime( 4087): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.willrax.weather/com.willrax.weather.MainActivity}: | |
| java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List com.google.android.gms.common.api.Api.gy()' on a null object reference |
Author
Could you run adb -d logcat in a separate terminal and paste the full crash report?
Author
Thanks. Here it is: https://gist.github.com/willrax/ae3054aad0123b4fa210
Could it be that the argument passed to addApi() is nil?
Author
Quite possible, it is a nullobject error. Doing a puts on the object outputs nothing.
Author
LocationServices::API is supposed to be a constant, so im guessing it should be returning something. Though it doesn't return anything.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is only failing when i try to add the api.