An exception occurred applying plugin request [id: ‘’] while integration Jetpack Compose

I am trying to implement JetPack Compose using Canary 8 but getting this error every time I try to sync gradle

An exception occurred applying plugin request [id: ‘’]

My appbuild.gradle file is below

    plugins {
    id ''
    id 'kotlin-android'

android {
    compileSdkVersion 30
    buildToolsVersion "30.0.0"

    defaultConfig {
        applicationId "com.example.myapplication"
        minSdkVersion 21
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), ''
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    kotlinOptions {
        jvmTarget = '11'
        useIR = true
    buildFeatures {
        compose true
    composeOptions {
        kotlinCompilerExtensionVersion compose_version
        kotlinCompilerVersion '1.4.30'
dependencies {
    implementation 'androidx.core:core-ktx:1.3.2'
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation ''
    implementation "androidx.compose.ui:ui:$compose_version"
    implementation "androidx.compose.material:material:$compose_version"
    implementation "androidx.compose.ui:ui-tooling:$compose_version"
    implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.0-alpha06'
    implementation 'androidx.activity:activity-compose:1.3.0-alpha02'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'

My build.gradle file is below

buildscript {
    ext {
        compose_version = '1.0.0-beta01'
    repositories {
    dependencies {
        classpath ''
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.30"

task clean(type: Delete) {
    delete rootProject.buildDir

and this is my



Android Gradle Plugin 7 requires Java 11.

Go to File > Project Structure and change JDK location to Embedded JDK.


Two dimensional array passed to new Map fails in typescript

Can’t pass two dimensional array to new Map in Typescript:

 const myArray: string[][] = [['DE', 'Germany'], ['AU', 'Austria']];
 const myMap = new Map(myArray);

Fails to me with TS2769: No overload matches this call. Am I doing something wrong here?

TS Version 3.9.9


If you dig through the log, you’ll see an error message of

Target requires 2 element(s) but source may have fewer.

The problem is that ['DE', 'Germany'] gets automatically type-widened to string[] – an array of strings, which may have two elements, or one, or zero – but the Map constructor requires such entry arrays to have at least 2 elements. The type information that the number of items in the array is 2 gets lost.

I’d put the array declaration on the same line as the new Map:

const myMap = new Map([['DE', 'Germany'], ['AU', 'Austria']]);

Another option is

const arr: [string, string][] = [['DE', 'Germany'], ['AU', 'Austria']];

to show that the array actually does have 2 items in it.

Also note that you can’t have a variable name start with a number – start it with something else, probably a letter.

Source: stackoverflow
Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Privacy Policy, and Copyright Policy. Content is available under CC BY-SA 3.0 unless otherwise noted. The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 © No Copyrights, All Questions are retrived from public domain..