Android Studio inline compiler showing red errors, but compilation with gradle works fine

后端 未结 27 1186
[愿得一人]
[愿得一人] 2020-11-29 19:22

I\'ve set up my project in Android Studio to use the Square Wire library, as per this question.

Build -> Compile Project works fine.

<
27条回答
  •  旧时难觅i
    2020-11-29 19:58

    My hacky fix for this -

    1. Open your build.gradle file
    2. Cut out everything inside dependencies{}
    3. Paste in notepad for super safe temporary keeping
    4. Choose 'Sync Now' in the build.gradle file
    5. Wait for Sync to fail
    6. Paste your dependencies back in
    7. 'Sync Now' again

    Tried a lot of solutions and this was the only fix for me.

提交回复
热议问题