aiproute
aiproute copied to clipboard
Cannot build on Android Studio 2020.3.1 Patch 1
I am unable to build in the above version of Android Studio. It complains about old graddle version:
This version of Android Studio requires projects to use Gradle 4.8.1 or newer. This project is using Gradle 2.4. Change to minimum versions (plugin 3.2.0, Gradle 4.8.1) and sync project Change to latest versions (plugin 7.0.1, Gradle 7.0.2) and sync project Open build file
I have read on https://github.com/openaps/AndroidAPSdocs/blob/master/docs/EN/Installing-AndroidAPS/Building-APK.md that I should not update graddle version. What should I do?
Thanks
Dear @KhurramFHassan , I've not updated this app for a very long time. I can provide you rudimentary support, but not always fast :-).
Regarding the gradle version: Try to update it, I don't think this will be a problem. If it does work, please open a pull-request with your changes. If not, I can try it next week.
Greetings
I tried to update graddle to 7.0.2 but it failed with error
Could not find method compile() for arguments [directory 'libs'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler
Next I tried with gradle 4.8.1 and at least the build went without errors (after downloading android sdk ver 28 in settings). However, building an apk gives the following errors:
Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
The specified Android SDK Build Tools version (23.0.0) is ignored, as it is below the minimum supported version (28.0.2) for Android Gradle Plugin 3.2.0.
How do I proceed from here?
Dear @KhurramFHassan
sorry it took me so long to reply. If it compiles without error it is promising!
Regarding the other errors (changes have to be done in /app/build.gradle):
compile is obsolete: Regarding to https://kodlogs.com/35155/warning-configuration-compile-obsolete-and-has-been-replaced-with-implementation-and-api you should change the phrasecompileto eitherimplementationorapiin the dependencies.SDK Build tools: I think you can change this setting to your version either in Android Studio or in the build.gradle file.
Greetings