build.gradle

Configuration with name 'default' not found error on Android Studio

跟風遠走 提交于 2019-12-02 06:28:31
问题 I am trying to test to reference without copying a library Project. So I created two projects one is ProjectA and one is LibraryA . Both projects are located inside the \StudioProjects folder. I am trying to reference LibraryA from ProjectA and I get the error at the title. Here is settings.gradle from ProjectA include ':app' include ':LibraryA' project(':LibraryA').projectDir = new File('../LibraryA') Here is dependincies from app build.gradle of ProjectA dependencies { compile fileTree(dir:

Configuration for Gradle 4.7 to generate the HTML report for JUnit 5 tests

ⅰ亾dé卋堺 提交于 2019-12-02 06:06:31
I have an app based as follows: Spring Framework 5.0.4.RELEASE Gradle 4.7 - multimodule project configured through JUnit 5.1.1 The configuration about Gradle with JUnit is in the build.gradle file located in the root module: ... subprojects { apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'org.junit.platform.gradle.plugin' sourceCompatibility = '1.8' targetCompatibility = '1.8' repositories { jcenter() } ext { ... junitVersion = '5.1.1' ... } dependencies { ... //Testing ... testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion" testCompile "org.junit.jupiter:junit

How to fix “build.gradle” problem in a Cordova project?

柔情痞子 提交于 2019-12-02 05:55:14
问题 $ cordova build android --debug Checking Java JDK and Android SDK versions ANDROID_SDK_ROOT=undefined (recommended setting) ANDROID_HOME=E:\andoidSDK (DEPRECATED) Subproject Path: CordovaLib Subproject Path: app > Configure project :app WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html Project evaluation failed

How to restore build.gradle and .Gradle folder

帅比萌擦擦* 提交于 2019-12-02 05:36:42
When I was trying to solve an issue with Android Studio I accidentally deleted .Gradle folder at the top of the project and build.gradle from within the app. I will post a screen shot of my project in Android Studio. The build tab also produces "make module my app project name" and "deploy module to app engine". The usual clean project, rebuild.... are not there. How can I restore them? If your are not using a VCS: try use the local history to recovery the build.gradle file in your root folder (right click on the root folder) If it fails. you can create a new project and copy the build.gradle

Android gradle: Sharing dependencies between product flavors

馋奶兔 提交于 2019-12-02 04:52:22
I have 3 product flavors (flavor1, flavor2, flavor3) in my app. flavor1 and flavor2 share some of the dependencies related to ads. Is there a way to bundle the ad related dependencies to a gradle dimension or configuration and add that to flavor1 and flavor2 without duplicating the compileFlavor1 and compileFlavor2 lines in my build.gradle? This is part of my current gradle. This works. But, I'm wondering if there is a better way to do this? So, I don't have to repeat the ad dependencies for each flavor. android { productFlavors { flavor1 {} flavor2 {} flavor3 {} } sourceSets { main {} flavor1

How to run a Gradle task with different parameters

断了今生、忘了曾经 提交于 2019-12-02 04:35:09
问题 I'd like to define a task in gradle (called gen ) that runs the gradle task jar but with a fix value for baseName . I also want the original task jar to be available afterwards. My Problem is, that I can't transfer the setting for manifest. I tired e.g. def mainFile = 'com.so.proj.App' def filename = 'something' jar { baseName filename manifest { attributes 'Main-Class': mainFile } } task gen (type: Jar) { description "Generates JAR without version number." doFirst { //archiveName = jar

getting an issue while archiving opentok audio/video chat

僤鯓⒐⒋嵵緔 提交于 2019-12-02 04:32:29
I am trying to configure audio/video chat and archive audio/video chat with OpenTok API. I have successfully configure audio/video chat with OpenTok but unable to perform archive. Getting following issue: Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'. java.util.zip.ZipException: duplicate entry: org/apache/commons/collections/ArrayStack.class This is my library: Following are my dependencies: dependencies { //compile project(':androidConferenceWebRTC') compile project(':countryPicker') compile project(':customEmoji') compile project(':sugar') compile fileTree(dir:

Is Gradles `jar` a method?

妖精的绣舞 提交于 2019-12-02 04:24:35
I'm using the Java Plugin in Gradle apply plugin: 'java' I also configure the Jar-task using: version = '1.0' jar { manifest { attributes 'Implementation-Title': 'Gradle Quickstart', 'Implementation-Version': version } } If I understood it right, jar is a method which is called with a closure as the parameter. But where is this method documented? I my understandung it schuld be a method of Project. I couldn't find it in https://docs.gradle.org/current/userguide/java_plugin.html and https://docs.gradle.org/current/dsl/org.gradle.api.Project.html and https://docs.gradle.org/current/dsl/org

Guava Dependency Breaking Jar Built With Kotlin

寵の児 提交于 2019-12-02 04:03:44
问题 Issue The Java/Kotlin application runs as expected in from the Main Class in IntelliJ's IDE. However, when the app is built into a .Jar file the following error occurs: java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors . This is an issue with refactoring the directory, module, root project, and/or group names. Reproducing Error I've moved the project to a new directory path and everything runs as expected. However, after I attempt to modify the directory, and/or

Android Studio Manifest merger failed minSdkVersion Error

蹲街弑〆低调 提交于 2019-12-02 03:26:07
I am trying to add a dependency in my app which has the minimum sdk version newer than my apps so I am getting the following error Error:Execution failed for task ':app:processDebugManifest'. Manifest merger failed : uses-sdk:minSdkVersion 9 cannot be smaller than version 14 declared in library Suggestion: use tools:overrideLibrary="com.nononsenseapps.filepicker" to force usage but I don't know where to add that suggestion so I can build it. This is how my build.gradle(Module: app) looks right now apply plugin: 'com.android.application' android { compileSdkVersion 21 buildToolsVersion "21.1.2"