突然不能下载?Could not find com.github.hannesa2:paho.mqtt.android:4.2.1

早上还好好的,下午rebuild提示错误


FAILURE: Build completed with 13 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task  :app:compileFlavor_hjzxDebugAidl .
> Could not resolve all files for configuration  :app:flavor_hjzxDebugCompileClasspath .
   > Could not find com.github.hannesa2:paho.mqtt.android:4.2.1.
     Required by:
         project :app

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task  :app:checkFlavor_hjzxDebugAarMetadata .
> Could not resolve all files for configuration  :app:flavor_hjzxDebugRuntimeClasspath .
   > Could not find com.github.hannesa2:paho.mqtt.android:4.2.1.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/github/hannesa2/paho.mqtt.android/4.2.1/paho.mqtt.android-4.2.1.pom
       - https://repo.maven.apache.org/maven2/com/github/hannesa2/paho.mqtt.android/4.2.1/paho.mqtt.android-4.2.1.pom
       - https://www.jitpack.io/com/github/hannesa2/paho.mqtt.android/4.2.1/paho.mqtt.android-4.2.1.pom
       - https://repo.eclipse.org/content/repositories/paho-releases/com/github/hannesa2/paho.mqtt.android/4.2.1/paho.mqtt.android-4.2.1.pom
       - https://maven.aliyun.com/repository/google/com/github/hannesa2/paho.mqtt.android/4.2.1/paho.mqtt.android-4.2.1.pom
       - https://maven.aliyun.com/repository/jcenter/com/github/hannesa2/paho.mqtt.android/4.2.1/paho.mqtt.android-4.2.1.pom
     Required by:
         project :app

查看
https://github.com/hannesa2/paho.mqtt.android/releases 版本4.2.1 的确 不见了

https://jitpack.io/#hannesa2/paho.mqtt.android 查看4.2.1 还在

会不会跟我删除如下有关

C 盘 → Usersyoung.gradlecaches ransforms-4(删除该目录下所有文件)
C 盘 → Usersyoung.gradlecachesmodules-2(删除该目录下所有文件)

突然不能下载?Could not find com.github.hannesa2:paho.mqtt.android:4.2.1


解决竟然是4.2.1突然不能用

//    implementation ( com.github.hannesa2:paho.mqtt.android:4.2.1 )//for android 14 ok  不过奇怪2025-11-06 突然不能用
    implementation ( com.github.hannesa2:paho.mqtt.android:3.6.6 )

© 版权声明

相关文章

暂无评论

您必须登录才能参与评论!
立即登录
none
暂无评论...