少废话,直接开始
项目地址https://github.com/ccc920123/LicensePlateDemo
方式一
项目build.gradle添加
app build.gradle 添加
方式一我放到项目中报错,
但是需要跟方式二一样在gradle中添加ndk的支持,方法同下。
方式二
引入?licenseplatelib-v1.0.aar
由于library包含so 需要在 app 的build.gradle中添加
ndk的支持
什么?不会引入aar?
那我好人做到底吧!
第一步吧下载好的aar放在libs中
然后在app的build.gradle中加入
android{
repositories {
flatDir {
dirs 'libs'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation (name: '你的aar的名字', ext: 'aar')
}
至此 给上权限就可以扫码使用了,亲测速度很快。
可能有的小伙伴不满足于他提供的扫码界面,那没办法了,只能引入library改了。