赞
踩
1、添加抖音外库
implementation "com.bytedance.ies.ugc.aweme:opensdk-china-external:0.1.8.0"
添加完成后执行Sync Now 外库的时候并没有 明显的报错
然后代码中import却爆红
import com.bytedance.sdk.open.douyin.DouYinOpenApiFactory;
2、仔细看了下确实有错误提示
Failed to resolve: com.bytedance.ies.ugc.aweme:opensdk-common:0.1.8.0
显示无法加载这个外库,查了资料后说是远程仓库的问题,需要添加远程仓库
在总目录的build.gradle里面添加下远程仓库
repositories {
flatDir {
dirs 'libs'
}
maven { url 'https://artifact.bytedance.com/repository/AwemeOpenSDK' }
}
结果发现还是空欢喜一场,依然无法
3、后面想起新版本的Android Studio 配置文件需要添加在settings.gradle ,在这里加入maven就正常了
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
maven { url 'https://artifact.bytedance.com/repository/AwemeOpenSDK' }
jcenter() // Warning: this repository is going to shut down soon
}
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。