altbeacon library sample app Unsupported class file major version 61

63 Views Asked by At

I need to bolt beacon detection on to my existing app. I have followed the android documentation for this. I have downloaded the sample app from https://github.com/AltBeacon/android-beacon-library-reference

I have installed Hedgehog Android IDE

When I build I receive error : Unsupported class file major version 61

Here are the gradle settings that come with the app:

> apply plugin: 'com.android.application'
> 
> android {
>     compileSdkVersion 29
>     buildToolsVersion '29.0.2'
> 
>     defaultConfig {
>         applicationId "org.altbeacon.beaconreference"
>         minSdkVersion 21
>         targetSdkVersion 29
>     }
>     buildTypes {
>         release {
>             minifyEnabled false
>             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
>         }
>     } }
> 
> dependencies {
>     implementation fileTree(dir: 'libs', include: ['*.jar'])
>     implementation 'androidx.appcompat:appcompat:1.0.0'
>     //implementation project(':android-beacon-library:lib')
>     implementation 'org.altbeacon:android-beacon-library:2+' }

Q1:Can anyone please tell me where I should look for incompatible versions of java.

Q2:Is this the default generic library to use ? are there any others ? I have had no luck with Kbeacon.

I have been adding to this app over 10 years for my client but this latest requirement and all the difficulties I have encountered makes me feel like giving up and telling them to hand the job to a dedicated Android development house.

Many thanks in advance Tony

1

There are 1 best solutions below

4
davidgyoung On

Please use library version 2.19.5

Starting with library version 2.19.6, the library is compiled with JDK 17. You may also need to use JDK 17 for your app in order to use 2.19.6 or later.

Unfortunately, this upgrade was necessary for the library to allow targeting Android 14 and the latest Android Studio and Gradle build tools. See here for more info: https://developer.android.com/build/jdks