Gradle and Android v7 compat issue

后端 未结 2 1981
旧时难觅i
旧时难觅i 2021-01-16 17:50

I have problems compiling my Android app with Gradle. I\'m a newbie with Gradle, so...

It seems that Gradle cannot resolve correctly v7 compat library. This is the c

2条回答
  •  执笔经年
    2021-01-16 18:51

    Problem is probably the missing appcompat repo in your Android SDK.

    Probably you are using 2 instances of gradle and Android SDK. Android Studio comes bundled with it's own Android SDK, so updating this wont change your previous installed one. Also normally you would start a Gradle project in Android Studio with a Gradle-Wrapper that handles manageing the gradle instance on its own (usually it will get downloaded into your %USER%/.gradle folder)

    I also guess you downloaded gradle and that instance is what you use through the commandline. So to fix this just update your none-android studio android sdk (also check all the repos)

    More to the Issue: Android Library Projects won't get bundled as a jar since they need additional resources. The format for this is AAR, which to my knowledge cannot be build directly as for now. Also the gradle android plugin does not work with local AARs, only from maven/ivy repositories (this is a design descion and on purpose)

提交回复
热议问题