1. Are you ready for the Galaxy S20? Here is everything we know so far!

package android.support.annotation does not exist

Discussion in 'Android Development' started by Revo Wisse, Sep 8, 2019.

  1. Revo Wisse

    Revo Wisse Lurker
    Thread Starter

    This error has been posted on stackoverflow however mine is different.I updated to androidx, The project doesn't show any error after sync and cleaning! but when i try to build it, i encounter this error in the build generated source.

    bellow is my app gradle

    Code (Text):
    1. apply plugin: 'com.android.application'
    2. apply plugin: 'realm-android'
    3.  
    4. android {
    5.     compileSdkVersion 28
    6.     buildToolsVersion '28.0.3'
    7.     defaultConfig {
    8.         applicationId 'com.fundi.taxi.rider'
    9.         minSdkVersion 21
    10.         targetSdkVersion 28
    11.         versionCode 13
    12.         versionName '14'
    13.         vectorDrawables.useSupportLibrary = true
    14.         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    15.         multiDexEnabled true
    16.         dexOptions {
    17.             javaMaxHeapSize '4g'
    18.         }
    19.     }
    20.  
    21.     buildTypes {
    22.         release {
    23.             minifyEnabled false
    24.             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    25.         }
    26.     }
    27.     productFlavors {
    28.     }
    29. }
    30.  
    31. allprojects {
    32.     repositories {
    33.         mavenCentral()
    34.     }
    35. }
    36.  
    37. dependencies {
    38.     implementation  'pl.droidsonroids.gif:android-gif-drawable:1.2.17'
    39. }
    40. dependencies {
    41.     api fileTree(include: ['*.jar'], dir: 'libs')
    42.     androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
    43.         exclude group: 'com.android.support', module: 'support-annotations'
    44.         exclude group: 'com.google.code.findbugs'
    45.     })
    46.     api('com.mikepenz:fastadapter:2.0.0@aar') {
    47.         transitive = true
    48.     }
    49.     implementation  'com.afollestad.material-dialogs:core:0.9.0.0'
    50.     implementation  'com.mikepenz:iconics-core:2.8.1@aar'
    51.     implementation  'com.mikepenz:fontawesome-typeface:4.6.0.2@aar'
    52.  
    53.     implementation ('cn.trinea.android.view.autoscrollviewpager:android-auto-scroll-view-pager:1.1.2') {
    54.         exclude module: 'support-v4'
    55.     }
    56.     testImplementation 'junit:junit:4.12'
    57.     annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
    58.  
    59.     implementation 'androidx.cardview:cardview:1.0.0'
    60.     implementation 'androidx.appcompat:appcompat:1.0.2'
    61.     implementation 'androidx.recyclerview:recyclerview:1.0.0'
    62.     implementation 'com.google.android.material:material:1.0.0'
    63.     implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    64.     implementation 'androidx.vectordrawable:vectordrawable:1.0.1'
    65.     implementation 'androidx.multidex:multidex:2.0.1'
    66.     implementation  'com.google.guava:guava:24.1-jre'
    67.     implementation  'com.dmitrymalkovich.android:material-design-dimens:1.4'
    68.     implementation  'com.ogaclejapan.smarttablayout:library:1.6.1@aar'
    69.     implementation  'com.ogaclejapan.smarttablayout:utils-v4:1.6.1@aar'
    70.     implementation  'com.jakewharton:butterknife:8.4.0'
    71.     implementation  'me.relex:circleindicator:1.2.2@aar'
    72.     implementation  'com.squareup.okhttp3:okhttp:3.10.0'
    73.     implementation  'com.squareup.retrofit2:retrofit:2.1.0'
    74.     implementation  'com.squareup.retrofit2:converter-gson:2.1.0'
    75.     implementation  'com.squareup.okhttp3:logging-interceptor:3.4.1'
    76.     implementation  'com.google.firebase:firebase-core:17.2.0'
    77.     implementation  'com.google.firebase:firebase-messaging:20.0.0'
    78.     implementation  'com.google.firebase:firebase-auth:19.0.0'
    79.     implementation  'com.mobsandgeeks:android-saripaar:2.0.3'
    80.     implementation  'com.google.android.libraries.places:places:2.0.0'
    81.     implementation  'com.google.android.gms:play-services:12.0.1'
    82.     implementation 'com.google.android.gms:play-services-tasks:17.0.0'
    83.     implementation  'org.greenrobot:eventbus:3.1.0'
    84.     implementation  'com.makeramen:roundedimageview:2.2.1'
    85.     implementation  'com.squareup.picasso:picasso:2.5.2'
    86.     implementation  'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
    87.     implementation  'com.github.siyamed:android-shape-imageview:0.9.3'
    88.     implementation  'de.hdodenhof:circleimageview:2.0.0'
    89.     implementation  'com.github.bumptech.glide:glide:3.7.0'
    90.     implementation  'com.mcxiaoke.volley:library:1.0.19'
    91.     implementation  'com.balysv:material-ripple:1.0.2'
    92.  
    93. }
    94. dependencies {
    95.     implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    96. }
    97. apply plugin: 'com.google.gms.google-services'
    Code (Text):
    1. buildscript {
    2.     repositories {
    3.         jcenter()
    4.         google()
    5.     }
    6.     dependencies {
    7.         classpath 'com.android.tools.build:gradle:3.4.2'
    8.         classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
    9.         classpath 'com.google.gms:google-services:4.3.1'
    10.         classpath 'com.jakewharton:butterknife-gradle-plugin:10.1.0'
    11.         classpath 'io.realm:realm-gradle-plugin:5.13.1'
    12.  
    13.         // NOTE: Do not place your application dependencies here; they belong
    14.         // in the individual module build.gradle files
    15.     }
    16. }
    17.  
    18. allprojects {
    19.     repositories {
    20.         jcenter()
    21.         google()
    22.         maven {
    23.             url "https://maven.google.com"
    24.         }
    25.     }
    26. }
    27.  
    28. task clean(type: Delete) {
    29.     delete rootProject.buildDir
    30. }
    31.  
     

    Attached Files:




    1. Download the Forums for Android™ app!


      Download

       
  2. GameTheory

    GameTheory Android Expert

    Looks like you're missing the annotation library in your dependencies in the build.gradle.

    Code (Groovy):
    1. implementation 'androidx.annotation:annotation:1.0.2'
    Or could also be...

    Code (Groovy):
    1. implementation 'androidx.annotation:annotation:1.1.0'
     
  3. Revo Wisse

    Revo Wisse Lurker
    Thread Starter

    Thanks boss but it's the same error!
     
Loading...

Share This Page

Loading...