While building my project, I get this error :-
Could not find androidx.support:support-v4:+ ______ Required by: project :app
I don't know why I get this error, even I have added the dependency...
My build.gradle(:app) :-
plugins {
id 'com.onesignal.androidsdk.onesignal-gradle-plugin'
id 'com.android.application'
// Other plugins here if pre-existing
}
android {
dataBinding {
enabled = true}
compileSdk 32
buildFeatures{
viewBinding true
}
defaultConfig {
applicationId "com.dccodes.chugli"
minSdk 21
targetSdk 31
versionCode 5
versionName '1.0'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
namespace 'com.dccodes.chugli'
buildToolsVersion '33.0.0'
}
dependencies {
implementation 'com.github.hani-momanii:SuperNova-Emoji:1.1'
implementation 'com.android.tools.build:gradle:7.2.0'
implementation 'androidx.appcompat:appcompat:1.5.0'
implementation 'com.google.android.material:material:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.appcompat:appcompat:1.5.0'
implementation 'androidx.support:support-v4:'
implementation 'org.jetbrains:annotations:23.0.0'
implementation 'com.google.firebase:firebase-firestore:24.2.1'
implementation 'androidx.emoji:emoji:1.1.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.google.firebase:firebase-auth:21.0.6'
implementation 'com.google.firebase:firebase-database:20.0.5'
implementation 'com.google.firebase:firebase-storage:20.0.1'
implementation 'de.hdodenhof:circleimageview:3.1.0'
implementation 'com.github.bumptech.glide:glide:4.13.2'
annotationProcessor 'com.github.bumptech.glide:compiler:4.13.2'
implementation 'com.github.mukeshsolanki:android-otpview-pinview:2.1.2'
implementation platform('com.google.firebase:firebase-bom:30.3.1')
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-auth'
implementation 'com.google.firebase:firebase-database:20.0.5'
implementation 'com.google.firebase:firebase-storage'
implementation 'androidx.preference:preference:1.2.0'
implementation 'com.google.firebase:firebase-messaging'
implementation 'com.google.firebase:firebase-config'
implementation 'de.hdodenhof:circleimageview:3.1.0'
implementation 'com.github.bumptech.glide:glide:4.13.2'
annotationProcessor 'com.github.bumptech.glide:compiler:4.13.2'
implementation 'com.github.pgreze:android-reactions:1.6'
implementation 'com.devlomi:circularstatusview:1.0.1'
implementation 'com.github.OMARIHAMZA:StoryView:1.0.2-alpha'
implementation 'com.github.sharish:ShimmerRecyclerView:v1.3'
implementation 'com.android.volley:volley:1.2.1'
implementation 'com.onesignal:OneSignal:4.8.2'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.24'
}
apply plugin: 'com.google.gms.google-services'
My build.gradle(Chugli) :-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
maven { url 'https://jitpack.io' }
google()
mavenCentral()
gradlePluginPortal()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath 'com.google.gms:google-services:4.3.10'
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.10, 0.99.99]'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I don't know why I get this error, I have even cleaned my project several time...
Can anyone help me out ?
You are not providing the version in the dependency. Try to add the version and then rebuild it.