microg/GmsCore · error · UnsupportedOperationException
onInflate not allowed on StreetViewPanoramaViewDelegate
Error message
onInflate not allowed on StreetViewPanoramaViewDelegate
What it means
StreetViewPanoramaViewDelegate.onInflate(Activity, Bundle, Bundle) is intentionally unsupported: XML attribute inflation is handled by StreetViewPanoramaView's constructor or the panorama fragment. Invoking it on the delegate throws UnsupportedOperationException unconditionally.
Source
Thrown at play-services-maps/src/main/java/org/microg/gms/maps/StreetViewPanoramaViewDelegate.java:68
}
@Override
public void onDestroy() {
try {
delegate.onDestroy();
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
@Override
public void onDestroyView() {
throw new UnsupportedOperationException("onDestroyView not allowed on StreetViewPanoramaViewDelegate");
}
@Override
public void onInflate(@NonNull Activity activity, @NonNull Bundle options, @Nullable Bundle onInflate) {
throw new UnsupportedOperationException("onInflate not allowed on StreetViewPanoramaViewDelegate");
}
@Override
public void onLowMemory() {
try {
delegate.onLowMemory();
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
@Override
public void onPause() {
try {
delegate.onPause();
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}View on GitHub (pinned to 157c9d86ac)
Solutions
- Do not call onInflate on the delegate; pass StreetViewPanoramaOptions to the StreetViewPanoramaView constructor instead.
- Use StreetViewPanoramaFragment/SupportStreetViewPanoramaFragment for XML/fragment embedding.
- Remove onInflate forwarding from custom Fragment wrappers.
- Build options programmatically (new StreetViewPanoramaOptions().position(...)) rather than via inflation.
Example fix
// before
@Override
public void onInflate(Activity a, Bundle opts, Bundle s) {
delegate.onInflate(a, opts, s); // always throws
}
// after
@Override
public void onInflate(Activity a, Bundle opts, Bundle s) {
panoramaOptions = new StreetViewPanoramaOptions(); // build from your own attribute parsing
} Defensive patterns
Strategy: type-guard
Type guard
public static boolean supportsInflate(LifecycleDelegate d) {
return !(d instanceof StreetViewPanoramaViewDelegate);
} Try / catch
try {
delegate.onInflate(activity, options, savedInstanceState);
} catch (UnsupportedOperationException e) {
// build StreetViewPanoramaOptions yourself or use the fragment
} Prevention
- Pass StreetViewPanoramaOptions to the view constructor instead of relying on delegate inflation.
- Use StreetViewPanoramaFragment/SupportStreetViewPanoramaFragment for XML embedding.
- Never forward Fragment.onInflate to the panorama delegate.
- Construct options programmatically (position, pano id, orientation) in code.
When it happens
Trigger: Calling delegate.onInflate(activity, options, savedInstanceState), or a Fragment.onInflate forwarding attributes to the delegate, or XML inflation combined with manual delegate lifecycle driving.
Common situations: XML-declared Street View views with custom Fragment plumbing, code ported from other GMS delegate implementations, or migration from Google Maps SDK internals.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- onCreateView not allowed on StreetViewPanoramaViewDelegate
- onDestroyView not allowed on StreetViewPanoramaViewDelegate
- onCreateView not allowed on MapViewDelegate
- onDestroyView not allowed on MapViewDelegate
- onInflate not allowed on MapViewDelegate
AI-assisted analysis of microg/GmsCore@157c9d86ac (2026-09-06).
Data as JSON: /api/errors/c136a22caea3f709.
Report an issue: GitHub.