microg/GmsCore · error · IllegalArgumentException
transitions can't be empty.
Error message
transitions can't be empty.
What it means
The ActivityTransitionRequest(List<ActivityTransition>) constructor requires at least one transition: an empty transitions list (or one with duplicates) triggers IllegalArgumentException with this message during construction.
Source
Thrown at play-services-location/src/main/java/com/google/android/gms/location/ActivityTransitionRequest.java:62
if (res != 0) return res;
res = Integer.compare(o1.getTransitionType(), o2.getTransitionType());
return res;
}
};
private ActivityTransitionRequest() {
}
/**
* Creates an {@link ActivityTransitionRequest} object by specifying a list of interested activity transitions.
*
* @param transitions a list of interested activity transitions
* @throws NullPointerException if {@code transitions} is {@code null}
* @throws IllegalArgumentException if {@code transitions} is an empty list or if there are duplicated transitions in this list
*/
public ActivityTransitionRequest(List<ActivityTransition> transitions) {
if (transitions == null) throw new NullPointerException("transitions can't be null");
if (transitions.isEmpty()) throw new IllegalArgumentException("transitions can't be empty.");
Set<ActivityTransition> set = new TreeSet<ActivityTransition>(IS_SAME_TRANSITION);
set.addAll(transitions);
if (transitions.size() != set.size()) throw new IllegalArgumentException("Found duplicated transition");
this.activityTransitions = Collections.unmodifiableList(transitions);
}
/**
* Serializes this request to the given intent.
*
* @param intent the intent to serailize this object to
*/
public void serializeToIntentExtra(Intent intent) {
intent.putExtra(EXTRA, SafeParcelableSerializer.serializeToBytes(this));
}
@Override
public boolean equals(Object o) {
if (this == o) return true;View on GitHub (pinned to 157c9d86ac)
Solutions
- Add at least one ActivityTransition before constructing the request
- Skip requesting transition updates when no transitions are configured
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at play-services-location/src/main/java/com/google/android/gms/location/ActivityTransitionRequest.java:62 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of microg/GmsCore@157c9d86ac (2026-09-06).
Data as JSON: /api/errors/34cd4c01234b3ca5.
Report an issue: GitHub.