wewewe718 / QrAndBarcodeScanner

An Android app for scanning QR codes and barcodes
The Unlicense
685 stars 136 forks source link

App won't build with Java-11 #155

Open jejb opened 1 year ago

jejb commented 1 year ago

I recently got forced to upgrade to Java-11 because of Google requiring SDK 33 for all play store apps. The problem is that the annotations classes got unbundled from java-11 and now have to be specified as an external dependency. This was my fix for the problem, which I think would work (but can't test since the upgrade) for older Java versions as well, since it would override the internal annotation class:

diff --git a/app/build.gradle b/app/build.gradle
index 7cf306b..90f3f64 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -115,4 +115,6 @@ dependencies {

     // Sentry
     implementation 'io.sentry:sentry-android:5.7.1'
+
+    implementation 'javax.annotation:javax.annotation-api:1.3.2'
 }