build.gradle

Update Android built tool To 18.0

百般思念 提交于 2019-12-12 08:49:02
问题 I used to use Android Built-Tools 17 to build a project, now the tools I have updated to 18.0, Now I change build.gradle : android { compileSdkVersion 18 buildToolsVersion "18.0.1" } when I run this, it was wrong, Gradle: Execution failed for task ':HandyHis:compileDebugAidl'. failed to find Build Tools revision 18.0.0 What should I do? 回答1: Look in the SDK Manager what is your highest Android SDK Build-tools version, and copy this version number in your project "build.gradle" file in the

Multiple Android apps depending on android library with gradle

烂漫一生 提交于 2019-12-12 08:28:39
问题 I am still learning about gradle but from what I have read, I am wondering if this is possible. I have multiple android apps (app1,app2,app3), that depends on a android library (L). The android library (L) would depend on external libraries like volley, and the apps would depend on external libraries like picasso. I dont want multiple copies of library and volley for each app. Here is what I was thinking my folder/gradle structure would look like: app1/ settings.gradle build.gradle src/ com/

How I can display Log files,System.out.println(), In Android test?

大兔子大兔子 提交于 2019-12-12 08:06:14
问题 I did search a lot but unfortunately couldn't get it to work. Based on my search I found that I need to add following code into build.gradle file. However, Gradle seems doesn't recognize it and always says Geadle DSL method not found: test() test { testLogging.showStandardStreams = true testLogging.events("passed", "skipped", "failed", "standardOut", "standardError") afterTest { desc, result -> println "Executing test ${desc.name} [${desc.className}] with result: ${result.resultType}" } }

difference between compile vs compile tree vs compile Files?

荒凉一梦 提交于 2019-12-12 07:59:20
问题 I was trying to integrate my project in android studio. but i am little confused when adding dependencies. I don't know which one is works good.I have tried Compile fileTree and compile files.Its not working for me . I found some methods.can any one tell me which one is appropriate for adding library (jar file only like admob). compile fileTree(dir: 'libs', include: '*.jar') compile 'com.android.support:appcompat-v7:+' compile project(":libraries:libraryname") compile files('libs/libraryname

How to pass multiple parameters in command line when running gradle task?

怎甘沉沦 提交于 2019-12-12 07:32:29
问题 I've got a java and groovy classes that are being run by gradle task. I have managed to make it work but I do not like the way I have to pass the parameters in command line. Here is how I do it currently via command line: gradle runTask -Pmode"['doStuff','username','password']" my build.gradle code which takes these parameters looks like this: if (project.hasProperty("mode")) { args Eval.me(mode)} and then I use my arguments/parameters in my java code as follows: String action = args[0]; //

Trying to make an Android Studio Application with Adobe Creative SDK Image Editing, cannot get libraries compiled in gradle

末鹿安然 提交于 2019-12-12 07:22:46
问题 I've been trying to properly import this library to begin writing an image editing component for my application. I currently have the downloaded 'creativesdk-repo' folder in the root directory, and have followed instructions according to this tutorial: https://creativesdk.adobe.com/docs/android/#/articles/gettingstarted/index.html. And this tutorial as well: https://creativesdk.adobe.com/docs/android/#/articles/imageediting/index.html There are no problems building when I simply use the basic

Android Studio update -Error:Could not run build action using Gradle distribution

痴心易碎 提交于 2019-12-12 07:09:48
问题 I have recently updated android studio to the latest version,but then comes the problem. Gradle 'MyApplication' project refresh failed. Error:Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-2.2.1-all.zip'. Found this in StackOverflow However trying everything nothing works - cannot create new project of import anything at the moment.Please kindly advice. apply plugin: 'com.android.application' android { compileSdkVersion 21

How to push to local and remote Maven repository using uploadArchives?

情到浓时终转凉″ 提交于 2019-12-12 06:32:12
问题 I came across gradle publishToMavenLocal as part of the "maven-publish" plugin which installs a build into the local ~/.m2 folder. Since I am still using gradle uploadArchives I wonder if there is something similar which would allow to choose between local and remote deployment? A manual way to configure the local Maven repository is the following: uploadArchives { repositories { mavenDeployer { repository url: 'file://' + new File( System.getProperty('user.home'), '.m2/repository')

Google Play push notification for app update available is not sent. Am I missing something?

橙三吉。 提交于 2019-12-12 05:09:04
问题 I had published an app on Google Play. According to me I need to change the versioncode in the gradle file everytime I upload the new APK and from there, Google Play does the job of notifying the users about an available update. I am in touch with many real world users who say they never got a notification about app update despite the several updates I had published to the original app. I know that there are certain device level play-store settings such as "Update app only on wi-fi" etc. and

gradle-aspectj: Weaving & ajc compiler options working in compile but not in test task

感情迁移 提交于 2019-12-12 05:01:35
问题 I have set up weaving successfully in Eclipse via the AJDT plugin and in my gradle build via the gradle-aspectj plugin (which took quite some time...). In Eclipse this works both for production and test code, i.e. all tests pass. When I run the gradle build, the resulting app also works fine and I can see that aspects are working as expected. The gradle "test" task however fails as many tests fail. I can track most of the failures back to some aspect (here: for spring transactions) not