【随笔记】SiliconLabs Android Demo 编译
AndroidStudio:3.5.2
AndroidPhone:XiaoMi5 (Android 8.0)
AndroidDemo:3.1.4-44
AndroidDemo 源码路径:SimplicityStudio\v5\developer\sdks\gecko_sdk_suite\v3.2\app\bluetooth\android_application
一、修改为适合于 AndroidStdio 3.5.2 的 gradle 版本
--- android_application\gradle\wrapper\gradle-wrapper.properties
+++ android_application\gradle\wrapper\gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Fri Jul 24 14:59:38 CEST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
--- android_application\build.gradle
+++ android_application\build.gradle
@@ -24,13 +24,13 @@
maven { url 'https://maven.google.com' }
mavenCentral()
jcenter()
google()
}
dependencies {
- classpath 'com.android.tools.build:gradle:4.0.2'
+ classpath 'com.android.tools.build:gradle:3.5.2'
classpath 'org.ajoberstar:grgit:1.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "de.mannodermaus.gradle.plugins:android-junit5:1.7.1.1"
}
}
二、解决长时间卡在 Gradle Resolve dependencies of:classpath 的问题
--- android_application\build.gradle
+++ android_application\build.gradle
@@ -18,14 +18,14 @@
}
buildscript {
ext.kotlin_version = '1.3.72'
ext.dagger_version = '2.21'
repositories {
- maven { url 'https://maven.google.com' }
- mavenCentral()
+// maven { url 'https://maven.google.com' }
+// mavenCentral()
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.2'
classpath 'org.ajoberstar:grgit:1.5.0'
三、移除需要用 gradle 6.1.1 才能使用包(6.1.1需要 AndroidStudio 4.0 以上版本)
--- android_application\build.gradle
+++ android_application\build.gradle
@@ -8,13 +8,13 @@
def buildNumber = 44
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
-apply plugin: "de.mannodermaus.android-junit5"
+// apply plugin: "de.mannodermaus.android-junit5"
kapt {
generateStubs = true
}
buildscript {
@@ -27,13 +27,13 @@
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.2'
classpath 'org.ajoberstar:grgit:1.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
- classpath "de.mannodermaus.gradle.plugins:android-junit5:1.7.1.1"
+// classpath "de.mannodermaus.gradle.plugins:android-junit5:1.7.1.1"
}
}
ext {
try {
grgit = Grgit.open(dir: '.')
@@ -146,20 +146,20 @@
kapt "com.google.dagger:dagger-compiler:$dagger_version"
kapt "com.google.dagger:dagger-android-processor:$dagger_version"
// View
implementation "com.daimajia.swipelayout:library:1.2.0@aar"
//Test
def mockKotlin = 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0'
- testImplementation 'org.junit.jupiter:junit-jupiter'
+// testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation mockKotlin
testImplementation 'androidx.arch.core:core-testing:2.1.0'
- testImplementation 'org.mockito:mockito-inline:2.13.0'
+// testImplementation 'org.mockito:mockito-inline:2.13.0'
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.7.1"
androidTestImplementation mockKotlin
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test:rules:1.3.0'
androidTestImplementation "org.mockito:mockito-android:2.24.5"
androidTestImplementation 'org.skyscreamer:jsonassert:1.5.0'
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
}
四、为了支持 Android 8.0 的手机,修改最小SDK版本为 26
--- android_application\build.gradle
+++ android_application\build.gradle
@@ -54,13 +54,13 @@
}
android {
compileSdkVersion 30
defaultConfig {
applicationId "com.siliconlabs.bluetoothmesh"
- minSdkVersion 28
+ minSdkVersion 26
targetSdkVersion 30
versionCode versionMajor * 10000000 + versionMinor * 100000 + versionPatch * 1000 + buildNumber
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
buildConfigField "String", "GIT_SHA", "\"${gitSha}\""
buildConfigField "Integer", "BUILD_NUMBER", "${buildNumber}"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
【随笔记】SiliconLabs Android Demo 编译的更多相关文章
- Ubuntu TensorFlow 源码 Android Demo的编译运行
Ubuntu TensorFlow 源码 Android Demo的编译运行 一. 安装 Android 的SDK和NDK SDK 配置 A:下载 国内下载地址选最新的: SDK: https://d ...
- libevent2笔记(linux、windows、android的编译)
0. 前言 我使用的版本是libevent-2.0.21-stable.高级的应用还是得看官网文档http://www.wangafu.net/~nickm/libevent-2.0/doxygen/ ...
- LeadTools Android 入门教学——运行第一个Android Demo
LeadTools 有很多Windows平台下的Demo,非常全面,但是目前开发手机应用的趋势也越来越明显,LeadTools也给大家提供了10个Android的Demo,这篇文章将会教你如何运行第一 ...
- [cocos2dx笔记004] android添加�静态库project
(基于2.2.2版本号) 这步比較麻烦,不像vs2013那样好设置.參考了非常多文章.还是不能解决这个问题.仅仅有慢慢摸索了.在这里贴出来,希望能让大家能少走点弯路. 还是其于前面的文章提到的myli ...
- H3 android 系统编译
http://bbs.ickey.cn/group-topic-id-57981.html [Orange Pi PC试用体验]11编译android源码笔记 编译android和编译linux有点类 ...
- Android 自动编译、打包生成apk文件 2 - 使用原生Ant方式
from://http://blog.csdn.net/androiddevelop/article/details/11100109 相关文章列表: <Android 自动编译.打包生成apk ...
- ubuntu下Android反编译详细教程-apktool,dex2jar,jd-gui的使用
转载请注明出处:http://blog.csdn.net/fightlei/article/details/52432161 最近在学习Android反编译的一些知识,虽然在网上搜到了很多相关的文章, ...
- Android 笔记之 Android 系统架构
Android笔记之Android系统架构 h2{ color: #4abcde; } a{ color: blue; text-decoration: none; } a:hover{ color: ...
- Mac下设置Android源代码编译环境
在Mac下编译Android最麻烦的就是设置Android的编译环境了,做完这一步基本上剩下的就是近乎傻瓜式的操作了.说起来也简单就三步,设置大小写敏感的文件系统.安装编译工具.设置文件系统同时能打开 ...
- Android framework编译出来的jar包classes.jar的位置
在源码环境下编译 Android framework编译出来的jar包classes.jar的位置 out/target/common/obj/JAVA_LIBRARIES/framework_in ...
随机推荐
- vue-axios增加操作
<template> <div class="Insert"> <label for="name">名称:</labe ...
- 4.django-模板
在django中,模板引擎(DTL)是一种可以让开发者将服务端数据填充到html页面中的完成渲染的技术 模板引擎的原理分为以下三步: 在项目配置文件中指定保存模板文件的的模板目录,一般设置在项目根目录 ...
- Linux *.service文件详解
什么是systemd service? systemd service是一种以.service 结尾的配置文件,是一个专用于Linux操作系统的系统与服务管理器.简单来说,用于后台以守护精灵(daem ...
- hashcat 命令
hashcat --force --stdout -a 6 tmp.txt ?d?d?d?d?d?d?d > result.txt tips:将tmp.txt字典中的内容与7位随机掩码字符组合, ...
- wiki搭建详细过程及步骤
wiki搭建详细过程及步骤 1.查看yum库中jdk的版本 2.选择java-1.8.0安装 3.配置环境变量 4.环境变量生效 5.查看jdk是否安装成功 6.启动mysql服务 7.下载confl ...
- C++初阶(list容器+模拟实现)
list介绍 list的本质是一个带头的双向循环链表. 链表是一种物理存储单元上非连续.非顺序的存储结构,数据元素的逻辑顺序是通过链表中的指针链接次序实现的.链表由一系列结点(链表中每一个元素称为结点 ...
- AI绘画提示词创作指南:DALL·E 2、Midjourney和 Stable Diffusion最全大比拼 ⛵
作者:韩信子@ShowMeAI 深度学习实战系列:https://www.showmeai.tech/tutorials/42 自然语言处理实战系列:https://www.showmeai.tech ...
- nginx-1.22.0版本安装
nginx运行状态查看 查看80端口占用情况:netstat -tunlp | grep 80 # 查看进程是否运行ps -A | grep nginx # 强制关闭nginxpkill nginx ...
- C++动态链接MySQL库
C++链接MySQL库 库安装目录 CMakeList cmake_minimum_required(VERSION 3.22) project(MySQLConnectionPool) includ ...
- 【数据库】Oracle建表、创建序列、添加触发器生成自增主键
CREATE TABLE "TEST"."T_ORDER" ( "AUUID_0" VARCHAR2 ( 255 ) NOT NULL ...