bigdigital / watchdrip

GNU General Public License v3.0
41 stars 13 forks source link

Building from source code #7

Closed Andries-Smit closed 1 year ago

Andries-Smit commented 1 year ago

Hi @bigdigital do you have some hints on how to build from the source code?

Using the latest Android Studio (Dolphin), the project does not run out of the box, throws an error

cvc-complex-type.2.4.a: invalid content was found starting with element 'base-extension'. one of '{layoutlib}' is expected. 1) Selecting an older java version 1.8. Causes com/android/tools/idea/gradle/run/outputbuildaction has been compiled by a more recent version of the java runtime (class file version 55.0), this version of the java runtime only recognizes class file versions up to 52.0 2) Upgrading Gradle 7, does require me to upgrade the SDK (Required to set export attribute in the manifest services) 3) When running with the latest target SDK, it throws a fatal error when running the app android.app.BackgroundServiceStartNotAllowedException: Not allowed to start service Intent { cmp=com.thatguysservice.huami_xdrip/.services.BroadcastService (has extras) }: app is in background uid UidRecord{c35c440 u0a160 CEM idle change:procadj procs:0 seq(74169,74107)}

bigdigital commented 1 year ago

As i remember the same problem happens to me when i tried to build xdrip Please try to downgrade Gradle, my current setup looks like this Android Gradle Plugin Version 3.4.3 Gradle Version 6.5 jdk1.8.0_333

If this does not help, maybe also try to downgrade Android Studio, i'm using Android Studio 4.1.2

Andries-Smit commented 1 year ago

@bigdigital I tried many things to no avail. :( With Gradle 7, and then the code compiles happily. See PR #8

Can we make this work?