Gradle and Android v7 compat issue

后端 未结 2 1983
旧时难觅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:43

    Finally, I found the issue, thanks to for3st.

    Well, I didn't know that Android Studio SDK Manager and the SDK Manager that I downloaded on my own from the android web page did not refer to the following. That's the main issue here. Other issues were related to the problem:

    • I had such an old version of Android Studio (0.2) that I had to upgrade manually with the zip installer applying the patch. It seemed to work fine, but I'm not absolutely sure, so I uninstalled it and installed Android Studio 3.2 from the android developer site, then used the IDE mechanism to upgrade to 3.6. From now on, I'll enjoy easier upgrades.
    • Then I got lots of issues with Gradle, related to the version and all that, so I downloaded from the Gradle site the 1.8 version, placed somewhere in my disk, edited Android Studio settings to use this and edited the "gradle-wrapper.properties" to use the proper version.
    • More issues I got were due to downloading the required API versions that I targeted in my project, as well as matching the minSdkVersion and targetSdkVersion in AndroidManifest.xml and gradle.build files.
    • Then I checked my project structure and made the correct adjustments or added the "sourceSets" section in my build.gradle files.
    • Finally, I copied my third party dependencies (joda.time, android.v4 support) to my lib folder.

    I'm not sure which one solved the issue, but all of this solved it for sure. I decided to put all this in order to help someone who gets stucked. Use this as a checklist.

提交回复
热议问题