skip to Main Content

Building with sound null safety

FAILURE: Build failed with an exception.

  • Where:
    Build file ‘C:WordpressAppmain_filessourcewordpress_appandroidappbuild.gradle’ line: 24

  • What went wrong:
    A problem occurred evaluating project ‘:app’.

Plugin with id ‘com.android.application’ not found.

  • Try:

Run with –stacktrace option to get the stack trace.
Run with –info or –debug option to get more log output.
Run with –scan to get full insights.

BUILD FAILED in 1s
Running Gradle task ‘assembleRelease’… 2,412ms
Gradle task assembleRelease failed with exit code 1

  • I am using following tools for flutter app development *
    Android Studio Chipmunk | 2021.2.1 Patch 1
    Build #AI-212.5712.43.2112.8609683, built on May 18, 2022
    Runtime version: 11.0.12+7-b1504.28-7817840 amd64
    VM: OpenJDK 64-Bit Server VM by Oracle Corporation
    Windows 10 10.0
    GC: G1 Young Generation, G1 Old Generation
    Memory: 1536M
    Cores: 4
    Registry: external.system.auto.import.disabled=true
    Non-Bundled Plugins: org.jetbrains.intellij.scripting-javascript (1.0), com.intellij.javafx (1.0.4), org.jetbrains.kotlin (212-1.6.21-release-334-AS5457.46), Dart (212.5744), idea.plugin.protoeditor (212.5080.8), io.flutter (68.1.2)
buildscript {
    ext.kotlin_version = '1.6.0'
    repositories {
        google()
        jcenter()
    }

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

allprojects {
    repositories {
        google()
        jcenter()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

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

2

Answers


  1. hello i think the problem that you have 2 subprojects block try to delete one and the other like this :

    
    rootProject.buildDir = '../build'
    subprojects {
        project.buildDir = "${rootProject.buildDir}/${project.name}"
        project.evaluationDependsOn(':app')
    }
    
    Login or Signup to reply.
  2. Please check android/app/build.gradle

    and see if this is existing there.

    apply plugin: 'com.android.application'
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search