build.gradle

How to use flavors with different app names in Android studio?

*爱你&永不变心* 提交于 2019-12-18 10:48:13
问题 In my app-level build.gradle I have the following flavors: productFlavors { originalFlavour{ } freeFlavour{ } } The thing is building both flavors I get the same App Name. Instead I would like to have different app names for each flavors. Just adding a suffix would be useful. Hope someone could help me. Thanks in advance EDIT : app/src/main/AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="z.fncapps

Force Android Studio to download and install gradle 1.10 or 1.1

坚强是说给别人听的谎言 提交于 2019-12-18 10:34:33
问题 I installed Android Studio 0.5.1 and my project is not working any more. Error it provides is: The project is using an unsupported version of Gradle. Please use version 1.10. I tried to change settings in gradle-wrapper.properties and gradle.build file, but without luck. gradle-wrapper.properties file: #Wed Mar 12 11:11:46 CET 2014 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=http\://services.gradle

Failure on build with Gradle on command line with an android studio project : Xlint error

ε祈祈猫儿з 提交于 2019-12-18 10:08:09
问题 When I try to build an android project with gradle with this command : > gradlew clean build assembleRelease It gives me this error : Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. I can build this project and make the APK in Studio. Is there a way to configure Gradle to make a compilation ignoring Xlint notifications ? OR

Gradle gets unexpected token, compile files

这一生的挚爱 提交于 2019-12-18 09:34:58
问题 What am I doing wrong ? I am referring to this build.gradle compile files('libs/redisson-1.3.2-SNAPSHOT.jar') ls libs/ $ ls libs/ redisson-1.3.2-SNAPSHOT.jar Error * Where: Build file '/myfolder/myproject/build.gradle' line: 162 * What went wrong: Could not compile build file '/myfolder/myproject/build.gradle'. > startup failed: build file '/myfolder/myproject/build.gradle': 162: unexpected token: redisson @ line 162, column 23. compile files('libs/redisson-1.3.2-SNAPSHOT.jar') ^ 1 error *

Executing tasks: [:app:generateDebugSources] in project

佐手、 提交于 2019-12-18 07:04:29
问题 when i start to build my simple application on android studio 3.5.0 , I find this error , what can i do to solve it Executing tasks: [clean, :app:assembleDebug] in project org.gradle.execution.MultipleBuildFailures: Build completed with 1 failures. at org.gradle.initialization.DefaultGradleLauncher$ExecuteTasks.run(DefaultGradleLauncher.java:386) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:402) at org

firebase setup on android

偶尔善良 提交于 2019-12-18 05:56:24
问题 I can't setup the updated version of firebase on android studio. I've created json file of the project on the site firebase and copied it into the project and after coping lines in gradle: buildscript { // ... dependencies { // ... classpath 'com.google.gms:google-services:3.0.0' } } apply plugin: 'com.android.application' android { // ... } dependencies { compile 'com.google.firebase:firebase-core:9.0.1' } // ADD THIS AT THE BOTTOM apply plugin: 'com.google.gms.google-services' I get the

android studio 3.0 Canary 1 : project refresh failed

允我心安 提交于 2019-12-18 05:53:45
问题 I tried to load my project in this new Android Studio 3.0 Canary 1 . It was running perfectly in my previous Android Studio Version 2.4 preview 7 This is the error I am facing: Error:Could not resolve all dependencies for configuration ':sample:devCompileClasspath'. Project :sample declares a dependency from configuration 'devCompile' to configuration 'dev' which is not declared in the descriptor for project :library. My gradle configs are as below: Project Level Build Gradle: buildscript {

android studio 3.0 Canary 1 : project refresh failed

自古美人都是妖i 提交于 2019-12-18 05:52:22
问题 I tried to load my project in this new Android Studio 3.0 Canary 1 . It was running perfectly in my previous Android Studio Version 2.4 preview 7 This is the error I am facing: Error:Could not resolve all dependencies for configuration ':sample:devCompileClasspath'. Project :sample declares a dependency from configuration 'devCompile' to configuration 'dev' which is not declared in the descriptor for project :library. My gradle configs are as below: Project Level Build Gradle: buildscript {

Error:Execution failed for task ':app:mergeDebugResources'. > Some file crunching failed, see logs for details build gradle issues

这一生的挚爱 提交于 2019-12-18 05:44:22
问题 currently I am using Android Studio 2.1 when I run my App it shows me some error in Message Gradle Build saying the following Information:Gradle tasks [:app:clean, :app:generateDebugSources, :app:prepareDebugUnitTestDependencies, :app:mockableAndroidJar, :app:generateDebugAndroidTestSources, :app:assembleDebug] :app:clean :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72221Library :app

Duplicate entry: android/support/design/widget/CoordinatorLayout

南笙酒味 提交于 2019-12-18 05:00:43
问题 I'm trying to create a signed APK, but an error will appear at the end: Error:Execution failed for task ':app:transformClassesWithJarMergingForRelease'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/design/widget/CoordinatorLayout$1.class apply plugin: 'com.android.application' apply plugin: 'com.jakewharton.butterknife' buildscript { repositories { maven { url "https://github.com/omadahealth/omada-nexus/raw/master/release" }