gpt4 book ai didi

java - 错误 : package com. nguyenhoanglam.imagepicker.activity 不存在

转载 作者:行者123 更新时间:2023-12-01 09:57:23 26 4
gpt4 key购买 nike

没有编译器错误。我在运行时收到此错误。

error: package com.nguyenhoanglam.imagepicker.activity does not exist
我在我的项目中使用了许多库。图书馆链接:
https://github.com/nguyenhoanglam/ImagePicker
  • 我添加了滑翔库
  • 将 compileSdkVersion 和 targetSdkVersion 从 28 更改为 29。
  • 将项目迁移到 AndroidX

  • 改前没有问题。
    项目分级:
    // Top-level build file where you can add configuration options common to all sub-projects/modules.

    buildscript {
    repositories {
    google()
    jcenter()
    maven { url 'https://maven.google.com' }
    maven { url "https://jitpack.io"}

    }
    dependencies {
    classpath 'com.android.tools.build:gradle:3.5.4'

    //classpath 'com.google.gms:google-services:1.3.0-beta1'
    classpath 'com.google.gms:google-services:4.3.3'



    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
    }
    }

    allprojects {
    repositories {
    google()
    jcenter()
    maven { url "https://maven.google.com" }
    maven { url "https://jitpack.io"}

    }
    }

    task clean(type: Delete) {
    delete rootProject.buildDir
    }
    应用 Gradle:
    apply plugin: 'com.android.application'

    buildscript {
    repositories {
    maven { url 'https://plugins.gradle.org/m2/'}
    maven { url "https://jitpack.io" }
    google()
    jcenter()

    }
    dependencies {
    classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.4, 0.99.99]'
    }
    }


    apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'


    android {
    compileSdkVersion 29
    buildToolsVersion '28.0.3'

    defaultConfig {
    applicationId "x.y.z"

    manifestPlaceholders = [onesignal_app_id: "XX",
    // Project number pulled from dashboard, local value is ignored.
    onesignal_google_project_number: "YY"]

    minSdkVersion 16
    targetSdkVersion 29
    versionCode 35
    versionName "3.10.0"
    multiDexEnabled true

    }
    buildTypes {
    release {
    minifyEnabled false
    proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
    }
    }

    dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'com.rengwuxian.materialedittext:library:2.1.4'
    implementation 'com.intuit.sdp:sdp-android:1.0.3'
    implementation 'com.jaredrummler:material-spinner:1.1.0'
    implementation 'com.github.nguyenhoanglam:ImagePicker:1.4.3'
    implementation 'com.google.android.gms:play-services-ads:19.3.0'
    implementation 'com.google.android.gms:play-services-analytics:17.0.0'
    implementation 'com.github.hotchemi:android-rate:1.0.1'
    implementation 'com.karumi:dexter:5.0.0'
    //4.1.0
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.firebase:firebase-core:17.4.4'
    implementation 'com.google.firebase:firebase-database:19.3.1'
    implementation 'com.google.firebase:firebase-messaging:20.2.4'
    testImplementation 'junit:junit:4.12'
    implementation 'com.onesignal:OneSignal:[3.11.2, 3.99.99]'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.multidex:multidex:2.0.1'
    implementation 'com.github.bumptech.glide:glide:4.11.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
    }



    apply plugin: 'com.google.gms.google-services'
    我该如何解决我的问题?

    最佳答案

    图书馆改变了。
    事实上,我使用的是 Java 而不是 Kotlin。
    当我查看该库时,我看到还有另一个等效的 Java 库。
    https://github.com/esafirm/android-image-picker
    这个库现在可以正常工作了。我不知道为什么第一个库不工作。

    关于java - 错误 : package com. nguyenhoanglam.imagepicker.activity 不存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63204640/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com