gradle

Gradle 签名的配置文件 gradle.properties

折月煮酒 提交于 2020-12-28 03:10:35
在对包进行签名之前,需要在 gradle.properties 配置文件中添加一些参数。 参数的内容如下: signing.keyId =YourKeyId signing.password =YourPublicKeyPassword signing.secretKeyRingFile =PathToYourKeyRingFile ossrhUsername =your-jira-id ossrhPassword =your-jira-password signing.keyId signing.keyId 为你在 Kleopatra 选择 Key 的 ID。 这里有一个坑就是这个 ID 的长度只能是 8 位。 在你的命令行工具中运行: gpg -- list -keys --keyid-format short 你能看到所有你计算机中的 key,这个 key 只能取最后 8 位,否则你将会看到签名的错误信息。 signing.password 这个是你在创建 key 的时候使用的密码,在这里是保存为明码的。 你需要讲这个密码填写到这个参数中。 signing.secretKeyRingFile 这个应该是让很多人很困惑的地方。secretKeyRingFile 是什么东西?其实就是你 gpg key 的 secret。 在 Kleopatra 中选择你需要导出的 key

Attaching Gradle sources in IntelliJ IDEA

試著忘記壹切 提交于 2020-12-27 08:53:06
问题 Once after I create a Gradle project in IntelliJ using the default gradle wrapper and create directories option I see the project structure gets created with build.gradle file. IntelliJ tips me to "You can configure Gradle wrapper to use distribution with sources. It will provide IDE with Gradle API/DSL documentation" - but I am not able to attach the sources even after clicking "Ok, apply suggestion". The Gradle project is getting refreshed but the sources are not attached. We are using a

How to set custom Java compiler args on an Android project?

那年仲夏 提交于 2020-12-27 06:12:30
问题 I'm putting the following at the end of my project gradle file: gradle.projectsEvaluated { tasks.withType(JavaCompile) { options.compilerArgs += ['-Xep:MissingOverride:ERROR', '-Xep:MissingCasesInEnumSwitch:ERROR',] } } However, in my code if I remove an @Override annotation somewhere or remove a switch statement, my Android project still builds. Shouldn't it fail with an error? 回答1: I googled your problem and found this post that described your problem and the solution looks like this:

How to set custom Java compiler args on an Android project?

心已入冬 提交于 2020-12-27 06:11:12
问题 I'm putting the following at the end of my project gradle file: gradle.projectsEvaluated { tasks.withType(JavaCompile) { options.compilerArgs += ['-Xep:MissingOverride:ERROR', '-Xep:MissingCasesInEnumSwitch:ERROR',] } } However, in my code if I remove an @Override annotation somewhere or remove a switch statement, my Android project still builds. Shouldn't it fail with an error? 回答1: I googled your problem and found this post that described your problem and the solution looks like this:

tmap_map_fluttify腾讯地图插件无法调试的解决办法

我怕爱的太早我们不能终老 提交于 2020-12-27 00:01:26
问题:在pubspec.yaml中增加依赖 tmap_map_fluttify : ^0.3.0 然后flutter run。结果卡死在 Running Gradle task 'assembleDebug'... 解决过程: 猜应该有打日志的命令,果然 flutter run --verbose-system-logs 卡了好久,出现以下提示。 FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':foundation_fluttify'. > Could not resolve all artifacts for configuration ':foundation_fluttify:classpath'. > Could not download kotlin-compiler-embeddable.jar (org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.50) > Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.3

Permission denied with Firebase distribution android app using service account credentials mode

半城伤御伤魂 提交于 2020-12-26 08:33:09
问题 I'm trying to migrate from Fabric to Firebase since Fabric will not be available beyond March 31, 2020. I already have done the first steps: adding plugins and dependencies to gradle, adding analytics json file, even crash reporting, and all seems correct because I can see data in the Firebase console (analytics and crashes). But I'm not so lucky migrating the app distribution system from Beta+Fastlane to Firebase. I'm trying the option " Distribute Android apps to testers using Gradle ". I

gradle Jigsaw module not found

人盡茶涼 提交于 2020-12-26 07:44:28
问题 I try to run a very simple gradle project which uses java 9 modules, but i receive the following error. /home/vadim/IdeaProjects/test_modules/src/main/java/module-info.java:2: error: module not found: HdrHistogram requires HdrHistogram; ^ Here is it https://github.com/vad0/test_modules. The main class does basically nothing. package app; import org.HdrHistogram.Histogram; public class RunHdr { public static void main(String[] args) { final Histogram histogram = new Histogram(5); System.out

Android studio4.1下报错Failed to open zip file. Gradle‘s dependency cache may be corrupt

房东的猫 提交于 2020-12-25 10:16:00
andoroid studio运行项目时报错: Failed to open zip file. Gradle’s dependency cache may be corrupt (this sometimes occurs after a network connection timeout.) 这句话翻译下来的意思是: 无法打开zip文件。Gradle的依赖项缓存可能已损坏(有时在网络连接超时后发生) 出现问题 :是因为Gradle下载的时候包缺失,或网络问题,导致的构建有问题。 尝试方法: 1.换成我已有项目的gradle版本 2.删除本地的出错gradle,从网上自己下载拷贝,再调用。 3.配置Http proxy,添加国内镜像地址。 (它会像蜗牛一样慢的进行下载gradle。) 这里给一下Gradle插件和它对应的版本,获取该表的日期是:2020/12/22最新版 Tips: 插件版本就是Project下的Build.gradle的版本; Gradle版本就是.gradle下的版本 我主要就进行了以上三种方法。说说我的结果吧,对我来说,结果就是-都没用! 我真的想吐槽一下! 为了解决这个问题,真的是毫不夸张的花了我一天一夜,上面的所有方法我都试过了,都没用,我都要怀疑人生了。 最后那个给我发项目的憨憨终于带着脑子,把代码在自己电脑跑了一次,又重新发给我了

集成华为手部关键点识别服务轻松识别手语字母

旧巷老猫 提交于 2020-12-24 17:43:55
介绍 华为机器学习(ML Kit)提供手部关键点识别服务,可用于手语识别。手部关键点识别服务能识别手部21个关键点,通过每个手指的方向和手语规则作比较去找手语字母表。 应用场景 手语通常被听力和口语有障碍的人来使用,是收集手势包含日常互动中所使用的动作和手势。 使用ML Kit 可以建立一个智能手语字母表识别器,它可以像一个辅助器一样将手势翻译成单词或者句子,也可以将单词或者句子翻译成手势。 这里尝试的是手势当中的美国手语字母表,是基于关节,手指和手腕的位置进行分类。接下来小编将会尝试从手势中收集单词“HELLO”。 开发步骤 1. 准备 详细的准备步骤可以参考华为开发者联盟: https://developer.huawei.com/consumer/cn/doc/development/HMS-Guides/ml-process-4 这里列举关键的开发步骤。 1.1 启动ML Kit 在华为开发者AppGallery Connect, 选择 Develop > Manage APIs 。确保ML Kit 激活。 1.2 项目级gradle里配置Maven仓地址 buildscript { repositories { ... maven {url 'https://developer.huawei.com/repo/'} } } dependencies { ...

Harmony系列之 工程结构与应用配置的理解

我只是一个虾纸丫 提交于 2020-12-24 14:45:37
这篇文章主要讲鸿蒙应用的工程结构及应用配置,讲述期间穿插 Android 工程作为对比及迁移理解。 直入主题,先看下图(左鸿蒙右安卓) 无论是鸿蒙工程还是安卓工程,其结构相似,按内容可划分为: 项目构建 及 模块内容 项目构建 这部分内容对于安卓开发者来说,Gradle 构建系统很是熟悉。 项目构建的内容包含依赖文件(位于 gradle/Wrapper 文件夹),以 .gradle 结尾的脚本文件, .properties 结尾的配置文件,可执行文件及 settings.gradle 。 settings.gradle 定义项目模块包含信息等元数据信息,且每个模块内部也定义了 .gradle 脚本文件用于描述模块编译信息。 如下图编译信息概要(左鸿蒙右安卓) 编译信息大致包含 插件声明 , 模块信息声明 及 依赖声明 。 在安卓侧构建模块,分别使用以下插件: com.android.application 插件构建 Application 模块,最终产物为 .apk 可执行文件 com.android.library 插件构建 Library 模块,最终产物为 .aar 文件 而鸿蒙侧也有类 Application 的概念,鸿蒙应用以 APP Pack (Application Package)形式发布,它是由一个或多个 HAP (HarmonyOS Ability Package