Skip to main content

Working in Android Studio when attempting to run a project I had the following error

Unable to determine application id: com.android.tools.idea.run.ApkProvisionException: ERROR: APK path is not specified for module "android"

 

Tools

Tool Version
Android Studio Chipmunk | 2021.2.1
OS OSX - Big Sur 11.6.7
Ionic CLI 6.20.1
Node 18.0.0
Cordova cli: 11.0.0

 

Approaches to resolving this issue

Rebuild project

First, rebuild the project

Build > Rebuild project

Try running your project again.  Unfortunately, this didn't resolve the problem.

 

Invalidate Caches

To Invalidate Caches use the following path:

File > Invalidate Caches...

Then check
Clear file system cache and Local History
Clear VCS Log caches and indexes

Finally, click Invalidate and restart

 

Check the Gradle version running

Check your Gradle version by executing the command

grade -v

Response not found.   Hmmm, I should have checked this issue at the start.

Using Homebrew is the package manager for macOS.

brew install gradle

Once you have installed Gradle.  Check the version again and this time the response was

------------------------------------------------------------
Gradle 7.5
------------------------------------------------------------

Build time:   2022-07-14 12:48:15 UTC
Revision:     c7db7b958189ad2b0c1472b6fe663e6d654a5103

Kotlin:       1.6.21
Groovy:       3.0.10
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          18.0.1.1 (Homebrew 18.0.1.1+0)
OS:           Mac OS X 11.6.7 x86_64

 

Sync Project with Gradle

If the original issue remains and now that you know Gradle is installed synchronise the project with Gradle.  Do this by selecting

File > Sync Project with Gradle Files

 

Related articles

Andrew Fletcher16 Aug 2022

How to handle a lost KeyStore password in Android?

If you have a situation where either you have forgotten a Keystore password or change of developers and the password wasn't sent across.... what to do?  However, your app lives on and needs to be updated!   Possible solutions grade.properties This is a great starting point....
Andrew Fletcher08 Aug 2022

How to update package.json dependencies to the latest version?

This article works through the steps to update dependencies in package.json file to the latest version. Use npm-check-updates or npm outdated to suggest the latest versions. npm-check-updates is a utility that automatically adjusts a package.json with the latest version of all...