Why it leads to runtimeException when creating a new project? - android-studio

I try to create an empty project(generated by idea/android studio). It leads to "Exception in plugin Android support" and the procedure of creating a new project failed.
I try to solve it by changing SDK version(from API24 to API21), disabling Android support, disabling Kotlin Sopport and etc. None of them works.
Do I need to reinstall idea?

Related

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 problems when creating new app

I'm a new mem here and I'm having a problem with Android Studio.
When I start my project with this software, its Interface had currently changed: "Create New Project" instead of "Start a new Android Studio project" likes usual.
And even creating app steps were also not like before. Here are the problem's pictures:
Please help me soon, thank you!
You have accidently disabled Android Support plugin. Re-enable it in Configure -> Plugins, and tick almost every plugin, then OK to restart Android Studio.

Could not find a JavaToKotlinConversionProvider

I'm not able to create a new project in the android studio. I am getting a warning message
java.lang.RuntimeException: Could not find a
JavaToKotlinConversionProvider, even though one should be bundled with
Studio at
com.android.tools.idea.npw.model.JavaToKotlinHandler.getJavaToKotlinConversionProvider(JavaToKotlinHandler.java:56)
at
com.android.tools.idea.npw.template.TemplateValueInjector.addKotlinVersion(TemplateValueInjector.java:410)
Go to Preferences -> Plugins -> Kotlin and update the Kotlin plugin to the last version even though you don't write your code in Kotlin.
I have the same error, I've juste disabled the kotlin plugin and after restarting the IDE, just re-enable it. After that final restart, every thing works fine.
Go to file and the plugin in android studio and update your Kotlin plugin...
I opened an old project (by old I mean another project) and did everything Android Studio said to give me a successful build (I faced some errors when I tried to build the project that I could build couple weeks ago and actually I fixed them, updating gradle and stuff like that, not code issues of course).
After that I could create new project same as before.
Update seems like in order to keep Android Studio happy we have to keep Kotlin plugin enabled, interesting.
I solved this problem by doing this:
File->Settings->Plugins
Click the Installed tab at the top.
Search "kotlin" and click the result that shows up.
Click Enable at the top right
settings>plugins>check Kotlin >Apply then Ok solved it for me.
It occurred due to migration from Android Studio 3.2 to 3.3
Goto File-->Invalidate Caches/Restart
This will solve the problem.

Android Studio 3.1.3 having issues with Constraint layout, Error Failed to find style 'coordinatorLayoutStyle' in current theme

This is the issue i am getting.
Error not rendering issue
i tried all the options available on the web. it is a new installation of studio 3.1.3 and it is happening for every new project as i did not test with any old project as i do not have one.
steps to recreate is to clean installation of android studio 3.1.3 and create a new project. i tried to create multiple projects but same issue.
i tried all the options available on Android Studio 3.1.3 having issues with Constraint layout link but all are failing.
any one let me a studio version name where i will not get this issue. i just wanted to develop a app. and i am not a andriod developer. so these issues are very annoying for me.
Have the same problem. I think it's from Android SDK Platform 28 so I uninstall it, and use Android SDK Platform 27 and it work for me.
To uninstall : Tools> SDK Manager> System setting> Android SDK> Show package detail(little
box on the right below corner)> Put out the check sign from Android SDK
Platform 28 > apply and try new project.
Note : Sorry for bad English.

which method should I add?

I'm new to android studio. I have problem with syncing my project with this title "android studio “Gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly”.
error message:
Gradle DSL method not found :'mavenCentral()'
Possible causes:
.The project may be using a version of Gradle that does not contain the method.
.The built file may be missing a gradle plugin.

Resources