I created a project under the Google Developer Console and wanted to use the Google Places API for Android. I turned on the API and integrated it into the Android app as recommended on the Google developer website ( https://developers.google.com/places/android/start ). The API gives this error, and after several hours (and days) of debugging and searching on the Internet, I could not narrow down the problem. Any conclusions will be appreciated as to why this error occurs.
Error: Status{statusCode=NETWORK_ERROR, resolution=null}
The following is a function from the Google example code that calls "Launch fleets".
private ArrayList<PlaceAutocomplete> getAutocomplete(CharSequence constraint) { if (mGoogleApiClient != null) { Log.i(TAG, "Starting autocomplete query for: " + constraint);
AndroidManifiest.xml Permissions
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/> <uses-feature android:glEsVersion="0x00020000" android:required="true"/>
source share