permissions权限配置:
// 二维码 START
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
// 二维码 END
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_BACKGROUND_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.FOREGROUND_SERVICE\"/>",
// 二维码
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
// 获取粗略位置
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
// 访问网络
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
// 获取网络状态
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
// 获取 WIFI 信息
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
// WIFI 状态改变
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
// 摄像头
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
// 录音
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
// 更改音频设置
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
// 访问外部存储
"<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/>",
// 写入外部存储
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
// 访问图片
"<uses-permission android:name=\"android.permission.READ_MEDIA_IMAGES\"/>",
// 访问视频
"<uses-permission android:name=\"android.permission.READ_MEDIA_VIDEO\"/>",
// 访问音乐
"<uses-permission android:name=\"android.permission.READ_MEDIA_AUDIO\"/>",
// 写入设备缓存,用于问题排查
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\" tools:ignore=\"ProtectedPermissions\"/>"
原生插件 build.gradle 配置
apply plugin: 'com.android.library'
android {
compileSdkVersion 31
defaultConfig {
minSdkVersion 16
targetSdkVersion 31
versionCode 1
versionName "1.0"
multiDexEnabled true
ndk {
abiFilters 'x86','armeabi-v7a',"arm64-v8a","arm64"
}
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
flatDir {
dirs 'libs'
}
}
dependencies {
compileOnly fileTree(dir: 'libs', include: ['*.jar'])
compileOnly fileTree(dir: '../app/libs', include: ['uniapp-v8-release.aar'])
implementation files('libs/bdasr_V3_20180801_d6f298a.jar')
implementation files('libs/ECumminsCDS.jar')
// implementation files('libs/AMap3DMap_8.1.0_AMapNavi_8.1.0_AMapSearch_8.1.0_AMapLocation_5.6.2_20211230.jar')
compileOnly 'androidx.recyclerview:recyclerview:1.0.0'
compileOnly 'androidx.legacy:legacy-support-v4:1.0.0'
compileOnly 'androidx.appcompat:appcompat:1.0.0'
implementation 'com.alibaba:fastjson:1.2.83'
implementation 'com.facebook.fresco:fresco:1.13.0'
implementation 'com.google.code.gson:gson:2.6.2'
//权限
// implementation project(':grantor')
/*implementation 'com.android.support:appcompat-v7:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'*/
}
d***@qq.com (作者)
自己开发的插件,没上架到插件市场,没用微信的东西
2024-02-06 16:40
II优选
回复 d***@qq.com: 缺少依赖com/google/gson/Gson;
2024-02-06 16:46
d***@qq.com (作者)
回复 II优选: 谢谢,确实是少gson依赖
2024-07-01 13:59