Android Studio Suddenly started to display unable to resolve com.android.support…25.0.0 error messages and all of my java files are erroneous now?

后端 未结 7 1946
花落未央
花落未央 2020-12-17 09:26

My project was working very fine, but until one day, when I uploaded my project to github. I don\'t know if this issue is related to that but today when I compiled my androi

相关标签:
7条回答
  • 2020-12-17 10:02

    If you added the latest Facebook SDK or using + for Facebook dependency, revert to a previous version

    compile 'com.facebook.android:facebook-android-sdk:4.16.1'

    0 讨论(0)
  • 2020-12-17 10:05

    Open your android SDK manager (from C:\Users\youruseraccount\AppData\Local\Android\sdk) and update following to latest versions in,

    Tools section section

    1. Android SDK Tool

    2. Android SDK Platform-Tools

    3. Android SDK Build tool

    Android 7.1.1 (API 25) section

    1. SDK Platform

    Extras Section

    1. Android Support Repository
    2. Android Support Library

    Then update your gradle file accordingly.

    0 讨论(0)
  • 2020-12-17 10:05

    I had the same problem earlier today. Out of nowhere, I started having those weird error messages. Updating:

    1. Android SDK Tool
    2. Android SDK Platform-Tools
    3. Android SDK Build tool
    4. Android Support Repository

    did the trick for me. Just go to Tools > Android > SDK Manager in your Android Studio then find and update them. Good luck!

    0 讨论(0)
  • 2020-12-17 10:10

    Just updating the Android support repository version to 25 did my work. Thanks to all of you for the guidance!

    0 讨论(0)
  • 2020-12-17 10:18

    Facebook updated their SDK to use the latest support libraries. You could replace

    compile 'com.facebook.android:facebook-android-sdk:[4,5)'
    

    with

    compile 'com.facebook.android:facebook-android-sdk:4.16.1'
    

    if you do not want to update your android sdk just yet.

    0 讨论(0)
  • 2020-12-17 10:26

    If you try to remove facebook-sdk compile from dependencies will not show that error. So i think is facebook sdk error.

    I was using 'com.facebook.android:facebook-android-sdk:[4,5)' but gives error, i tried this com.facebook.android:facebook-android-sdk:4.+ but is the same. But when i remove it app build successfully. Am i the only i came in this conclude and having the same problem ?

    0 讨论(0)
提交回复
热议问题