Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exception: Unsupported Android Plugin version: 4.1.2

I know this might have been asked before, I have recently installed Solus Linux on my computer and I am trying to get Andoird Studio working on it for some time, so far I am not having any luck. First Issue - I am not able to add Flutter to the PATH Second Issue - I am getting this error when running the project enter image description here

Could somebody here help me with both issues?

like image 226
Sumchans Avatar asked Mar 10 '21 05:03

Sumchans


Video Answer


4 Answers

Maybe it can help future devs. I had similar problem with the exception

Unsupported Android Plugin version 4.1.3

In my case I had to specify build flavor for the app:

flutter run --flavor <flavor-name>

then it worked

like image 112
winqoo Avatar answered Nov 01 '22 17:11

winqoo


enter image description here

Doing this solved my problem

  • Added dev as Build flavor
  • Added --debug as Additional build args
like image 31
Rishabh Anand Avatar answered Nov 01 '22 16:11

Rishabh Anand


I think at the moment, there is a problem of incompatible version.

Reference: from this thread

To fix it, I revert back Android Plugin from 4.1.2 to 4.1.0.

Modify the root build.gradle:

buildscript {
  ext.kotlin_version = '1.4.20'
  repositories {
    google()
    jcenter()
}

dependencies {
    classpath 'com.android.tools.build:gradle:4.1.0'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    ...
  }
}

Note: I, currently, use Gradle 6.7

like image 35
Tô Minh Tiến Avatar answered Nov 01 '22 16:11

Tô Minh Tiến


In my case, I had to edit my configuration settings:

  1. go to "Edit configurations"
  2. choose the config you're trying to run
  3. fill in the "Build flavor" accordingly

Worked for me

like image 22
ArtemNovikov Avatar answered Nov 01 '22 17:11

ArtemNovikov