why in android studio 3.6.2 RecycelerView Does not work? - android-studio

I updated Android Studio to version 3.6.2 and after adding the RecycelerView, I realized that it is not displayed in the design tab!

There are various reasons for Design tab fail to render layouts.
Try changing the API levels in the design views.
Clean build your project by going to Build > Clean build
Ensure you don’t have any file from SDK that is missing
Still if android studio is not able to render your layout then try by going File > Invalidate Cache/Restart

Related

android studio dos not show GUI xml designing after update

i did an update of android studio or android studio plugins and the ide stopped showing xml view designer and the component tree thinks that there's nothing to show.
i tried to sync and rebuild and clean the project and to restart the ide and it still dose not solve the problem.
this is not the first time it happens to a project and i can't work more on the xml view of that project
what can i do to solve the problem ?
thanks

How to configure an iOS Application for Kotlin Multiplatform in Android Studio?

I want to add a Run/Debug Configuration for an iOS Application for a Kotlin Multiplatform Mobile application in Android Studio 4.1.2. However, there seems to be a problem with the configuration for iOS.
In the screenshot below you can see the problem. In the dialog "Run/Debug Configuration" Android Studio complains about
Error: Please specify Xcode project location in xcodeproj property of gradle.properties
Using the "Fix" button does not solve the problem. Android Studio just adds an additional xcodeproj to gradle.properties and the complains about a duplicate parameter.
I also tried different paths (relative and absolute) for xcodeproj. No luck.
If I remember correctly, it used to work out of the box. A new Kotlin Multiplatform Mobile project was automatically configured for Android and iOS. I'm not sure what changed. Probably something was updated.
Is this a bug with the KMM plugin? Or is there something I can do on my system to fix this?
don't do that with Android Studio.
Just open Xcode, click on 'open another project...', locate to the iosApp folder that named it when creating your project on Android Studio.
after that, just click run and have fun.
If the project doesn't run right away even on opening it from Xcode and shows the shared framework is missing, Then try generating the shared framework for iOS platform using terminal. Navigate to the project folder and execute
Command: ./gradlew packForXcode
Now the shared framework should have a xcode-frameworks product and you should be able to build and run the project through Xcode.
I fixed it by downgrading the Kotlin version from 1.4.30 to 1.4.21. You can check this thread here. To downgrade, download the version you want from the plugin store and choose the install plugin from disk as in the picture below
Upgrading Android Studio version to 4.2.1, KMM plugin version to 0.2.6, creating new KMM project with KMM plugin, the problem can be fixed automatically.
If you don't wanna use Xcode:
Look like there is some IDE issues in this versions, one option would be to downgrade the Kotlin version.
What worked for me was to download the latest Canary Android Studio and setup my KMM project there.
Hopefully soon this will be stable for the next versions
Same as here: https://stackoverflow.com/a/66941077/3117650
Look like there is some IDE issues in this versions, one option would be to downgrade the Kotlin version.
What worked for me was to download the latest Canary Android Studio and setup my KMM project there.
Hopefully soon this will be stable for the next versions

Android Studio: Change inspection profile for one specific module in project

I have several modules in Android Studio project, and I would like to change inspections settings for one of these modules. More precise, I want to turn off all Android-related inspections in one module, but leave all general Java inspections in place.
I need this because I have a not Android-specific Java library module, and that module uses java.util.Properties, and it's load method was implemented in Android API level 9. Since that library is not Andoid stuff, I have not specified Android API level at all, and Studio warns me about that.
It offers adding Android annotation to ignore that inspection, but adding Android dependency to turn off Android warning seems bad.
I can edit the settings to shitch that warning off, but I don't want to turn API level warnings in the whole project.
As I found, in settings you can specify inspection setting either globally or for whole project, not for specific module.
Is there a way to change inspections settings for one module, or do some hack around?
I am using Android Studio 1.3.2.
The Studio should automatically understand that the Java module has nothing with Android, and stopped Android inspections (but they were not disabled, though): I went fix something in the code, rebuilt it several times, and when I returned to warning line, it was clean.
So, I don't actually know what's going on,
but I got some recomendations, that should help:
Sync your Gradle project, it will try to rebuild the project. Some dependencies and settings will only resolve after Gradle will do something internal.
If Gradle will fail, there might be errors in code that ruins interspections. Try to solve them.
If your project history is stored in VCS, try checkout the latest clear version and sync project again.
Check changes in .iml files manually. For some reason, Studio sometimes does weirds edits there, and if I rollback some of them, Studio works better.
Actually you can disable particular inspections being made by Android Studio. However this needs to be on all projects you have in Android Studio, and cannot be done in all modules you are currently developing.
To disable android inspections on your projects follow these steps:
Click on the File menu and Select Settings
Expand the Editor root node select Inspections
There you will have all the inspections which Android Studio checks when building a project (image below). You can expand the Android node and check what you wish to remove from your inspections.
Hope this helps :)

Device doesn't render in Design tab, Android Studio 1.4

I have a problem with my Android Studio I just updated.
There is no device renders in the design tab, even if I create just a blank aka 'hello wolrd' activity as you can see on this screenshot.
I am absolutely sure I have no running background tasks, my Gradle build is finished. I tried to clean up and then to rebuild project, nothing changes. Am I missing anything?
P.S. I had no problems rendering device on Android Studio 1.3.
Ok, I got it.
I had to update my SDK to 23st version and choose this version while rendering device.
Very simple and truth be told obvious way.

Android Studio Project Structure screen looks broken

I am migrating a project to the latest android studio and the project structure screen looks rather broken. E.g. I need to configure the usage of Gooogle APIs API Level 19 and cannot do that.... how could I fix that? Could it be my project contains some broken android studio metadata or so?
I believe your Project Structure to look fine. This is the latest Android Studio (0.5.4).
When you click on Modules tab you should be able to change to the latest SDK.

Resources