Archiee
Archiee

Reputation: 91

gradlew run in terminal gives Run Task not Found

I am currently experimenting with a mobile java Project, it's a google ar core , you can check it's Git Repository here : GoogleArcore

I managed to run the app successfully while using android studio.

I cloned this project and opened it with vscode, and run

./gradlew clean build

this goes as expected!!

Problem: : running ./gradelw run gives bellow error :

run task is not found in the root project

any approach to solving this !!?

Upvotes: 0

Views: 1358

Answers (2)

Archiee
Archiee

Reputation: 91

This is the plugin needed to have run task available !

// root build.gradle
plugins {
    id('application')
}
  • Now re-running ./gradlew build does add the run task, provided by the plugin above .

Upvotes: 0

Pexers
Pexers

Reputation: 1200

Just add this code to your build.gradle file:

plugins {
    id 'com.android.application' 
}

The com.android.application plugin already includes the task run, so your error should be fixed.

For more information regarding this plugin, read the official documentation here (Android), and here.

Upvotes: 1

Related Questions