React Native project error in Android Studio - android

Well i am having trouble recently while importing the android directory of a react native project to android studio.
It used to work well before but now its throwing This version of the Android Support plugin for IntelliJ IDEA (or Android Studio) cannot open this project, please retry with version 4.2 or newer.
any way to fix this?
Thanks in advance

In Android view under Gradle Scrips, change two files, then re-sync gradle.
build.grade (Project):
classpath("com.android.tools.build:gradle:4.0.1")
gradle-wrapper.properties:
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip
I just encountered the same issue and solved it using the above fix. You may find this thread useful as well: Android Support plugin for IntelliJ IDEA (or Android Studio) cannot open this project

Related

Plugin incompatible with the new build found: Kotlin

I was going to upgrade from Android Studio Bumblebee to Android Studio Dolphin. However, I seem to get an unexpected warning from Android Studio:
As you can see the text in red, it shows that newer Android Studio's build does not support Kotlin! However, in details of Android Studio Dolphin, and image shows Kotlin files being programmed, which means Android Studio Dolphin's build actually supports Kotlin:
Should I update or not, and how should I fix this error, as I am a Kotlin Programmer.
Can somebody please help? Would appreciate it.
Edit
As for the Kotlin version, I have the latest Kotlin Version already:
Full answer:
I faced with the same issue and after research I found people say that reinstalling Kotlin plugin or removing it and update Studio should solve the issue, because Dolphin already includes the Kotlin plugin by default.
BUT For sure you should NOT remove the Kotlin plugin, because otherwise Android Studio will fail launching and after that you need to find on your PC the file named 'disabled_plugins.txt' and remove from it Kotlin. OR completely remove Android Studio and reinstall it from the scratch.
Personally I ignored this issue and just updated the Studio. Works well and Kotlin plugin installed. Also I noticed that before update I had Kotlin version 1.7.10 and AS didn't ask for update the plugin. After update I've got 1.7.20.
Good luck :)

why can't I use my android studio 2.3 Instant run features?

My AS is 2.3 official version
and I already open the Instan run on the settings
but it can't use,and the lightning symbol is always not light,just like this
I don't why this is,who has other ideas?
Make sure the Android Gradle plugin is version 2.3.0 and Gradle is version 3.3.
Else it wont work. Android studio should tell you that by default. Normally when you open your project or after a clean build.

Android studio 2.3: Could not initialize class org.jetbrains.kotlin.android.actions.NewKotlinActivityAction

I have just updated Android studio 2.2.2 to 2.3 from the canary channel. After downloading completed and applying path file, the android studio is restarting.
But after restarting android studio I am getting below error with dialog:
Cannot load project:
com.intellij.ide.plugins.PluginManager$StartupAbortedException:
com.intellij.diagnostic.PluginException: Could not initialize class
org.jetbrains.kotlin.android.actions.NewKotlinActivityAction [Plugin:
org.jetbrains.kotlin]
See below screenshot for to get more idea:
After closing dialog by ok and restarting android studio, also I can't able to open my project or creating new project.
Does anyone is facing same issue after updating android studio?
Disable the Kotlin plugin and restart Android Studio. I had the same error even after I updated the plugin. So disabling seems to be the solution for now -- unless you're using Kotlin, I guess.
The Kotlin team confirmed a fix is in the works via twitter: https://twitter.com/kotlin/status/797111726516879360
The issue is fixed in Kotlin plugin version 1.0.5-2.
Issue is fixed in new update of Kotlin, you can update your plugin from
Configuration>Plugin>Install JetBrains Plugin>Select "Kotlin" from List and hit "Update" from right menu
Updating the 'ext.kotlin_version' on root build.gradle to the latest fixed the issue for me. Use this link to find the latest kotlin version.
This happened to me just today after updating my Kotlin's plug-in verison from 1.1.51 to 1.1.60. I had to uninstall this version from Settings > Pluings in Android Studio and install the previous one, which can be downloaded from JetBrains plug-ins repository.
If you're using Android Studio 3.0, you don't need to install the previous version of the plug-in again since version 1.1.51 is built-in in Android Studio.

Migrating to Android Studio including libpd

With the release of Android Studio 1.0 (AS) i want to migrate from Eclipse. Generally I need no other library then libpd (PureData) for Audio synthesis. The Problem is, that libpd for android is geared to the needs of Eclipse. So in Eclipse everything is working as expected.
The only information I could found was that: Using libpd in Android Studio So I know libpd and Android Studio could work together but here are maybe some other problems.
I started to generate a new simple project (MinSDK 10 - CompileSDK 21 - BuildTools 21.1.2) just with a blank activity. I can deploy this simple app to my Nexus and everything is fine.
Then I import :PDCore and :AndroidMidi as Module into my AS project and I get the Gradle build-error: Error:The SDK Build Tools revision (17.0.0) is too low for project ':PdCore'. Minimum required is 19.1.0
I installed API 19 and Build Tools version 19.1 via the SDK Manager but that's not solving my problem.
I changed the buildToolsVersion of the apps build.gradle file to "19.1.0" but that's not solving my problem.
Any advices to get Gradle working probably?
Maybe anyone got a sample Android Studio project with libpd to share?
Thanks in advance!
FYI: I wrote some posts regarding migrating to Android Studio using libpd. Take a look here:
http://www.journal.deviantdev.com/using-libpd-with-android-studio/
http://www.journal.deviantdev.com/update-using-libpd-with-android-studio/
http://www.journal.deviantdev.com/sample-libpd-android-studio/
You have to change the build.gradle of the :PDCore and :AndroidMidi modules. At the moment they are using 17, update the BuildTools to the newest version (21.1.2). This should solve your problem.
I created a fork of the libpd-for-android and migrated it to Android Studio. You can clone it and open it in Android Studio as a 'Non Android Studio Project'. This worked very nicely for me and you can also now created an .aar file and use it in your Android App ( instead of copying the whole code or using git submodules):
https://github.com/tkirshboim/pd-for-android

IntelliJ 12 Android and Gradle

Is it possible to use IntelliJ 12 (12.1.6 Ultimate) and Gradle to build Android projects? I can't find any information on doing so outside of Android Studio.
I can get my APK to build just fine, but IntelliJ doesn't seem to pick up the dependencies downloaded by Gradle. I know they're downloaded as I can see them in my cache folder.
Switching from the android plugin to the java plugin works just fine.
I don't think it's possible, as Android Studio is based on IntelliJ 13 (EAP).

Categories

Resources