gradle

AAPT: error: resource attr/** (aka com.**.app:attr/**) not found.

Deadly 提交于 2020-04-08 17:32:46
问题记录 记录项目中的一个问题,不知什么时候,运行项目会出现这个错误: 解决方法 buildscript { repositories { google ( ) jcenter ( ) } dependencies { //之前使用的是3.5.2版本,升级成3.6.2后就出现了上面的错误, //还原成原来版本问题消失。 //猜测是gradle3.6.2版本存在问题。 classpath 'com.android.tools.build:gradle:3.6.2' } } 反思 项目出现问题时,需要考虑出现问题之前——>出现问题之后,改动过哪些代码,很有可能是这些修改引起了错误。 尝试将修改分别还原,看错误是否能消失,逐一排查。 来源: oschina 链接: https://my.oschina.net/u/4264465/blog/3224793

Illegal class file: Class module-info is missing a super type. Class file version 53

狂风中的少年 提交于 2020-04-08 04:01:47
问题 When I add firebase perf dependency into my project i am getting this error Illegal class file: Class module-info is missing a super type. Class file version 53. My Gradle and google services project-level dependencies are classpath 'com.android.tools.build:gradle:3.5.1' classpath 'com.google.gms:google-services:4.3.2' and I followed the exact steps mentioned in their docs https://firebase.google.com/docs/perf-mon/get-started-android. I have tried clean and rebuild and clearing the Android

Increase timeout for gradle to get a maven dependency

你说的曾经没有我的故事 提交于 2020-04-07 14:49:57
问题 I am tring to get a jar dependency from Maven via the grails 3.1.5 gradle dependency Resolution . How do I increase timeout that gradle takes to get a maven dependency. Sure I have seen that the dependency takes quiet a longer time to be downloaded. But how can I configure gradle to wait longer in order to download the dependency 回答1: The feature was added in Gradle here: https://github.com/gradle/gradle/pull/3041 You can increase the timeout with 2 properties: ./gradlew build -Dhttp

Increase timeout for gradle to get a maven dependency

☆樱花仙子☆ 提交于 2020-04-07 14:48:19
问题 I am tring to get a jar dependency from Maven via the grails 3.1.5 gradle dependency Resolution . How do I increase timeout that gradle takes to get a maven dependency. Sure I have seen that the dependency takes quiet a longer time to be downloaded. But how can I configure gradle to wait longer in order to download the dependency 回答1: The feature was added in Gradle here: https://github.com/gradle/gradle/pull/3041 You can increase the timeout with 2 properties: ./gradlew build -Dhttp

How to setup serialization in IntelliJ/Kotlin?

旧城冷巷雨未停 提交于 2020-04-07 08:13:33
问题 My apologies for a noob question: I'm trying to check out how serialization works in Kotlin. To this end, I created a Gradle project like this: edited the generated build.gradle.kts by adding just one line plugins { java kotlin("jvm") version "1.3.71" id("org.jetbrains.kotlin.plugin.serialization") version "1.3.71" } group = "org.example" version = "1.0-SNAPSHOT" repositories { mavenCentral() } dependencies { implementation(kotlin("stdlib-jdk8")) testCompile("junit", "junit", "4.12") }

How to setup serialization in IntelliJ/Kotlin?

一世执手 提交于 2020-04-07 08:12:08
问题 My apologies for a noob question: I'm trying to check out how serialization works in Kotlin. To this end, I created a Gradle project like this: edited the generated build.gradle.kts by adding just one line plugins { java kotlin("jvm") version "1.3.71" id("org.jetbrains.kotlin.plugin.serialization") version "1.3.71" } group = "org.example" version = "1.0-SNAPSHOT" repositories { mavenCentral() } dependencies { implementation(kotlin("stdlib-jdk8")) testCompile("junit", "junit", "4.12") }

Bundle in JavaFX when you run the executable from a Gradle project?

回眸只為那壹抹淺笑 提交于 2020-04-07 08:03:46
问题 Over the past few days I've been tearing what's left of my hair out trying to get to the Holy Grail: Gradle + Java 11 + JavaFX + writing all my app and testing code in Groovy, not Java. One of several problems is that Groovy 2 (even Groovy 3) can't yet cope with Java 9+ modules, which rules one clever solution out. But I have managed to get a Gradle project together which not only does virtually everything successfully, including the "run" task (from the "application" plugin), and runs tests

Gradle 6.0 breaks source set dependency

不羁的心 提交于 2020-04-07 07:59:27
问题 I have a collection of lessons for students here: https://github.com/emign/engineEmi_Lektionen/tree/master The dependant lib for this project gets injected via a gradle plugin here: https://github.com/emign/engineEmi_GradlePlugin/blob/98a70b6a54c21c730a9d1cb6e4fee9ac369b8fc6/src/main/kotlin/me/emig/engineEmi/gradle/EngineEmiGradlePlugin.kt#L43 It all works great up until gradle 5.6.4. But when I upgrade the wrapper, it breaks and loses the Source Set of the above mentioned library. Can anyone

Spring源码编译下载

一曲冷凌霜 提交于 2020-04-07 07:32:02
下载源码 2B哥在家远程办公,心血来潮,整理点spring源码玩玩。 可以在github上下载 ,也可以下载我课堂的源码(有注释) git clone https://github.com/spring-projects/spring-framework.git 配置gradle 编译环境 Spring源码是通过gradle编译的,所以要先配置gradle编译环境 gradle下载安装 下载地址 ,我本地环境用的 v4.10.2 解压安装,安装路径不要出现空格(建议),如图 2、配置环境变量 选中系统变量path,然后编辑,打开编辑环境,新建, 输入配置路径C:\apache\gradle-4.10.2\bin 验证环境安装是否正常,如下图,表示正常 3. 导入idea,配置idea环境 导入spring-framwork到idea 打开idea, 选择File—Open,选择解压的spring-framwork,导入到idea 配置idea中gradle环境 File—Settings ,搜索gradle, 配置gradle 指定gradle home: C:/apache/gradle-4.10.2 安装路径 Service directory path指定了gradle仓库: D:/maven/gradle/.gradle 自定义 vm参数可不配: -XX

Gradle Tips#1-tasks

偶尔善良 提交于 2020-04-07 07:19:09
原文链接 以这篇博客开始,我将写一系列关于Gradle的文章,用来记录接触Gradle构建脚本以来我所理解的Gradle。 今天要讲的就是Gradle tasks以及task的配置和运行。可能有的读者还不了解Gradle task,用真实的例子来展示应该更容易被理解。下面的代码展示了三个Gradle task,稍后会讲解这三者的不同。 task myTask { println "Hello, World!" } task myTask { doLast { println "Hello, World!" } } task myTask << { println "Hello, World!" } 我的目的是创建一个task,当它执行的时候会打印出来”Hello, World!”。当我第一次创建task的时候,我猜测应该是这样来写的: task myTask { println "Hello, World!" } 现在,试着来执行这个myTask,在命令行输入gradle myTask,打印如下: user$ gradle myTask Hello, World! :myTask UP-TO-DATE 这个task看起来起作用了。它打印了”Hello, World!”。 但是,它其实并没有像我们期望的那样。下面我们来看看为什么。在命令行输入gradle