Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NoSuchMethodError: No virtual method Content #21

Closed
aabadaa opened this issue Feb 15, 2024 · 1 comment
Closed

java.lang.NoSuchMethodError: No virtual method Content #21

aabadaa opened this issue Feb 15, 2024 · 1 comment
Labels

Comments

@aabadaa
Copy link

aabadaa commented Feb 15, 2024

The exception is being thowed here:

@ExperimentalGlanceRemoteViewsApi
private suspend fun GlanceAppWidget.compose(
context: Context,
size: DpSize,
state: Any?
): RemoteViews = glanceRemoteViews.compose(
context = context,
size = size,
state = state,
content = { Content() }
).remoteViews

here is my widget:
object NoteWidget : GlanceAppWidget() {

override val stateDefinition: GlanceStateDefinition<*> = PreferencesGlanceStateDefinition
override suspend fun provideGlance(context: Context, id: GlanceId) {
    provideContent {
        GlanceTheme(colors =MyAppWidgetGlanceColorScheme.colors) { /* a normal content */ } 
}

}

the exception appears as soon as the user try to add a widget and the configuration activity is launched

Environment:

  • Android OS version: 14
  • Device:Resizable expermental api 34
  • Glance Experimental Tools version: 0.2.2
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant