There is no compiler error. I am getting this error in runtime.
error: package com.nguyenhoanglam.imagepicker.activity does not exist
I am using many library in my project. Library link:
https://github.com/nguyenhoanglam/ImagePicker
There was no problem before the change.
Project Gradle:
// 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
}
App 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'
How can I solve my problem?
Library changed.
In fact I am using Java not Kotlin.
When I look the library, I saw that there is another equivalent library for Java.
https://github.com/esafirm/android-image-picker
This library works without any problem, now. I do not know why the first library is not working.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With