When I click Places Auto complete fragment search box ,
I am getting the following error
place fields must not be empty (9012)
I already migrated to new places SDK . Also checked my Google Billing and Maps API. Everything is correct
My code
Places.initialize(getApplicationContext(),getResources().getString(R.string.google_api_key));
placesClient = Places.createClient(this);
AutocompleteSupportFragment placesfragment = (AutocompleteSupportFragment) getSupportFragmentManager().findFragmentById(R.id.place_autocomplete_fragment);
placesfragment.setOnPlaceSelectedListener(new PlaceSelectionListener() {
@Override
public void onPlaceSelected(@NonNull Place place) {
LatLng ll = place.getLatLng();
mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(ll, 14));
if (manmarker != null) manmarker.remove();
manmarker = mMap.addMarker(new MarkerOptions().position(ll).title("Manually Selected Location"));
manapprox = getAddressFromLatLAng(ll);
manualaddr.setText(manapprox);
manlatlng = ll;
}
@Override
public void onError(Status status) { // Handle the error
Toast.makeText(MapsActivity.this, "Something went wrong! please try again "+status.getStatusCode() + " " + status.getStatusMessage() + Places.isInitialized(), Toast.LENGTH_SHORT).show();
}
});
Please Help me to resolve this issue