uni-app使用了第三方插件,提交云服务打包失败,无法下载/ava-Websocket 1.5.1.pom

uni-app使用了第三方插件,提交云服务打包失败,无法下载/ava-Websocket 1.5.1.pom

操作步骤:

项目中使用第三方插件https://ext.dcloud.net.cn/plugin?id=10186,提交云打包(打基座),然后结果打包失败

预期结果:

可以正常打包成功

实际结果:

可以正常打包成功

bug描述:

我项目中使用了第三方的一个websocket的插件(https://ext.dcloud.net.cn/plugin?id=10186),提交打基座失败了:

Appid: UNI199DA0E
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: unexpected element (uri:"", local:"extension-level"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: unexpected element (uri:"", local:"extension-level"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: unexpected element (uri:"", local:"extension-level"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
Warning: Errors limit exceeded. To receive all errors set com.sun.xml.bind logger to FINEST level.
Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:checkReleaseAarMetadata'.
Could not resolve all files for configuration ':app:releaseRuntimeClasspath'.
Could not resolve org.java-websocket:Java-WebSocket:1.5.1.
Required by:
project :app
Could not resolve org.java-websocket:Java-WebSocket:1.5.1.
Could not get resource 'https://dl.google.com/dl/android/maven2/org/java-websocket/Java-WebSocket/1.5.1/Java-WebSocket-1.5.1.pom'.
Could not GET 'https://dl.google.com/dl/android/maven2/org/java-websocket/Java-WebSocket/1.5.1/Java-WebSocket-1.5.1.pom'. Received status code 503 from server: Forwarding failure
Try:
Run with --debug option to get more log output.
Run with --scan to get full insights.
Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:checkReleaseAarMetadata'.
...
BUILD FAILED in 6s
gradle build error: 1

更多关于uni-app使用了第三方插件,提交云服务打包失败,无法下载/ava-Websocket 1.5.1.pom的实战教程也可以访问 https://www.itying.com/category-93-b0.html

1 回复

更多关于uni-app使用了第三方插件,提交云服务打包失败,无法下载/ava-Websocket 1.5.1.pom的实战教程也可以访问 https://www.itying.com/category-93-b0.html


在使用 uni-app 开发时,如果提交云打包失败,并且报错提示无法下载某个第三方插件(如 /ava-Websocket 1.5.1.pom),通常是由于以下原因之一导致的:

1. 网络问题

  • 云打包服务在下载依赖时可能因为网络问题无法连接到 Maven 仓库或其他依赖源。
  • 尝试重新提交打包,或者检查你的网络环境是否正常。

2. 依赖源问题

  • 第三方插件可能依赖于某个 Maven 仓库,而该仓库可能无法访问或已被移除。
  • 检查 build.gradlepom.xml 文件,确保依赖的仓库地址是正确的,并且是可访问的。

3. 插件版本问题

  • 插件版本 1.5.1 可能已被移除或不再维护。
  • 尝试更新插件到最新版本,或者使用其他替代插件。

4. uni-app 配置问题

  • 确保 manifest.json 或其他配置文件中正确配置了插件信息。
  • 检查 uni-app 的 package.json 或其他依赖管理文件,确保没有冲突的依赖。

5. 云打包服务问题

  • 云打包服务可能存在临时问题,可以稍后再试。
  • 如果问题持续,可以联系 uni-app 官方技术支持。

解决方法:

  1. 检查依赖源
    build.gradlepom.xml 中添加或修改 Maven 仓库地址,例如:

    repositories {
        mavenCentral()
        jcenter()
        google()
        maven { url 'https://jitpack.io' } // 如果需要
    }
    
  2. 更新插件版本
    package.json 或其他依赖管理文件中,将插件更新到最新版本,例如:

    "dependencies": {
        "ava-websocket": "^2.0.0"
    }
    
  3. 本地打包
    如果云打包失败,可以尝试在本地使用 HBuilderX 进行打包,检查是否有相同的错误。

  4. 清理缓存
    清理 uni-app 的缓存,重新拉取依赖:

    • 删除 node_modules 文件夹。
    • 运行 npm installyarn install 重新安装依赖。
  5. 联系官方支持
    如果问题仍未解决,可以联系 uni-app 官方技术支持,提供详细的错误日志以便进一步排查。

错误日志分析

查看云打包的详细错误日志,通常会有更具体的信息,例如:

  • 无法下载的依赖路径。
  • 网络连接超时或仓库不可访问的提示。

根据错误日志进一步定位问题。

示例:

如果错误日志显示:

Could not download ava-websocket-1.5.1.pom
回到顶部