gradle

Android studio使用异常集锦

大憨熊 提交于 2020-03-19 05:01:40
1、快捷键设置: 菜单栏->File->Settings : 搜索Keymap,设置为Eclipse. 2、打开studio,一直在加载http\://services.gradle.org/distributions/gradle-2.14.1-all.zip的解决办法: studio自动加载极其慢,如果无法下载,建议手动下载(Ubuntu下载极慢,建议在独立的Window系统下载):地址https://services.gradle.org/distributions; 或去我的百度云下载,具体可以联系我。 根据项目需要的版本:在gradle-wrapper.properties中 distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip。去下载gradle-2.14.1-all.zip。 根据你项目需要的版本下载对应的zip包。 放在/home/xiaozhilong(换成你的电脑名)/.gradle/wrapper/dists/gradle-2.14.1-all/8bnwg5hd3w55iofp58khbp6yv; 8bnwg5hd3w55iofp58khbp6yv是studio启动项目时自动生成的,如果没有生成,重新启动一次再关闭就行了。 菜单栏->File-

flutter 项目打包出错问题

流过昼夜 提交于 2020-03-18 17:48:07
打包方法参考: https://flutterchina.club/android-release/ 1、下载 \android\gradle\wrapper\gradle-wrapper.properties 所需版本的 Gradle。   将路径改为本地 distributionUrl=file:///D:/.gradle/wrapper/dists/gradle-4.10.2-all.zip 2、打包显示 could not resolve io.flutter:x86...... , (需要kx上网) 。 3、测试环境下的黑屏问题,真机安装之后暂时没有。 来源: https://www.cnblogs.com/Mvloveyouforever/p/12517515.html

Android Studio 自定义修改新建项目时的build.gradle模板,添加国内镜像源

这一生的挚爱 提交于 2020-03-18 11:31:36
某厂面试归来,发现自己落伍了!>>> 找下面路径的文件 D:\AndroidStudio\plugins\android\lib\templates\gradle-projects\NewAndroidProject\root\build.gradle.ftl 注意这里是以我本机安装的AndroidStudio为例,你需要将安装路径换成你本机的路径,另外我的系统是win10,Android Studio版本为3.5.2 修改如下: // Top-level build file where you can add configuration options common to all sub-projects/modules. <#macro loadProperties> <#if useOfflineRepo!false> Properties properties = new Properties() properties.load(project.rootProject.file("local.properties").newDataInputStream()) </#if> </#macro> <#macro useProperties> <#if useOfflineRepo!false> properties.getProperty("offline.repo")

How to use the default AWS credentials chain for an S3 backed Maven repository in a Gradle build?

安稳与你 提交于 2020-03-18 04:54:23
问题 According to Gradle documention (Example 50.27), we can use S3 backed Maven repositories with Gradle 2.4. However, the only example given in the docs passes explicit AWS credentials to the S3 repository declaration: repositories { maven { url "s3://someS3Bucket/maven2" credentials(AwsCredentials) { accessKey "someKey" secretKey "someSecret" } } } I need to do the same thing, but I want Gradle to use the DefaultAWSCredentialsProviderChain, from the AWS JDK, instead of explicit credentials.

[Gradle] 解决Gradle 依赖下载慢

穿精又带淫゛_ 提交于 2020-03-17 13:04:55
参考 阿里云公共代理库 https://www.jianshu.com/p/ab1f5e5f5f5c 修改前的依赖 build.gradle 文件 buildscript { repositories { mavenCentral() jcenter() google() } dependencies { classpath 'com.android.tools.build:gradle:3.0.1' } } allprojects { repositories { mavenCentral() jcenter() google() } } 上面的这种方式,由于会用到google的maven仓库,直接导致相关的依赖库无法下载,gradle plug3.0无法下载的问题。 用阿里云仓库解决问题 mavenCentral镜像仓库地址 http://maven.aliyun.com/nexus/content/groups/public/ jentral镜像仓库地址 https://maven.aliyun.com/repository/jcenter google镜像仓库地址 https://maven.aliyun.com/repository/google 完整模式 buildscript { repositories { // mavenCentral() // jcenter(

Andriod Gradle Sync failed

心已入冬 提交于 2020-03-17 11:40:10
问题 Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all artifacts for configuration ':classpath'. Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve com.android.tools.build:gradle:3.6.1. Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: No cached version of com.android.tools.build:gradle:3.6.1 available for offline mode. 回答1: It is a problem found in the new

Download and install Android studio gradle offline

纵然是瞬间 提交于 2020-03-17 09:26:59
问题 I have been having internet issues, so installing gradle for android studio has been a big issue, so I downloaded the zip file. However, I dont know how to install it offline and set Android studio to use the offline version. I need help. 回答1: 1st open below link and download the latest complete version of Gradle https://gradle.org/releases/ Now you find your path where your android studio install then Find .gradle folder, normally gradle is present here... C:\Users\**YourAccountFolder**\

Spring Boot + Gradle: how to build executable jar

早过忘川 提交于 2020-03-17 07:52:41
问题 I'm trying to build an executable jar in Spring Boot + Gradle project, but for now nothing works. Here is the simplest possible structure. Possibly, something is missing in Gradle configuration. Gradle: buildscript { ext { springBootVersion = '1.5.8.RELEASE' } repositories { mavenCentral() } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") } } apply plugin: 'java' apply plugin: 'org.springframework.boot' group = 'com.example' version = '0.0.1

Generate a Java class using Gradle for Java plugin

こ雲淡風輕ζ 提交于 2020-03-17 06:58:38
问题 I'd like to generate a Java class using a Gradle task for a Java project, similar to how the Android plugin creates BuildConfig.java using the buildConfig <String> notation, e.g.: android { ... buildTypes { final String PROVIDER_AUTHORITY_RELEASE = "public static final String PROVIDER_AUTHORITY = \"com.example.project.ContentProvider\";\n"; final String PROVIDER_AUTHORITY_DEBUG = "public static final String PROVIDER_AUTHORITY = \"com.example.project.debug.ContentProvider\";\n"; debug { ...

Generate a Java class using Gradle for Java plugin

泪湿孤枕 提交于 2020-03-17 06:58:05
问题 I'd like to generate a Java class using a Gradle task for a Java project, similar to how the Android plugin creates BuildConfig.java using the buildConfig <String> notation, e.g.: android { ... buildTypes { final String PROVIDER_AUTHORITY_RELEASE = "public static final String PROVIDER_AUTHORITY = \"com.example.project.ContentProvider\";\n"; final String PROVIDER_AUTHORITY_DEBUG = "public static final String PROVIDER_AUTHORITY = \"com.example.project.debug.ContentProvider\";\n"; debug { ...