Android Studio Run/Debug Configuration Error: Module Not Specified

Android Studio Run/Debug configuration error: Module not specified

never mind, i changed the name in settings.gradle and synced and then changed it back and synced again and it inexplicably worked this time.

Android Studio - Error Module not specified

I should say the files in there are very outdated, and you will have very hard time, with every project. But if you still want to build the project here are a few things you can do.

look for the file gradle-wrapper.properties and update it with this

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip

Then move to project level build.gradle file (there are two one inside app directory and one on the root directory, use the root directory)

buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

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

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

Then move to app level build.gradle and update it with this

apply plugin: 'com.android.application'

android {
compileSdkVersion 30
defaultConfig {
applicationId "com.allyourcode.a02_01"
minSdkVersion 15
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:2.0.4'
testImplementation 'junit:junit:4.13.1'
}

And then sync the project and let Android studio do its magic.

Module not specified?

Are you sure you are opening the project as android gradle project ?
Try to import the program not open it



Related Topics



Leave a reply



Submit