• 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

Stopping music/radio apps from starting up by themselfwhen connected with bluetooth?

I like my Pixel 6A. It works great and much better than I expected. ((It replace a Saumsung S20+5g 512gig that was lost last summer)

I am frustrated that when I connect any Bluetooth sound devices (car, Cardo headset, bluetooth earpiece etc,) that either Spotify or Tunein Radio start up and play music or radio. I use these apps on a regular basis but only want them to come on when I ask them to do so as opposed to them just coming on by themselves.

My Pixel is running Android 13 with the latest updates.

Any idea how to stop this from happening?

Thanks,

..Tom

Taking a screen shot?

I occasionally want to take a screen shot on my new Pixel 7 Pro. The issue is that the method described for so doing, i.e., pressing the Volume Down and Power buttons simultaneously, does not work. I see the Power Off options and the volume goes down. The only thing I have gotten to work is double-tapping the back of the phone.

However, I really don’t like this method. I much preferred the method on my Android 10 phone – hold the power button, then touch the icon. Is there any way to get this functionality on my new phone? Why on earth do the idiots at google change things that have worked perfectly for years?

  • Question Question
Status bar notifications

I am using a Pixel 6. When I get an email, text, FB message...anything really, it drops down for a few seconds and then goes away. There are no longer little icons in the status bar showing me that I have an unread text. So for example, if I'm on FB and I look up for a few seconds and during that time I get a text and the drop down notification goes away before I look back down, I have no idea that I just missed a text. It used to work. I was using Do Not Disturb for a little while but then I turned that off once I read that might be the cause. Still no change. It got the March update yesterday but this was happening before that. The picture shows all I see and then that goes away

Attachments

  • Screenshot_20230401-081318~2.png
    Screenshot_20230401-081318~2.png
    723.7 KB · Views: 200

Support for Android 5.1.1 within present and future Android emulators?

Remember this thread?

The only reason I was able to get Man Of Steel working in that emulator was because it supports Android 5. The game WILL NOT work in ANY Android version higher than that. Believe me, I tried. Furthermore, it requires a Google account to be logged in in order to access its obb files (which I don't understand).

Which is why I have to ask: Will there be continued full support for Android 5 and maybe other old versions of Android within today's Android emulators and hopefully future emulators as well? These three games are the only games that were EVER MADE based on the DC Snyderverse, and I'd like to be able to keep coming back to them time and time again...

Meaning of data fields given by Google Play Store for app download/install statistics

I am downloading data from the Google Play Store console of my app download statistics. It has these fields:

(1) Daily Device Installs,
(2) Daily Device Uninstalls,
(3) Total User Installs,
(4) Daily User Installs,
(5) Daily User Uninstalls,
(6) Active Device Installs

There seems to be no documentation anywhere on Google for what exactly all these fields mean. So I asked ChatGPT, and this is what I got:

  1. Daily Device Installs - This represents the number of times your app was installed on a device in a single day. It includes both new installations as well as re-installations.
  2. Daily Device Uninstalls - This represents the number of times your app was uninstalled from a device in a single day.
  3. Total User Installs - This represents the total number of unique users who have ever installed your app on their device.
  4. Daily User Installs - This represents the number of new unique users who installed your app on their device in a single day.
  5. Daily User Uninstalls - This represents the number of unique users who uninstalled your app from their device in a single day.
  6. Active Device Installs - This represents the number of unique devices that have your app installed and have been used at least once in the last 30 days. This metric can give you an idea of how many devices are currently using your app.

I would like to know from the experts here if the definitions above are all correct, or if some are off.

A second issue: I also seem to see something weird. For all of the past 30 days, the "Total User Installs" field is always zero in my report, though the "Daily Device Install" and "Daily User Installs" are both always showing 2-digit numbers. So why is the "Total User Installs" zero for every day?

The third issue: The "Daily Device Uninstalls" field is also always zero, though the "Daily User Uninstalls" is never zero. Why this discrepancy?

The fourth issue: The "Active Device Installs" on any day should IMO be equal to "Active Device Installs" the previous day, plus "Daily Device Installs" for that day, minus "Daily Device Uninstalls" (which, like I said, is always zero) for that day. It is not even close. Even if I substitute "Daily Device Uninstalls" with "Daily User Uninstalls", the issue is still the same - it doesn't add up.

I will be really grateful for anyone who takes their precious time out to offer me some pointers to all this internally inconsistent data. Thank you!

Help textmessages on Xiaomi Mi 9 are automatically deleted (max. 50)

Hello all,

on my Xiaomi Mi 9, textmessages are automatically deleted.

Example:

I am in an chat-history with one contact, for each new message I am receiving an old message is being deleted.
The maximum quantity of textmessages for this chat-history seems to be 50.

1.) Is it possible to change that setting? How?
2.) Is it possible to restore the messages without having a backup? Probably not :(

MIUI version:
- MIUI Global 12.0.5. stable 12.0.5.0 (QFAEUXM).

Android version:
- 10 QKQ1.190825.002

Thanks for your support!

Samsung color choices... their Lavender is PINK, not purple!

Samsung color choices is rather bland and biggest negative.
samsung-galaxy-s23-ultra-5g-3.jpg

AND... their Lavender is PINK, not purple!!!
Whoever does their colors is color blind!!!
This is what Lavender is suppose to look like.
Lavender.jpg

Other than that, this phone is Awesome. The positive about the color is now I keep a case on it at all times whereas before with the S21+ was so pretty I had the case off half the time and was at risk of dropping the phone.

Help Longest video recording duration without auto stop?

Hello,

What phone is capable to record video (without stopping by itself) and only stops when the user press stop?

What phone are you using and what is the longest duration video recording or video chat without overheating or auto stop?

I know Samsung Galaxy Note 8 will display a your phone is overheating message about 20mins to 30mins during video recording using the default camera app and it will auto stop and auto close the camera app and you need to wait for it to cool down (about minimum 15mins or more) then the camera app can start again. Does newer phones or iphone have this problem?

How long will Samsung A32 5G record before it auto stop (due to a overheating message popup and camera app will auto close)?

Thanks

Eightball.com: AI-Powered Oracle

I've had this domain for awhile and never really did much with it. Seemed like the perfect little side project to tinker with AI:

Right now I've just got "Shakespeare" answering the questions, but I'll be adding more over time. People like King Arthur, Socrates, Mother Earth, etc...

I'm editing the code on the live site, so it may not work perfectly, but let me know what you think!

Lost Whatsap chat

Hi folks. I was hoping someone might be able to help me to recover a very important (to me) Whatsap chat. My Daughter worked in Dubai for 12 years up until 2021. Throughout most of this time, we communicated via Whatsap, with my Daughter sending weekly updates from around the world, including many photos and videos. Throughout this time, my Daughter had a Dubai mobile phone number and I had her in my contacts as "Daughter Dubai". All of this chat was always backed up and I successfully changed phones several times during these 12 years. So I was always comfortable that this unique diary of her adventures and our relationship was safe. Then in 2021, my Daughter moved back to live in the United Kingdom and got a new UK phone number. I entered this in to my contacts and for about 18 months we had a new Whatsap chat using this new number, which I entered in to my contacts as "Daughter England". During these 18 months, I also had the original "Daughter Dubai" chat on my phone, and often scrolled through it if I was looking for a particular photograph etc.

A few weeks ago I remember scrolling back through the new "Daughter England" chat, right to the very start of the chat, and noticed a message that stated that "this person has changed their phone number. You are currently chatting with their new number, Tap to add to your contacts."

I remember that I did tap on the message, but then thought nothing more of it. However I have now noticed that the "Daughter Dubai" chat is no longer visible in my chat list, although the Daughter Dubai contact is still in my phone contacts list, with the Dubai number. So I don't know if clicking on that message has in someway deleted the old "Daughter Dubai" chat, or if it simply attempted to add the Daughter England contact details in to my phone contacts, even though they were already there. Clicking on that link may have had nothing to do with the chat disappearing?

Could my Daughter have done something on her settings that might have caused this?

I have not attempted to reload Whatsap at this stage. I am not sure how the backup procedure works with Whatsap. Does it simply take a snapshot of whatever is present on your phone at that time and therefore effectively overwrite everything that had previously been backed up. If that is the case, then should I assume that if Whatsap has performed a backup in the period since the "Daughter Dubai" chat went missing, then the backup now will not include Daughter Dubai chat?

Any suggestions or advice would be much appreciated.

Thanks Dave

CashMint: Earn Money & Advertise

Attention everyone! We are excited to announce that our new app, CashMint, is officially available for download on the Google Play Store!

CashMint is the ultimate app for those who want to earn money or advertise their services.
Whether you're looking to make some extra cash or promote your business to a wider audience, CashMint has got you covered.

With CashMint, you can easily earn money by watching videos and completing simple tasks. The more videos you watch and tasks you complete, the more coins you earn. And the best part? You can exchange those coins for real cash via PayPal!

But that's not all. CashMint also offers a unique advertising platform, where you can promote your services to a global audience. With a wide range of advertising options available, you can easily reach your target audience and grow your business like never before.

So what are you waiting for? Download CashMint now and start earning money or advertising your services today! Don't miss out on this amazing opportunity to make some extra cash and grow your business. For those who wants to Advertise their Business, increasing App Downloads or Growing their Websites, please make a ticket. App Link : CashMint: Earn Cash&Advertise - Apps on Google Play
Discord Group : Join the CashMint: Earn&Advertise™ Discord Server!

Attachments

  • image1.jpeg
    image1.jpeg
    492.5 KB · Views: 207
  • image2.jpeg
    image2.jpeg
    365.7 KB · Views: 122
  • image3.jpeg
    image3.jpeg
    341.5 KB · Views: 129
  • image4.jpeg
    image4.jpeg
    367.4 KB · Views: 122
  • image5.jpeg
    image5.jpeg
    464.5 KB · Views: 134

New phone ‘complaints’

I just upgraded my phone, something last done 4+ years ago. Two major issues:

Last time I upgraded, Titanium Backup was very useful. I simply back-upped up some apps (primarily small games) on the old phone, restored them to the new phone, and everything was there including the app’s data. Now, there is no way (that I have found and about which I have asked) to move an app’s data from the old phone to the new. This should be trivial, but it does not seem possible.

On the old phone, I used True Phone as my default dialer and kept an older version of the default dialer on the phone for listening to voicemail and blocking/reporting a number as spam. The old version of the default dialer does not work on the new phone, the new version of the default dialer won’t run unless it is the default dialer, and I have yet to find a voicemail app that supports Google Fi.

If anyone with Google is reading this: You darned well better address these two issues because if more people experience these same issues, they may start leaving Android…

Filter

Back
Top Bottom