Generate Signed APK not active in build menu android studio!
The problem is happened because you're using an incorrect version of Android Gradle plugin. There is no version 3.2.1 yet. So, change your project/root build.gradle with version 3.2.0 (take a look Android Gradle plugin release notes for more details):
buildscript {
repositories {
google()
...
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
}
}
Then sync your project after the changes.
Make sure that your project build without any error. And Whenever you open Project Level Gradle then Generate Signed Apk , Select Build Variant Options are not available.
Related
I am running Android Studio 3.4.1 and I'm trying to build a bundle.
Build -> Build Bundle(s) / APK(s) -> Build Bundle(s)
And here is what I see:
When I click Update, the dialog dismisses and absolutely nothing happens. I have tried several times.
I also have this:
I am very new to Android Studio, but my simple app is complete and ready to deploy to the Google Play Store. Is there some alternate way to build a bundle? Am I missing something?
First make sure in your current plugin google() is included.
buildscript {
repositories {
// Gradle 4.1 and higher include support for Google's Maven repo using
// the google() method. And you need to include this repo to download
// Android Gradle plugin 3.0.0 or higher.
google()
...
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
}
}
Second - Update values in distributionURL gradle-wrapper.properties and sync
distributionUrl = https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
distributionUrl path could be found at following path
I have a project loaded in Android Studio 3.0. Gradle sync works fine, and the project builds.
When I add implementation 'com.amazonaws.aws-android-sdk-mobile-client:2.6.+' to my build.gradle (Module:app) file, right next to all the other dependencies that are already part of this fine project, gradle fails to find that dependency. Many of the existing project dependencies are under com.amazonaws.aws-android-sdk-* and are being sync'ed just fine, for e.g. implementation 'com.amazonaws:aws-android-sdk-core:2.6.+' is fine.
So I double check that new project dependency actually exists, browsing http://repo.maven.apache.org/maven2/com/amazonaws/aws-android-sdk-mobile-client shows it exists, I don't see a typo.
Looking at my build.gradle (Project: myProject), I see the following
allprojects {
repositories {
mavenCentral()
google()
jcenter()
}
}
Yet when gradle syncs i get
Unable to resolve dependency for ':app#debug/compileClasspath': Could not resolve com.amazonaws.aws-android-sdk-mobile-client:2.6.+:.
Could not resolve com.amazonaws.aws-android-sdk-mobile-client:2.6.+:.
Required by:
project :app
No cached version of com.amazonaws.aws-android-sdk-mobile-client:2.6.+: available for offline mode.`
There is a typo in your dependency.
Use
implementation 'com.amazonaws:aws-android-sdk-mobile-client:2.6.+'
instead of
implementation 'com.amazonaws.aws-android-sdk-mobile-client:2.6.+'
uncheck "Offline Work" in Android Studio / File / Settings / Build, Execution, Deployment / Gradle
Has anyone solved this issue?
kotlin version that is used for building with gradle (1.1.2-5) differs from the one bundled into the IDE plugin (1.1.2-4)
I am using AS 3.0 Canary 4
I followed Miha_x64's advice and upgraded the plugin which solved my problem:
Tools -> Kotlin -> Configure Kotlin Plugin Updates -> Check for updates now
My version of Android Studio is:
Android Studio 3.0.1
Build #AI-171.4443003, built on November 9, 2017
In my case, I converted Java to Kotlin and I have already Kotlin installed with lower version. So I updated it.
Tools -> Kotlin -> Configure Kotlin Plugin Updates then Check for updates now then choose Stable
.
But it didn't update my version in the build.gradle file automatically. Because it detected a newer version and differs from the old one.
So I manually updated my version to the latest from
ext.kotlin_version = '1.0.0' to ext.kotlin_version = '1.2.41'
buildscript {
ext.kotlin_version = '1.2.41'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
There's an issue in Android Studio 3.0 Canary 4 that prevents it from loading the updated version of the Kotlin plugin. You can ignore the warning shown by the Kotlin plugin in build.gradle until a newer version of Android Studio 3.0 is released.
I also had the same issue, I am using Android Studio 3.2.1
Change the Kotlin version of your project build.gradle file(not module build.gradle file) to latest(at the moment it is 1.3.11)
ext.kotlin_version = '1.3.11'
then there will be notification call Kotlin migration, click Run migrations link on the notification.
Go to plugins then uninstall kotlin then restart ide then once android studio is back up drop down tools then select kotline then configure updates, it should be checking for new updates.
add this in your build gradle app
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
[![In my case I had to downgrade to Gradle 7.2.2
]1]1
I recently updated Android Studio from version 2.1 to 2.2 and my previously working project has major build errors, centering around a "gradle failed to sync" message I got when opening the project for the first time in version 2.2
It seems that some update occurred to gradle when I did the Studio upgrade to version 2.2, and this update has broken my old project's references (I think). All editing/debugging/simulation features aren't usable within Android Studio when I open this project. What did I do wrong when upgrading, and more importantly how can I fix my broken project and restore full Android Studio functionality while editing this project like I had when running version 2.1.
In the image below you will notice i'm getting a message about a VCS root misconfiguration and all of my toolbar buttons (run, debug, etc) are grayed out.
What can I do to fix this?
I've included my build.gradle file below
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'
}
}
allprojects {
repositories {
jcenter()
}
}
Same configuration should work.
click on configure VCS(the popup in right side).And to enable Run, Debug etc options, select module(android app module)to run from dropdown option(in left of run option).
For Instant Run to work , update Gradle to 2.2.0-beta3 or higher.
This project has been working for weeks. Yesterday, Android Studio pulled in some updates, and now gradle cannot find my play-services files. It has literally stopped building with no changes to the project - I didn't think this would happen with a gradle-based project.
gradle sync error
When I click on "Install Repository and sync project", another window opens with the message:
Ignoring unknown package filter 'extra-google-m2repository'Warning: The package filter removed all packages. There is nothing to install.
Please consider trying to update again without a package filter.
Here is my gradle file:
apply plugin: 'android-library'
repositories {
mavenCentral()
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
}
}
dependencies {
compile 'com.android.support:appcompat-v7:20.0.+'
compile 'com.android.support:support-v4:20.0.+'
compile 'com.google.android.gms:play-services-games:6.5+'
compile 'com.google.android.gms:play-services-plus:6.5+'
compile 'com.google.android.gms:play-services-appstate:6.5+'
}
android {
compileSdkVersion 20
buildToolsVersion '20'
}
Looking in my SDK manager, both "Google Repository" and "Android Support Repository" are installed.
SDK manager screen shot
It is possible that I have two different SDK's, but not sure how to tell if I do, and not sure how to remove the extra one if this is the issue.
Removing the "+" and specifying the specific version allows me to build again. I'm actually using 6.5.87, as 8.4.0 caused some other issue.