Describe the bug
App crashes on startup, showing this error in logs
2020-05-01 17:18:27.287 9276-9276/com.totallymoney.account E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.totallymoney.account, PID: 9276
java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/preference/PreferenceManager;
at com.datatheorem.android.trustkit.utils.VendorIdentifier.getOrCreate(VendorIdentifier.java:24)
at com.datatheorem.android.trustkit.TrustKit.<init>(TrustKit.java:209)
at com.datatheorem.android.trustkit.TrustKit.initializeWithNetworkSecurityConfiguration(TrustKit.java:321)
at com.datatheorem.android.trustkit.TrustKit.initializeWithNetworkSecurityConfiguration(TrustKit.java:271)
at com.totallymoney.account.MainApplication.onCreate(MainApplication.java:62)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1182)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6460)
at android.app.ActivityThread.access$1300(ActivityThread.java:219)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.preference.PreferenceManager" on path: DexPathList[[zip file "/data/app/com.totallymoney.account-OU5nDHnpPZyhf4SUqPk7Hg==/base.apk"],nativeLibraryDirectories=[/data/app/com.totallymoney.account-OU5nDHnpPZyhf4SUqPk7Hg==/lib/x86, /data/app/com.totallymoney.account-OU5nDHnpPZyhf4SUqPk7Hg==/base.apk!/lib/x86, /system/lib, /system/product/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.datatheorem.android.trustkit.utils.VendorIdentifier.getOrCreate(VendorIdentifier.java:24)
at com.datatheorem.android.trustkit.TrustKit.<init>(TrustKit.java:209)
at com.datatheorem.android.trustkit.TrustKit.initializeWithNetworkSecurityConfiguration(TrustKit.java:321)
at com.datatheorem.android.trustkit.TrustKit.initializeWithNetworkSecurityConfiguration(TrustKit.java:271)
at com.totallymoney.account.MainApplication.onCreate(MainApplication.java:62)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1182)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6460)
at android.app.ActivityThread.access$1300(ActivityThread.java:219)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
To Reproduce
Integrate TrustKit-Android 1.1.3, build the app. Start app on emulator.
Expected behavior
App starts as normal, no crash.
TrustKit configuration
I don't think this is anything to do with the network security policy, would rather not post it unless necessary.
App details:
App target SDK: 29
App language: JS / React
Android version to reproduce the bug: Android 10 and 9, at least
Additional context
The app uses other libraries with AndroidX imports; we run jetifier to convert the dependencies installed to AndroidX. However, that doesn't appear to be working for TrustKit-Android.
Also, I'm not a native/Android dev - mainly focussed on React Native and iOS. So might be getting some details wrong, sorry if so.
Describe the bug App crashes on startup, showing this error in logs
To Reproduce Integrate TrustKit-Android 1.1.3, build the app. Start app on emulator.
Expected behavior App starts as normal, no crash.
TrustKit configuration I don't think this is anything to do with the network security policy, would rather not post it unless necessary.
App details:
Additional context The app uses other libraries with AndroidX imports; we run jetifier to convert the dependencies installed to AndroidX. However, that doesn't appear to be working for TrustKit-Android. Also, I'm not a native/Android dev - mainly focussed on React Native and iOS. So might be getting some details wrong, sorry if so.