gradle

IntelliJ IDEA UI Designer form elements initialize to null

放肆的年华 提交于 2020-01-30 13:13:13
问题 I started developing a simple tool on my laptop and wanted to move the project to my PC. Because i use version control I first simply cloned the repo, after that did not work I also tried copying the files. After fixing some character issues, I get a NullPointerException when initializing my main form. I don't have that exception on my laptop. I also found out that every single form element in the Java class is initialized to null, even though the form is bound to the class. Github Repo 回答1:

Alternative to calling a task from within a task, Gradle

[亡魂溺海] 提交于 2020-01-30 08:56:49
问题 I have a custom Gradle plugin that will generate Java files from a template file. I have several such template files in different locations, and I need to "compile" all of them to generate the Java files I need. Once I have the files, I want to package them into a .jar. My first thought was that I'd execute the "compile" task from the custom plugin from within other tasks. Something like: task compileFromLocationA <<{ compileTemplate.execute()... } task compileFromLocationB ... packageJar

Difference between assemble vs assembleDebug vs assembleRelease

纵饮孤独 提交于 2020-01-30 06:53:24
问题 I am trying to learn bitrise platform. As of now I don't know what exactly a use of this platform also. Anyways while I was doing setup and it is asking for to select gradle-task to run. Does anyone know what is the difference between assemble vs assembleDebug vs assembleRelease ? Did anyone get a chance to try this platform ever in the mobile application ? 回答1: An Android project has at least two outputs: a debug APK and a release APK. Each of these has its own anchor task to facilitate

Difference between assemble vs assembleDebug vs assembleRelease

落花浮王杯 提交于 2020-01-30 06:53:06
问题 I am trying to learn bitrise platform. As of now I don't know what exactly a use of this platform also. Anyways while I was doing setup and it is asking for to select gradle-task to run. Does anyone know what is the difference between assemble vs assembleDebug vs assembleRelease ? Did anyone get a chance to try this platform ever in the mobile application ? 回答1: An Android project has at least two outputs: a debug APK and a release APK. Each of these has its own anchor task to facilitate

grade简单配置和使用

非 Y 不嫁゛ 提交于 2020-01-30 05:08:56
### 1.下载并配置 下载地址http://services.gradle.org/distributions/ ,下载你所需要对应的版本,我这里下载的是gradle-4.7-bin.zip。 下载后解压到你想要的目录即可,然后设置环境变量: --- 1.配置GRADLE_HOME变量 ``` E:\gradle-4.4-all\gradle-4.4 ``` 2.配置path变量 ``` %GRADLE_HOME%\bin ``` 3.在cmd模式下,使用gradle -v命令,如果出现版本信息,则安装成功 2.可以在环境变量中配置gradle默认仓库地址 默认的gradle仓库地址 ``` C:\Users\Administrator\.gradle ``` 更改gradle默认仓库 ##### 1.更改为其他文件夹(使用环境变量配置,永久有效) ``` GRADLE_USER_HOME=已有的且要设为gradle本地仓库的本地目录 ``` 例如 ``` GRADLE_USER_HOME=D:\GradleRepo ``` 将文件目录D:\GradleRepo设为本地电脑上gradle默认的本地目录,使用gradle相关命令,相关缓存文件会默认存储到这个目录下 ##### 2.通过-g参数临时设置 ``` gradle -g D:GradleRepo -q hello ```

Gradle project sync fail, no toolchains

ぃ、小莉子 提交于 2020-01-30 05:05:54
问题 Hello I'm getting this error in android studio : Gradle project sync failed. Basic functionality (editing, debugging) will not work properly And in messages I get this : Gradle sync failed: No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi I've searched for a solution, but I haven't found one. Hopefully someone from here can help me. 回答1: As MustafaKemal, I canceled an NDK update, and after that I got the Gradle sync error message. What solved my

Migration to androidX - can't import/find androidx.databinding.DatabindingUtil

血红的双手。 提交于 2020-01-30 04:42:08
问题 I'm working on an Android MVVM application. I just switched to the androidx libraries manually. This are the libraries in my build.gradle: implementation 'com.google.code.gson:gson:2.8.5' implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:1.0.0-rc02' implementation 'androidx.constraintlayout:constraintlayout:1.1.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0-rc02' implementation 'com.google.android.material:material:1.0.0-rc01'

Gradle教程——(二)Gradle介绍

百般思念 提交于 2020-01-30 02:26:58
——《实战Gradle》中文版学习笔记 1、简述 Gradle是基于JVM构建工具的新一代版本。Gradle可以用一种声明式的方式为开发者的问题领域建模,它使用一种强大且具有表达性的基于Groovy的领域特定语言(DSL),而不是XML。因为Gradle是基于JVM的,它允许你使用自最喜欢的Java或者Groovy语言来编写定制逻辑。 Gradle提供了一套自己的依赖管理实现方式。不仅高度可配置,而且也尽可能地与现有额依赖管理设施(如Maven和Ivy)相兼容。Gradle对多项目构建的定义和组织提供了强有力的支持,以及对项目的依赖建模。 Ant可以在运行时装载,因此不需要任何额外的设置。 Maven遵循约定优于配置的规则,为Java项目引入了一个标准化的项目布局和构建生命周期。 2、Java构建工具的演变 Ant和Maven,经过这么多年,虽然都有大步提高和扩展的特性集,并且非常流行且变成行业标准,但它们都有一个缺点——构建逻辑必须用XML描述。XML是非常好的层级数据描述语言,但对于描述程序流程和构建逻辑却存在不足之处。 Gradle提供了具有表达性的DSL、约定优于配置的方法和强大的依赖管理。摒弃了XML,引入了动态语言Groovy来定义构建逻辑。 Gradle构建脚本是声明式的、可读的,并且清晰地表达它们的意图。 注:ThoughtWorks是一个声誉很好的软件开发咨询公司

What's the different between all*.exclude and all.exclude in configurations.all

核能气质少年 提交于 2020-01-29 21:29:11
问题 I want to know what exactly different between all*.exclude and all.exclude in configurations.all when you want to exclude dependencies configurations.all { all.exclude all*.exclude group: 'org.json', module: 'json' } 回答1: The correct syntax is: Using the all method configurations.all { exclude group: 'org.json', module: 'json' } OR Using the all property configurations { all*.exclude(group: 'org.json', module: 'json') } The all property holds a list of all configuration objects within the

What's the different between all*.exclude and all.exclude in configurations.all

穿精又带淫゛_ 提交于 2020-01-29 21:18:27
问题 I want to know what exactly different between all*.exclude and all.exclude in configurations.all when you want to exclude dependencies configurations.all { all.exclude all*.exclude group: 'org.json', module: 'json' } 回答1: The correct syntax is: Using the all method configurations.all { exclude group: 'org.json', module: 'json' } OR Using the all property configurations { all*.exclude(group: 'org.json', module: 'json') } The all property holds a list of all configuration objects within the