插件module的build.gradle如下:
apply plugin: 'com.android.library'
android {
compileSdkVersion 34
namespace 'com.xxx.uniplugin_inappreview'
defaultConfig {
minSdkVersion 21
targetSdkVersion 34
versionCode 1
versionName "1.0"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
//导入aar需要的配置
repositories {
// google()
// mavenCentral()
flatDir {
dirs 'libs'
}
}
dependencies {
// implementation 'com.google.android.play:core:1.8.0'
implementation 'com.google.android.play:review:2.0.1'
//必须添加的依赖
// implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0'
// compileOnly 'androidx.core:core:1.13.0'
// compileOnly 'androidx.fragment:fragment:1.8.2.0'
// compileOnly 'androidx.recyclerview:recyclerview:1.3.2.0'
// compileOnly 'androidx.legacy:legacy-support-v4:1.0.0'
// compileOnly 'com.alibaba:fastjson:1.2.83'
// compileOnly 'androidx.appcompat:appcompat:1.7.0'
compileOnly 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.facebook.fresco:fresco:1.13.0'
//必须添加的依赖
compileOnly 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
compileOnly 'androidx.core:core:1.1.0'
compileOnly 'androidx.fragment:fragment:1.1.0'
compileOnly 'androidx.appcompat:appcompat:1.1.0'
compileOnly 'androidx.recyclerview:recyclerview:1.1.0'
compileOnly 'com.alibaba:fastjson:1.2.83'
compileOnly fileTree(dir: 'libs', include: ['*.jar'])
compileOnly fileTree(include: ['uniapp-v8-release.aar'], dir: '../app/libs')
implementation 'com.google.android.material:material:1.12.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.2.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
}
nopilot (作者)
可以不开发uni原生插件实现,在自定义基座和云打包时引用这个依赖吗?还是说必须自己开发uni原生插件?
2024-07-31 15:30
DCloud_App_Array
回复 nopilot: 只有uni原生插件或uts插件才可以配置使用依赖(或三方SDK库)。
2024-07-31 15:58
nopilot (作者)
回复 DCloud_App_Array: 尝试弄了个安卓原生本地插件,但云打包报错,能帮着看看是什么问题吗?谢谢! https://app.liuyingyong.cn/build/errorLog/f9452f10-4ed4-11ef-bd53-d5589cc62c33
2024-07-31 16:36