alibaba / weex

A framework for building Mobile cross-platform UI
https://weexapp.com/
Apache License 2.0
18.27k stars 2.13k forks source link

[Android] 无法识别 WeexURLConnectionManager #3286

Closed lcy19 closed 2 years ago

lcy19 commented 2 years ago

Describe the bug

Android项目中集成Weex 0.30.2,在对应的module中已经导入如下内容

 // net connect
    implementation 'com.taobao.android.weex_inspection:urlconnection_interceptor:1.0.0'
    implementation 'com.taobao.android.weex_inspection:protocol:1.1.4.1'

但在InterceptWXHttpAdapter类中还是无法识别,build项目提示

Could not find com.taobao.android.weex_inspection:urlconnection_interceptor:1.0.0.

对应的也没有找到相应的maven仓库

lcy19 commented 2 years ago

抱歉是因为自己没有导入阿里云的仓库。在AS小蜜蜂版的settings.gradle中添加如下代码

pluginManagement {
    repositories {
        gradlePluginPortal()
        google()
        mavenCentral()
        maven {
            url 'https://maven.aliyun.com/nexus/content/groups/public'
        }
    }
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven {
            url 'https://maven.aliyun.com/nexus/content/groups/public'
        }
    }
}
...

就可以找到对应的文件了。