Android Studio Mini Tutorial To Fix Compile Errors

Discussion in 'Technical Discussion' started by Androdev, Jun 9, 2018.

  1. Androdev

    Androdev Boxer

    Joined:
    May 27, 2017
    Messages:
    18
    Likes Received:
    6
    Hi Guys,
    I saw most of the people here is forum encounters a new compile error after the Android Studio update. Afters many hours & searching online I figure out how it can be resolved.
    *Sorry for my English lol

    Compile Error Looks Just Like This:
    [​IMG]

    STEP 1:
    [​IMG]

    STEP 2:
    [​IMG]

    STEP 3:
    [​IMG]

    STEP 4:
    [​IMG]

    STEP 5: BOOOM
    [​IMG]

    ** Apk is working fine on device
     
    ilinovik likes this.
  2. ilinovik

    ilinovik Boxer

    Joined:
    May 31, 2018
    Messages:
    50
    Likes Received:
    5
    step 3 worked! Thank you!
     
  3. SAvas

    SAvas Boxer

    Joined:
    Jun 12, 2018
    Messages:
    57
    Likes Received:
    9
    I still have not solved the problem. The pictures in the first message do not appear. Can someone please reload it? Help please !!!
     
  4. SAvas

    SAvas Boxer

    Joined:
    Jun 12, 2018
    Messages:
    57
    Likes Received:
    9
    I cant it. Because pictures of the first message not showing. Can u help me??
     
  5. Androdev

    Androdev Boxer

    Joined:
    May 27, 2017
    Messages:
    18
    Likes Received:
    6
    @SAvas Images are showing fine.. Can you send me Screenshot?
     
  6. SAvas

    SAvas Boxer

    Joined:
    Jun 12, 2018
    Messages:
    57
    Likes Received:
    9

    Attached Files:

  7. SAvas

    SAvas Boxer

    Joined:
    Jun 12, 2018
    Messages:
    57
    Likes Received:
    9
    Thank you so very very much. I work 2 days. There's no place I'm not looking. Now I could picture the pictures and solve the problem. I appreciate you
    @Androdev
     
  8. Androdev

    Androdev Boxer

    Joined:
    May 27, 2017
    Messages:
    18
    Likes Received:
    6
    @Andy
    Issue

    In the past few weeks some Google Android libraries on jcenter have gone missing, causing errors like yours.

    jcenter's maven-metadata.xml is still valid and contains versions which is causing gradle to assume the listed files are there and will try to download them without falling back to https://maven.google.com/. Even if you have this or google() next in your build.gradle, under jcenter().

    Fix
    In your root build.gradle make sure google() is before jcenter().
    Code:
    repositories {
    google()
    jcenter()
    }
    In most projects you will have to update this in 2 spots.
    
    buildscript {
    repositories {
    google()
    jcenter()
    }
    
    }
    
    allprojects {
    repositories {
    google()
    jcenter()
    }
    }
    Note: Use maven { url "https://maven.google.com" } instead of google() if your Gradle version is less than 4.0.
     
  9. Androdev

    Androdev Boxer

    Joined:
    May 27, 2017
    Messages:
    18
    Likes Received:
    6
  10. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    I've mentioned elsewhere, if you delete the gradle cache it should clear this up. Try to delete the gradle cache folder "~/.gradle/caches" then do a clean export and try to build with Android Studio. I have not seen this issue at all, so it is definitely a local for some people.
     

Share This Page