kotlin:无法获取提供程序pl.aprilapps.easyphotopicker.EasyImageFileProvider

时间:2020-04-26 17:27:54

标签: android kotlin easyimage

在我尝试输入有关Postgres Connection的代码之前,它一直运行良好。 我尝试过清理并重建。 我所能找到的关于这个确切错误的只是this link 感谢您的帮助!

简短错误:java.lang.RuntimeException:无法获取提供程序pl.aprilapps.easyphotopicker.EasyImageFileProvider:java.lang.ClassNotFoundException:在路径上找不到类“ pl.aprilapps.easyphotopicker.EasyImageFileProvider”

原因:java.lang.ClassNotFoundException:在路径上找不到类“ pl.aprilapps.easyphotopicker.EasyImageFileProvider”

完全错误:

java.lang.RuntimeException: Unable to get provider pl.aprilapps.easyphotopicker.EasyImageFileProvider: java.lang.ClassNotFoundException: Didn't find class "pl.aprilapps.easyphotopicker.EasyImageFileProvider" on path: DexPathList[[zip file "/data/app/com.codemobiles.project_eva-ZBs1e4rrAfw_NVGZqjNUDA==/base.apk"],nativeLibraryDirectories=[/data/app/com.codemobiles.project_eva-ZBs1e4rrAfw_NVGZqjNUDA==/lib/arm64, /system/lib64, /system/vendor/lib64]]
    at android.app.ActivityThread.installProvider(ActivityThread.java:6437)
    at android.app.ActivityThread.installContentProviders(ActivityThread.java:6000)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5912)
    at android.app.ActivityThread.-wrap1(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1680)
    at android.os.Handler.dispatchMessage(Handler.java:105)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6710)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:770)
 Caused by: java.lang.ClassNotFoundException: Didn't find class "pl.aprilapps.easyphotopicker.EasyImageFileProvider" on path: DexPathList[[zip file "/data/app/com.codemobiles.project_eva-ZBs1e4rrAfw_NVGZqjNUDA==/base.apk"],nativeLibraryDirectories=[/data/app/com.codemobiles.project_eva-ZBs1e4rrAfw_NVGZqjNUDA==/lib/arm64, /system/lib64, /system/vendor/lib64]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
    at android.app.ActivityThread.installProvider(ActivityThread.java:6422)
    at android.app.ActivityThread.installContentProviders(ActivityThread.java:6000) 
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5912) 
    at android.app.ActivityThread.-wrap1(Unknown Source:0) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1680) 
    at android.os.Handler.dispatchMessage(Handler.java:105) 
    at android.os.Looper.loop(Looper.java:164) 
    at android.app.ActivityThread.main(ActivityThread.java:6710) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:770) 

我的build.gradle

    apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.2"
    defaultConfig {
        applicationId "com.codemobiles.project_eva"
        minSdkVersion 26
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/INDEX.LIST'
        exclude 'META-INF/io.netty.versions.properties'
    }

}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.core:core-ktx:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.android.material:material:1.1.0'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.0.0'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'


    implementation 'com.github.jaiselrahman:FilePicker:1.3.2'

    implementation 'androidx.cardview:cardview:1.0.0'

    // Shared Preference
    implementation 'com.pixplicity.easyprefs:library:1.9.0'
    // Runtime Permission
    implementation 'com.karumi:dexter:5.0.0'
}


repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {

    implementation 'com.squareup.retrofit2:retrofit:2.5.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.5.0'

    implementation 'com.github.jkwiecien:EasyImage:3.0.3'
    implementation 'com.github.bumptech.glide:glide:4.9.0'

}


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

}
dependencies {
    implementation 'com.github.bumptech.glide:glide:4.8.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0'
}
// Glide - Image loading framework Library End


dependencies {
    implementation 'com.google.android.gms:play-services-maps:+'
    implementation 'com.google.android.gms:play-services-location:+'

    implementation 'androidx.appcompat:appcompat:+'

    //Elastic button
    implementation "com.github.skydoves:elasticviews:2.0.7"

    //Shrine text fields
    api 'com.google.android.material:material:1.1.0-alpha06'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'com.android.volley:volley:1.1.1'
    implementation 'com.google.code.gson:gson:2.8.5'

    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:core:1.1.0'
    androidTestImplementation 'androidx.test.ext:junit:1.1.0'
    androidTestImplementation 'androidx.test:runner:1.2.0-alpha05'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-alpha05'
}

dependencies {
    implementation 'androidx.legacy:legacy-support-v4:+'
}

//Exposed - Connect to Postgres
repositories {
    jcenter()
}
dependencies {
    implementation 'org.jetbrains.exposed:exposed-core:0.23.1'
    implementation 'org.jetbrains.exposed:exposed-dao:0.23.1'
    implementation 'org.jetbrains.exposed:exposed-jdbc:0.23.1'
    implementation 'com.h2database:h2:1.4.200'
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
    implementation 'io.reactiverse:reactive-pg-client:0.11.4'
}

1 个答案:

答案 0 :(得分:0)

我使用Android仿真器代替物理移动设备,并且效果很好! 我认为内部存储存在问题。不过不是很确定。