Android开发

1.androidstudio旧版本升级到新版本后出现的编译错误问题

1.1Could not find com.android.tools.build:aapt2:3.3.2-5309881

在这里插入图片描述
allprojects {
repositories {
jcenter()
google() -->add this line
}

1.2 uses-sdk:minSdkVersion 9 cannot be smaller than version 14 declared in library

在这里插入图片描述
9改为14即可

1.3 在Android Studio本地运行GitHub上的开源Android项目

https://blog.csdn.net/csdnzouqi/article/details/84305554

1.4 android studio + opencv

1、错误:Could not find com.android.tools.build:aapt2:3.3.2-5309881
add the google() in build.gradle

allprojects {
repositories {
jcenter()
google() -->add this line
}
2、错误:Manifest merger failed : uses-sdk:minSdkVersion 1 cannot be smaller than version 14 declared in library
在这里插入图片描述
3、Manifest merger failed : uses-sdk:minSdkVersion 1 cannot be smaller than version 7
You have to add the minSdkVersion to your build.gradle.

Otherwise, gradle uses the default value = 1.
You are using a library with minSdk=7, then you can’t use minSdk=1.

Also pay attention that gradle overrides the values in the Manifest.

Add something like this:

android {
compileSdkVersion 22
buildToolsVersion “22.0.1”

defaultConfig {
    minSdkVersion 14  
    targetSdkVersion 22
}

}
Pay attention to your build.gradle. You have two dependencies blocks. You have to merge these blocks.
4、旧版opencv升级到新版,导致java build失败
在这里插入图片描述
在这里插入图片描述

1.5 android studio+GIT

1)Android studio下将项目代码上传至github包括更新,同步,创建依赖
https://blog.csdn.net/asdf717/article/details/54290796
2)android studio将代码关联到git@osc(出现 Empty repository,以及push reject解决)
https://blog.csdn.net/r1254/article/details/51296258

1.6opencv build.gradle

compileSdkVersion 27和minSdkVersion 19对java的包有影响

1.7 opencv 引入函数Imgproc.Canny(tmpImage, detectedEdges, minThreshold, maxThreshold);闪退

以前手机安装opencv3.4apk时,shapedetection的contours detected也闪退,我手机改为安装opencv3.1时,就不闪退了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值