microg/GmsCore · error · RuntimeException
No Creator found for " + tClass.getName()
Error message
No Creator found for " + tClass.getName()
What it means
AbstractSafeParcelable.findCreator() locates the generated '<Class>$000Creator' class by naming convention and reflection. When the generated creator class is missing or cannot be instantiated it throws a RuntimeException 'No Creator found for <class>'. This microG-specific mechanism requires codegen output that the official Play services library does not produce.
Source
Thrown at play-services-basement/src/main/java/com/google/android/gms/common/internal/safeparcel/AbstractSafeParcelable.java:21
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.android.gms.common.internal.safeparcel;
public abstract class AbstractSafeParcelable implements SafeParcelable {
@SuppressWarnings("unchecked")
public static <T extends AbstractSafeParcelable> SafeParcelableCreatorAndWriter<T> findCreator(java.lang.Class<T> tClass) {
java.lang.Class<?> upmostClass = tClass;
while (upmostClass.getEnclosingClass() != null) upmostClass = upmostClass.getEnclosingClass();
String upmostClassName = upmostClass.getName();
int idx = upmostClassName.lastIndexOf('.');
String packagePrefix = idx > 0 ? upmostClassName.substring(0, idx + 1) : "";
String creatorClassName = packagePrefix + tClass.getSimpleName() + "$000Creator";
try {
return (SafeParcelableCreatorAndWriter<T>) java.lang.Class.forName(creatorClassName).newInstance();
} catch (Exception e) {
throw new RuntimeException("No Creator found for " + tClass.getName(), e);
}
}
@Override
public int describeContents() {
return 0;
}
}
View on GitHub (pinned to 157c9d86ac)
Solutions
- Ensure the corresponding generated <Class>$000Creator class exists on the classpath
- Exclude safeparcel classes from ProGuard/R8 obfuscation (keep rules)
- Use the matching microG/safeparcel runtime for the parcelable classes in use
- Check that the class's package structure was not moved after generation
Example fix
// proguard-rules.pro
// before
(nothing)
// after
-keep class * extends com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable { *; }
-keep class **$000Creator { *; } Defensive patterns
Strategy: try-catch
Validate before calling
String pkg = tClass.getPackage().getName();
try {
Class.forName(pkg + "." + tClass.getSimpleName() + "$000Creator");
} catch (ClassNotFoundException e) { /* creator missing */ } Try / catch
try { creator = AbstractSafeParcelable.findCreator(cls); } catch (RuntimeException e) { logMissingCreator(e); } Prevention
- Add ProGuard keep rules for $000Creator classes
- Keep generated creator classes packaged with their parcelables
- Use matching safeparcel runtime versions
When it happens
Trigger: Deserializing/writing a SafeParcelable subclass whose generated $000Creator class is not on the classpath or whose class name/package does not match the convention (e.g. obfuscated class names, class loaded from a different package).
Common situations: Mixing official Google Play services classes with microG's AbstractSafeParcelable (or vice versa); ProGuard/R8 stripping or renaming generated creator classes; class loaded via a different classloader/package after refactoring.
Related errors
- No non-synthetic fields were found
- Could not access the field in remoteBinder.
- Expected size " + expectedSize + " got " + i + " (0x" + Inte
- Expected object header. Got 0x" + Integer.toHexString(header
- No fields were found
AI-assisted analysis of microg/GmsCore@157c9d86ac (2026-09-06).
Data as JSON: /api/errors/b602774d083c6f9d.
Report an issue: GitHub.