Linux下安装Jenkins并配置Android构建环境

Jenkins 专栏收录该内容
¥59.90 ¥99.00
60篇文章

Jenkins是一个流行的开源持续集成和交付工具,它可以帮助开发人员在项目开发过程中实现自动化构建、测试和部署。本文将介绍如何在Linux系统上安装Jenkins,并配置Android构建环境。

  1. 安装Java Development Kit (JDK)

Jenkins是基于Java开发的,因此在安装Jenkins之前,需要先安装Java Development Kit (JDK)。可以通过以下命令在Linux系统上安装JDK:

sudo apt update
sudo apt install openjdk-8-jdk

安装完成后,可以通过运行以下命令来验证Java是否正确安装:

java -version
  1. 安装Jenkins

接下来,我们将安装Jenkins。可以按照以下步骤进行操作:

2.1 导入Jenkins软件包的公钥:

wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -

2.2 将Jenkins软件包存储库添加到系统的源列表中:

sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'

2.3

Linux安装Android Sdk 在使用Jenkins+Gitlab集成自动化打包时,遇到Linux缺少Android Sdk环境的问题,单独记录一下安装过程。 sdk安装方式 常规思路,下载sdk,安装之后修改环境。但是发现,网络上已经没有了sdk的下载资源,有的也只是很老的版本。查看Android开发文档——sdkmanager的使用指南,发现可以使用sdkmanager这个命令行工具进行下载。 下载sdkmanager工具包 官网下载页最底部-命令行工具下载,找到Linux平台的工具包 使用wget下载到服务器 wget -P /h 阅读详情

相关推荐

完美配置Android开发环境的Linux指南

无论是新手还是有经验的开发者,本指南都将帮助您快速搭建一个高效的Android开发环境。Android Studio是官方推荐的Android开发IDE,提供了丰富的开发工具和功能。至此,您已成功配置了完美的Android开发环境。您现在可以开始开发和测试您的Android应用程序了。Android Studio安装完成后,您需要配置Android SDK。为了使Android开发工具能够在终端中正常运行,您需要设置一些环境变量。配置完成后,您就可以创建和运行Android项目了。希望本指南对您有所帮助!

KjsPrivate的博客 757

Jenkins在Linux环境下搭建Android自动打包工具

通过以上步骤,你已经成功搭建了在Linux环境下使用Jenkins进行Android自动打包的环境。利用Jenkins的自动构建能力,你可以轻松地进行Android应用程序的持续集成和交付。返回Jenkins的主界面,点击你创建的任务,然后点击"立即构建"开始构建过程。在Jenkins的主界面上,点击"新建任务",输入任务名称并选择"自由风格的软件项目",然后点击"确定"。按照页面上的指示,解锁Jenkins并安装推荐的插件。构建完成后,你可以在Jenkins的构建历史记录中查看构建日志和产物。

与其临渊羡鱼,不如退而结网 370

linux-一个基于Jenkins的iOSAndroid自动构建系统

一个基于Jenkins的iOS/Android自动构建系统,它实现了最大程度的自动化,让你的iOS自动打包,Android自动打包流程变得更加高效。

Halcon手眼标定保姆级教程:从‘眼在手上’到‘眼到手’两种模式全解析(附代码)

本文详细解析Halcon在机器人视觉引导中的手眼标定技术,涵盖Eye-in-Hand和Eye-to-Hand两种模式,提供从硬件准备到实战代码的完整解决方案。通过精确的相机标定和坐标转换,帮助实现工业自动化中机械臂与视觉系统的高精度协同作业。

weixin_42544461的博客 207

详解相机的sensor工作原理

目录sensor成像原理拜尔马赛克变换(BAYER DEMOSAICING)维伦阵列摩尔纹 sensor成像原理 相机或摄像头使用数百万个微小的光腔(感光元件)来记录图像。 成像时,sensor将镜头投射来的光子储存为模拟电信号。 曝光完成后,相机关闭这些光腔(感光元件),然后通过测量模拟电信号的强度来评估每个腔中有多少光子掉入来计算数字电信号的数值。 然后模拟电信号转换为数字电信号,数字电信号的数值由位深度决定(RGB的位深度)。 最后,根据正在记录的文件格式(8位JPEG位0-255),可能会再次降低

路人coder 2万+

某物data魔改与变种算法还原(含加解密Py纯算)

某物data加解密、设备指纹魔改、变异、自定义加密分析与纯算还原

吴秋霖的博客 1278

基于粒子群算法优化的灰色预测模型GM实现数据预测(附带MATLAB代码)

灰色预测模型(Grey Model,简称GM)是一种常用的非线性时间序列预测方法,它在处理少量数据和缺乏规律性的序列预测问题上表现出良好的性能。c. 建立灰色微分方程:根据紧邻均值生成序列建立灰色微分方程,通常形式为:dx(n) + ax(n) = b,其中dx(n)是紧邻均值生成序列,x(n)是原始序列。为了提高GM模型的预测准确性,我们将使用粒子群算法来优化灰色微分方程的参数a和b。a. 利用灰色微分方程进行预测:根据已得到的灰色微分方程,进行后续时间点的数据预测。首先,定义了两个函数。

CoderExtra的博客 605

Transformer实战(38)——视觉Transformer (Vision Transformer, ViT)

Transformer 在自然语言处理 (NLP) 领域取得了显著成就,在许多不同的任务中都表现出色。在本节中,我们将探索视觉 Transformer (Vision Transformer, ViT) 模型。正如 NLP 领域创建了多种模型一样,视觉领域也开发了多种模型,每种模型都为计算机视觉提供了新的视角。通过本节,将学习如何使用 ViT 等模型进行计算机视觉任务,了解基于 Transformer 的预训练计算机视觉模型的工作原理,以及如何针对特定任务进行微调。

盼小辉丶的博客 2819

【AI大模型应用开发】【LangChain系列】实战案例6:利用大模型进行文本总结的方法探索,文本Token超限怎么办?

假设有一组文档(PDF、Notion页面、客户问题等),你想要总结内容。可以利用大模型来帮你。今天来系统看下利用大模型来对文本进行总结的方法,以LangChain的使用为例。

同学小张的博客 3749

三菱MC协议(MC/TCP):避坑指南|C#实现三菱MC协议:软元件(X/Y/M/D)读写与帧格式解析

核心避坑逻辑:MC协议的坑80%集中在“PLC配置”“地址编码”“字节序”,先解决这三点,通信就成功了一半;实战优先级:新手优先用开源库(Mitsubishi.MCProtocol),避免手动拼接帧格式的复杂坑;进阶再研究帧格式解析;排坑技巧:先Ping通→用调试助手验证→写C#代码,分层排查,不要混在一起找问题。掌握这些避坑技巧后,你可以轻松实现C#与三菱全系列PLC的稳定通信,满足工业场景中数据采集、设备控制等核心需求。

这里只有干货:从 Modbus 通信到 MES 对接,从 YOLO 训练到工控机部署,带你搞定工业软件开发全流程。 2189

飞牛NAS1.1.19更新后SSH连不上?两步快速恢复连接

飞牛NAS1.1.19版本更新后SSH无法连接😟,实则是官方安全策略升级默认关闭了该服务,本文分享两步实操配置恢复SSH连接💻,还同步了官方的设备安全配置建议,帮助用户兼顾使用与设备防护🔒。

XiaoqiangClub的博客 2092

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

VC中sqlite的使用

在VC中对sqlite的使用,实现数据库大批数据的快速插入,读取数据库中的数据在ListCtrl中显示

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

上一篇: 使用Jenkins和BlueOcean构建Nuxt应用
下一篇: 使用Jenkins添加Mac节点实现iOS自动化打包发布
普通网友
博客等级 码龄3年 14粉丝 0原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值