You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

无法解析com.github.unsplash:unsplash-photopicker-android:1.0.1依赖求助

无法解析Unsplash Photopicker依赖问题

我在创建新项目并配置依赖时遇到如下错误:

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find com.github.unsplash:unsplash-photopicker-android:1.0.1.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/github/unsplash/unsplash-photopicker-android/1.0.1/unsplash-photopicker-android-1.0.1.pom
       - https://repo.maven.apache.org/maven2/com/github/unsplash/unsplash-photopicker-android/1.0.1/unsplash-photopicker-android-1.0.1.pom
     Required by:
         project :app

我按照官方文档说明引入该库,并且已添加maven仓库配置:

repositories {
        maven { url 'https://jitpack.io' }
        google()
        mavenCentral()
    }

不清楚错误原因,希望能得到帮助!以下是完整的app模块build.gradle代码:

plugins {
    id 'com.android.application'
    id 'kotlin-android'
    id 'kotlin-kapt'
    id 'kotlin-parcelize'
}

android {
    compileSdk 31

    defaultConfig {
        applicationId "com.garvardinho.nwcode"
        minSdk 21
        targetSdk 31
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
}

dependencies {
    // androidx
    implementation 'androidx.appcompat:appcompat:1.4.2'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'androidx.core:core-ktx:1.8.0'

    // moxy
    implementation 'com.github.moxy-community:moxy:2.2.2'
    implementation 'com.github.moxy-community:moxy-ktx:2.2.2'
    implementation 'com.github.moxy-community:moxy-androidx:2.2.2'
    kapt 'com.github.moxy-community:moxy-compiler:2.2.2'

    // cicerone
    implementation 'com.github.terrakok:cicerone:7.1'

    // material
    implementation 'com.google.android.material:material:1.6.1'

    // gson
    implementation 'com.google.code.gson:gson:2.8.9'

    // okhttp
    implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.3'
    implementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.3'

    // picasso
    implementation 'com.squareup.picasso:picasso:2.71828'

    // retrofit
    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
    implementation 'com.squareup.retrofit2:adapter-rxjava3:2.9.0'

    // rxjava
    implementation 'io.reactivex.rxjava3:rxjava:3.1.5'
    implementation 'io.reactivex.rxjava3:rxandroid:3.0.0'

    // dagger
    implementation 'com.google.dagger:dagger:2.42'
    kapt 'com.google.dagger:dagger-compiler:2.42'

    // unsplash
    implementation 'com.github.unsplash:unsplash-photopicker-android:1.0.1'

    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}

内容的提问来源于stack exchange,提问作者Gavriil

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.26 02:18:20