草庐IT

Gradle-only

全部标签

android - 根据 buildType 用 gradle 覆盖资源

我想用gradle覆盖我的res/strings.xml中的一些字符串。我知道sinceAndroidGradlePlugin0.7.+有可能有一个变体特定的源文件夹。但是我的应用程序有很多口味,我不想添加额外的变体特定文件夹。2014年1月17日更新我想要的详细信息:我的资源中有一些变量仅取决于buildType(例如“release”)。首先,我认为我的SOLUTION_1(资源合并后覆盖数据)很好,因为如果我必须更改这些变量,我只需在build.config中更改它们(只有一个地方)。但正如ScottBarta在下面的评论中所写,有一些很好的理由说明这个解决方案不是一个好主意。所

android - 根据 buildType 用 gradle 覆盖资源

我想用gradle覆盖我的res/strings.xml中的一些字符串。我知道sinceAndroidGradlePlugin0.7.+有可能有一个变体特定的源文件夹。但是我的应用程序有很多口味,我不想添加额外的变体特定文件夹。2014年1月17日更新我想要的详细信息:我的资源中有一些变量仅取决于buildType(例如“release”)。首先,我认为我的SOLUTION_1(资源合并后覆盖数据)很好,因为如果我必须更改这些变量,我只需在build.config中更改它们(只有一个地方)。但正如ScottBarta在下面的评论中所写,有一些很好的理由说明这个解决方案不是一个好主意。所

android - 无法为 org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler 类型的对象获取未知属性 'compile'

我正要添加谷歌地图Activity,我的androidstudio显示这个错误Error:Error:line(25)Couldnotgetunknownproperty'compile'forobjectoftypeorg.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.这是我的解析项目Gradle文件applyplugin:'com.android.application'android{compileSdkVersionrootProject.ext.compileSdkVersion

android - 无法为 org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler 类型的对象获取未知属性 'compile'

我正要添加谷歌地图Activity,我的androidstudio显示这个错误Error:Error:line(25)Couldnotgetunknownproperty'compile'forobjectoftypeorg.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.这是我的解析项目Gradle文件applyplugin:'com.android.application'android{compileSdkVersionrootProject.ext.compileSdkVersion

android - Gradle:如何在控制台中显示 androidTest 结果?

正如其他线程中所解释的,Gradle可以配置为将测试结果记录到控制台中:GradleAndroid:HowtoDisplaytestresultswithoutusing--infoGradle:HowtoDisplayTestResultsintheConsoleinRealTime?Outputunittestingresultsonconsoleusingspockjunittestingandgradlebuildsystem基本上,这可以通过以下任务进行设置:tasks.withType(Test){testLogging{//Customconfiguration}}这适用

android - Gradle:如何在控制台中显示 androidTest 结果?

正如其他线程中所解释的,Gradle可以配置为将测试结果记录到控制台中:GradleAndroid:HowtoDisplaytestresultswithoutusing--infoGradle:HowtoDisplayTestResultsintheConsoleinRealTime?Outputunittestingresultsonconsoleusingspockjunittestingandgradlebuildsystem基本上,这可以通过以下任务进行设置:tasks.withType(Test){testLogging{//Customconfiguration}}这适用

android - Gradle 错误 : More than one variant of project :myModule matches the consumer attributes after upgrading to new Google Services

编辑:似乎是Google方面的错误。错误报告:https://issuetracker.google.com/issues/79235243自从谷歌发布了新的变化(),我不得不更新谷歌服务。一旦我这样做了,我就会得到这个gradle错误:Morethanonevariantofproject:myModulematchestheconsumerattributes:-Configuration':myModule:debugApiElements'variantandroid-aidl:-FoundartifactType'android-aidl'butwasn'trequired.

android - Gradle 错误 : More than one variant of project :myModule matches the consumer attributes after upgrading to new Google Services

编辑:似乎是Google方面的错误。错误报告:https://issuetracker.google.com/issues/79235243自从谷歌发布了新的变化(),我不得不更新谷歌服务。一旦我这样做了,我就会得到这个gradle错误:Morethanonevariantofproject:myModulematchestheconsumerattributes:-Configuration':myModule:debugApiElements'variantandroid-aidl:-FoundartifactType'android-aidl'butwasn'trequired.

android - 获取 Android gradle 插件和 checkstyle 一起工作/命令行使用

我正在评估新的基于gradle的构建系统重现我们当前基于ant的构建过程的能力,作为一个gradle初学者,我未能让checkstyle与androidgradle插件一起运行。环境:gradle1.6在标准java项目上运行良好(包括checkstyle检查目标)最新的androidSDK(22.0.1带有平台工具和构建工具17)没有eclipse,没有androidstudio,只有我可爱的终端症状:目标项目是https://github.com/nibua-r/LigoTextDemo我成功地使用gradle构建了它,但是如果我天真地将applyplugin:checkstyle

android - 获取 Android gradle 插件和 checkstyle 一起工作/命令行使用

我正在评估新的基于gradle的构建系统重现我们当前基于ant的构建过程的能力,作为一个gradle初学者,我未能让checkstyle与androidgradle插件一起运行。环境:gradle1.6在标准java项目上运行良好(包括checkstyle检查目标)最新的androidSDK(22.0.1带有平台工具和构建工具17)没有eclipse,没有androidstudio,只有我可爱的终端症状:目标项目是https://github.com/nibua-r/LigoTextDemo我成功地使用gradle构建了它,但是如果我天真地将applyplugin:checkstyle