I am new in Android Development. In the latest version of Android Studio I want to use Material Components for my app. But after implementing its gradle script my Android Studio Designer Preview went black/blank. As you can see in screenshot below.
I have implemented the following line in my build.gradle
implementation 'com.google.android.material:material:1.4.0'
After removing the material components library the preview looks as it should.
I have also tried to restart Android studio as well as my computer.
I just realised that I have used
implementation 'com.google.android.material:material:1.4.0'
instead of
implementation 'com.google.android.material:material:1.4.0-rc01'
Now the issue has been fixed.
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 was automatically updated on my system to to 4.0.1, from version 3.2, however since I found that 4.0.1 had potential bugs, I installed a previous version (3.5.3) and I when opening one of my projects which is only a small simple test project and seemed to take an age loading, the last dialog, I see before it opens is
Title: "Loading Project..."
Body: "Decompiling class CountDownTimer.class
when in previous versions I haven't seen this behaviour and I cant find any "decompiler" options in Settings either and the question is Why is Android Studio decompiling my class files, by default? why would it need to? what is the rationale?
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
I am new to Android studio. I tried to create my first project and there is no project structure only gradle files. What am I doing wrong? I keep getting these files with creation of another new project.
Update SDK via Android SDK Manager. You need all packages in Tools to be installed.
But even after doing so, I can't make it to auto generate resources. So I continue to deal with it...
I found what was my problem. I updated Android studio from version 1.x to 2.x. On official site is written that if you try to install version 2.x into same location Android studio might not work properly and there could be some unexpected behavior.
So just removing Android studio and then reinstaling it, worked perfectly.