snj07 / cordova-plugin-root-safety

Ionic cordova plugin for testing android device's authenticity including root detection and certificate verification.
Apache License 2.0
1 stars 1 forks source link

Error running on Capacitor #3

Open kalepail opened 3 years ago

kalepail commented 3 years ago

First thanks for building this plugin, there aren't many SafetyNet plugins out there. I am getting an error though trying to run on Android via Capacitor.

SafetyNetHandler.java:5: error: package android.support.annotation does not exist
import android.support.annotation.Nullable;

Seems likely to be a compatibility issue with an Android version. Any chance you could update the plugin?

snj07 commented 3 years ago

This plugin has older google play services and other dependencies so it may not work with the latest version. I need to look into it. Which version of google play services and Android are you using?

kalepail commented 3 years ago

I'll be honest I'm not super familiar with the Android side of things but I think this may be what you want. My variables.gradle file.

ext {
    minSdkVersion = 21
    compileSdkVersion = 29
    targetSdkVersion = 29
    androidxAppCompatVersion = '1.1.0'
    androidxCoreVersion =  '1.2.0'
    androidxMaterialVersion =  '1.1.0-rc02'
    androidxBrowserVersion =  '1.2.0'
    androidxLocalbroadcastmanagerVersion =  '1.0.0'
    androidxExifInterfaceVersion = '1.2.0'
    firebaseMessagingVersion =  '20.1.2'
    playServicesLocationVersion =  '17.0.0'
    junitVersion =  '4.12'
    androidxJunitVersion =  '1.1.1'
    androidxEspressoCoreVersion =  '3.2.0'
    cordovaAndroidVersion =  '7.0.0'
}

I'm using Ionic's Capacitor to build and generate the project if that's of any use. Thanks for your help with this.