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 Fletcher31 Oct 2023
Android icon not changing
If the Android app icon is not changing from the default icon (in my situation this was the Capacitor icon), here are some steps to troubleshoot and resolve the issue: Check the Icon FilesEnsure that you have provided the correct icon files in the appropriate directory. In a Capacitor project,...