Failed to resolve: com.android.support.design:25.4.0

Important: The support libraries are now available through Google’s Maven repository. You do not need to download the support repository from the SDK Manager. For more information, see Support Library Setup. Step 1: Open the build.gradle file for your application. Step 2: Make sure that the repositories section includes a maven section with the “https://maven.google.com” … Read more

Gradle task – pass arguments to Java application

Gradle 4.9+ gradle run –args=”arg1 arg2″ This assumes your build.gradle is configured with the Application plugin. Your build.gradle should look similar to this: plugins { // Implicitly applies Java plugin id: ‘application’ } application { // URI of your main class/application’s entry point (required) mainClassName=”org.gradle.sample.Main” } Pre-Gradle 4.9 Include the following in your build.gradle: run … Read more

Gradle tasks are not showing in the gradle tool window in Android Studio 4.2

OK, I found why I got this behaviour in android studio 4.2. It is intended behaviour. I found the answer in this post: https://issuetracker.google.com/issues/185420705. Gradle task list is large and slow to populate in Android projects. This feature by default is disabled for performance reasons. You can re-enable it in: Settings | Experimental | Do … Read more

com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/maven/com.fasterxml.jackson.core/jackson-databind/pom.xml

Instead of this packagingOptions { exclude ‘META-INF/LICENSE’ exclude ‘META-INF/NOTICE’ } try this packagingOptions { exclude ‘META-INF/DEPENDENCIES.txt’ exclude ‘META-INF/LICENSE.txt’ exclude ‘META-INF/NOTICE.txt’ exclude ‘META-INF/NOTICE’ exclude ‘META-INF/LICENSE’ exclude ‘META-INF/DEPENDENCIES’ exclude ‘META-INF/notice.txt’ exclude ‘META-INF/license.txt’ exclude ‘META-INF/dependencies.txt’ exclude ‘META-INF/LGPL2.1’ } and more thing Remove this line apply plugin: ‘com.google.gms.google-services’ from Bottom and add to Top after this apply plugin: ‘com.android.application’. … Read more