本文主要是介绍Android Notes,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
maven 版本发布
1、小于 AGP7+
使用 maven 插件
apply plugin: 'maven'
uploadArchives {repositories {mavenDeployer {pom.groupId = GROUP_IDpom.artifactId = ARTIFACT_IDpom.version = VERSION//正式版本repository(url: RELEASE_URL) {authentication(userName: userName, password: pwd)}//快照版本snapshotRepository(url: SNAPSHOT_URL) {authentication(userName: userName, password: pwd)}}}
}
2、大于等于 AGP7+
Goodle Android
使用 maven-publish 插件
plugins {id 'maven-publish'
}afterEvaluate {publishing {publications {release(MavenPublication) {from components.releasegroupId = GROUP_IDartifactId = ARTIFACT_IDversion = "$sample_version"}}repositories {maven {//如果仓库地址是 http,https 则不需要allowInsecureProtocol trueurl 'http://****/repository/primer-snapshot'credentials {username "123456"password "123456"}}}}
}
More than one file was found with OS
问题
Execution failed for task ':app:mergeCommonReleaseNativeLibs'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade> More than one file was found with OS independent path 'lib/x86/liblog.so'.
If you are using jniLibs and CMake IMPORTED targets,
see https://developer.android.com/studio/preview/features#automatic_packaging_of_prebuilt_dependencies_used_by_cmake
解决
defaultConfig {packagingOptions {exclude 'lib/x86_64/liblog.so'exclude 'lib/x86/liblog.so'exclude 'lib/arm64-v8a/liblog.so'exclude 'lib/armeabi-v7a/liblog.so'}
}
这篇关于Android Notes的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!