microg/GmsCore · error · DynamiteModule.LoadingException
Failed to instantiate module class:
Error message
Failed to instantiate module class:
What it means
Thrown in DynamiteModule.instantiate when reflection cannot create an instance of the requested module class — wrong class name or inaccessible constructor. The class name is appended; the underlying reflection failure is chained.
Source
Thrown at play-services-basement/src/main/java/com/google/android/gms/dynamite/DynamiteModule.java:160
return new DynamiteModule(context);
case REMOTE:
throw new UnsupportedOperationException();
default:
throw new LoadingException("VersionPolicy returned invalid code:" + result.selection);
}
} catch (LoadingException loadingException) {
throw loadingException;
} catch (Throwable e) {
throw new LoadingException("Failed to load remote module.", e);
}
}
@NonNull
public IBinder instantiate(@NonNull String className) throws LoadingException {
try {
return (IBinder) this.moduleContext.getClassLoader().loadClass(className).newInstance();
} catch (ClassNotFoundException | IllegalAccessException | InstantiationException | RuntimeException e) {
throw new LoadingException("Failed to instantiate module class: " + className, e);
}
}
}
View on GitHub (pinned to 157c9d86ac)
Solutions
- Verify the class name passed to instantiate matches an instantiable class in the loaded module
- Catch LoadingException and degrade to a path that does not need the remote module
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at play-services-basement/src/main/java/com/google/android/gms/dynamite/DynamiteModule.java:160 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/ffdd531ff6c76ed4.
Report an issue: GitHub.