• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Android Studio Preview Rendering problems

Hi, I am trying to learn Android development. I am learning from developer.android.com/courses

And have problems with @Preview rendering.

Every time I change something in code (even if I just added new line) preview try to automatically Build and Refresh, but every time it fails. It says "Some issues were found while trying to render this preview".
In Problems window I see some Render problems in Compose tab.

Rich (BB code):
android.content.res.Resources$NotFoundException: Could not resolve resource value: 0x1CFDEB.   at android.content.res.Resources_Delegate.throwException(Resources_Delegate.java:1161)   at android.content.res.Resources_Delegate.throwException(Resources_Delegate.java:1137)   at android.content.res.Resources_Delegate.throwException(Resources_Delegate.java:1141)   at android.content.res.Resources_Delegate.getString(Resources_Delegate.java:823)   at android.content.res.Resources.getString(Resources.java:546)   at androidx.compose.ui.res.StringResources_androidKt.stringResource(StringResources.android.kt:39)   at com.example.superheroes.HeroesScreenKt.HeroItem(HeroesScreen.kt:30)   at com.example.superheroes.HeroesScreenKt$HeroPreview$1.invoke(HeroesScreen.kt:49)   at com.example.superheroes.HeroesScreenKt$HeroPreview$1.invoke(HeroesScreen.kt:48)   at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)   at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)   at androidx.compose.material.MaterialTheme_androidKt.PlatformMaterialTheme(MaterialTheme.android.kt:23)   at androidx.compose.material.MaterialThemeKt$MaterialTheme$1$1.invoke(MaterialTheme.kt:82)   at androidx.compose.material.MaterialThemeKt$MaterialTheme$1$1.invoke(MaterialTheme.kt:81)   at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)   at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)   at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)   at androidx.compose.material.TextKt.ProvideTextStyle(Text.kt:265)   at androidx.compose.material.MaterialThemeKt$MaterialTheme$1.invoke(MaterialTheme.kt:81)   at androidx.compose.material.MaterialThemeKt$MaterialTheme$1.invoke(MaterialTheme.kt:80)   at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)   at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)   at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)   at androidx.compose.material.MaterialThemeKt.MaterialTheme(MaterialTheme.kt:72)   at com.example.superheroes.ui.theme.ThemeKt.SuperheroesTheme(Theme.kt:38)   at com.example.superheroes.HeroesScreenKt.HeroPreview(HeroesScreen.kt:48)   at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)   at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)   at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)   at java.lang.reflect.Method.invoke(Method.java:566)   at androidx.compose.ui.tooling.ComposableInvoker.invokeComposableMethod(ComposableInvoker.kt:155)   at androidx.compose.ui.tooling.ComposableInvoker.invokeComposable(ComposableInvoker.kt:195)   at androidx.compose.ui.tooling.ComposeViewAdapter$init$3$1$composable$1.invoke(ComposeViewAdapter.kt:590)   at androidx.compose.ui.tooling.ComposeViewAdapter$init$3$1$composable$1.invoke(ComposeViewAdapter.kt:588)   at androidx.compose.ui.tooling.ComposeViewAdapter$init$3$1.invoke(ComposeViewAdapter.kt:625)   at androidx.compose.ui.tooling.ComposeViewAdapter$init$3$1.invoke(ComposeViewAdapter.kt:583)   at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)   at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)   at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)   at androidx.compose.ui.tooling.InspectableKt.Inspectable(Inspectable.kt:61)   at androidx.compose.ui.tooling.ComposeViewAdapter$WrapPreview$1.invoke(ComposeViewAdapter.kt:531)   at androidx.compose.ui.tooling.ComposeViewAdapter$WrapPreview$1.invoke(ComposeViewAdapter.kt:530)   at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)   at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)   at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)   at androidx.compose.ui.tooling.ComposeViewAdapter.WrapPreview(ComposeViewAdapter.kt:525)   at androidx.compose.ui.tooling.ComposeViewAdapter.access$WrapPreview(ComposeViewAdapter.kt:124)   at androidx.compose.ui.tooling.ComposeViewAdapter$init$3.invoke(ComposeViewAdapter.kt:583)   at androidx.compose.ui.tooling.ComposeViewAdapter$init$3.invoke(ComposeViewAdapter.kt:580)   at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)   at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)   at androidx.compose.ui.platform.ComposeView.Content(ComposeView.android.kt:402)   at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:248)   at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:247)   at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)   at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)   at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)   at androidx.compose.ui.platform.CompositionLocalsKt.ProvideCommonCompositionLocals(CompositionLocals.kt:177)   at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:123)   at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:122)   at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)   at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)   at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)   at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt.ProvideAndroidCompositionLocals(AndroidCompositionLocals.android.kt:114)   at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$3.invoke(Wrapper.android.kt:157)   at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$3.invoke(Wrapper.android.kt:156)   at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)   at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)   at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)   at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:156)   at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:140)   at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)   at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)   at androidx.compose.runtime.ActualJvm_jvmKt.invokeComposable(ActualJvm.jvm.kt:74)   at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:3193)   at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:3183)   at androidx.compose.runtime.SnapshotStateKt__DerivedStateKt.observeDerivedStateRecalculations(DerivedState.kt:252)   at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations  at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3183)   at androidx.compose.runtime.ComposerImpl.composeContent$runtime_release(Composer.kt:3119)   at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:584)   at androidx.compose.runtime.Recomposer.composeInitial$runtime_release(Recomposer.kt:811)   at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:519)   at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:140)   at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:131)   at androidx.compose.ui.platform.AndroidComposeView.setOnViewTreeOwnersAvailable(AndroidComposeView.android.kt:1015)   at androidx.compose.ui.platform.WrappedComposition.setContent(Wrapper.android.kt:131)   at androidx.compose.ui.platform.WrappedComposition.onStateChanged(Wrapper.android.kt:182)   at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.java:354)   at androidx.lifecycle.LifecycleRegistry.addObserver(LifecycleRegistry.java:196)   at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:138)   at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:131)   at androidx.compose.ui.platform.AndroidComposeView.onAttachedToWindow(AndroidComposeView.android.kt:1102)   at android.view.View.dispatchAttachedToWindow(View.java:21291)   at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3491)   at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3498)   at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3498)   at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3498)   at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3498)   at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3498)   at android.view.AttachInfo_Accessor.setAttachInfo(AttachInfo_Accessor.java:58) Copy stack to clipboard   Tip: Try to refresh the layout.

But if I manually Build and Refresh no problems are found and everything works. This is very frustrating.

For new assignment I had to create HeroesScreen.kt file and write some code here. I tried to create @Preview in HeroesScreen.kt but was not even able to move from "Code" tab to "Split" tab. Pressing on Split tab did not do anything. Closed Android Studio and opened it again and was able to press and open Split window. But preview would show same issues as above, even if I Build and Refresh manually.
Opened MainActivity.kt file to write some code here. Wanted to copy code from HeroesScreen.kt so I opened it and @Preview is rendered no issues.

I made screen video

Accessories Best program to save and share status

Certainly, you will like one of your friend's Status and want to save or re-share it, and due to the lack of privacy in the modified WhatsApp applications, this application was built to facilitate saving statuses and sharing them easily and completely safely, since this application is officially published in the Google Play Store and under the supervision of Google.

Advantages of status downloader app:
・Save all photos and videos
・Supports WhatsApp Business also
・Multiple save, delete, repost, and share
・The possibility of re-sending the status without saving
・Watch video HD directly
・Easy and fast
・Stylish design
・Completely free
・Many great features

1 save status.png
2 status downloader.png

3 Status saver.png
4 whatsapp status download.png




Download status saver Now for free on Google Play

Lenovo tablet TB328XU Palm Rejection

Oh like a bio scanner? I think that mine does not have that at all, I can rest both of my hands easily on it.
no......when you try writing or drawing whatever app you use, it will detect your hand and your stylus. it will think that you are also using your hand to draw or write and will mark the page as so. but on a tablet that has a designated stylus like the note, s22 or s23 and even the lenovo tab P11, you can place your hand on the screen and it will ignore your hand and only recognize the stylus.

but on tablets or phones that does not come with its own stylus will read your hand as well. so you can't touch the screen while you write or draw. i have yet to find an app that will do this.

Taking a screen shot?

Have you tried this? It's off my Pixel 7 - Settings>System>Gestures The double tap is all I see as an alternative.
That's all I see - was hoping to be able to attach this functionality to the power button or one fo the pull-down commands.

there is also:
wipe up from the bottom of the screen to the Recents screen; you'll see a button for Screenshot at the bottom of the screen
I have disabled swipe navigation, so this does nothing.

Root [Sprint] LG G2 Stuck in fastboot mode. PLEASE HELP!

yep 2014 is when this pre-paid phone came out. i would look to get a new phone.

if you really want to revive this ancient relic, then can you please post the output of your fastboot command? and you say that fastboot sees the phone, so just to be sure when you type "fasboot devices", you get a bunch of numbers, correct?

also post all of the outputs from the fastboot commands that you have tried.

My thread:

Attachments

  • 214323.jpg
    214323.jpg
    291.4 KB · Views: 90
  • 060635.jpg
    060635.jpg
    1.3 MB · Views: 82
  • 060723.jpg
    060723.jpg
    1.5 MB · Views: 81
  • 060744.jpg
    060744.jpg
    1.2 MB · Views: 69
  • 060810.jpg
    060810.jpg
    1.7 MB · Views: 79
  • F8QPo1k.jpg
    F8QPo1k.jpg
    131.1 KB · Views: 91
  • 202304.jpg
    202304.jpg
    102.1 KB · Views: 77
  • 011214.jpg
    011214.jpg
    66.1 KB · Views: 82

Help Using a second Contact App to hide contacts from WhatsApp?

Hi, everyone! Sorry to revive such an old thread, but I think it is the best place to ask my question.

I am using a Samsung Note 20 Ultra 5G, with WhatsApp set up only on this device (no web whatsapp or a secondary device).

I have some contacts saved in my GMail account and some contacts saved on my SIM card.

The problem is that if I set the Contacts App (the phone's native one) to show the contacts from only one source (either GMail or SIM), WhatsApp shows the contacts from both sources.
If I phisicaly remove the SIM from the device (so the Contacts app does not even have access to the contacts stored there), WhatsApp still shows those contacts...

How can I set up WhatsApp to show the contacts from the source that I selected in the phone's Contacts app?

DVD theory..

I believe most car 8-track players were intended to be mounted under the dash, either on a carriage or fixed bracket. With relatively few standard DIN sized units intended for the DIN radio slot in the dash.

8track.jpg




Of course most of them are around 50 years old now, and so may need servicing to make them play as they should, like replacing duff electrolytic capacitors, perished rubber belts, cracked and fractured plastic parts, etc.

public libraries

We had our local one, since 1997.. I do not visit there that often, only for voting and also for a rental in the book, last one was Batman: Nightwalkers..
I do not have a card,nor I wish to use up gasoline to travel there and back for a book.. Rather do google books..

Phone Snobbery?

"Well, my iPhone JUST WORKS". (Didn't Apple copyright that phrase?)

Of course it does: with other Apple stuff. I would expect an Apple phone to work with an Apple tablet/laptop, watch, earbuds, TV and speaker. However, my Android phone JUST WORKS with my Windows laptop and desktop; Sony earbuds and TV; Samsung watch; in other words, it JUST WORKS with pretty much anything out there, no matter who makes it, so I'm not locked inside the Walled Garden. They're locked in a technological prison while claiming to be in an exclusive, gated community.

Filter

Back
Top Bottom