代码开始报错:
FATAL EXCEPTION: pool-4-thread-1
Process: com.tencent.shadow.sample.host:plugin, PID: 8728
java.lang.NoSuchFieldError: No instance field valueOf of type Landroid/app/Application; in class Lcom/appsflyer/internal/AFa1tSDK; or its superclasses (declaration of 'com.appsflyer.internal.AFa1tSDK' appears in /data/user/0/com.tencent.shadow.sample.host/files/ShadowPluginManager/UnpackedPlugin/sample-manager/e83f661ce1e3562cedab9c10f3deda7d/plugin-debug.zip/plugin-app-plugin-debug.apk)
at com.appsflyer.internal.AFa1mSDK.AFKeystoreWrapper(:2058)
at java.lang.reflect.Method.invoke(Native Method)
at com.appsflyer.internal.AFc1uSDK.AFKeystoreWrapper(:142)
at com.appsflyer.internal.AFd1uSDK.AFInAppEventType(:65)
at com.appsflyer.internal.AFc1aSDK.valueOf(:113)
at com.appsflyer.internal.AFc1mSDK$3.run(:109)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)
当我在插件中添加 implementation 'com.appsflyer:af-android-sdk:6.9.2' 并且在MainActivity 对AppsFlyerLib 进行初始化时,
AppsFlyerLib.getInstance().init("XXX", conversionListener, getApplicationContext()); AppsFlyerLib.getInstance().setDebugLog(true); AppsFlyerLib.getInstance().start(MainActivity.this);
代码开始报错: FATAL EXCEPTION: pool-4-thread-1 Process: com.tencent.shadow.sample.host:plugin, PID: 8728 java.lang.NoSuchFieldError: No instance field valueOf of type Landroid/app/Application; in class Lcom/appsflyer/internal/AFa1tSDK; or its superclasses (declaration of 'com.appsflyer.internal.AFa1tSDK' appears in /data/user/0/com.tencent.shadow.sample.host/files/ShadowPluginManager/UnpackedPlugin/sample-manager/e83f661ce1e3562cedab9c10f3deda7d/plugin-debug.zip/plugin-app-plugin-debug.apk) at com.appsflyer.internal.AFa1mSDK.AFKeystoreWrapper(:2058) at java.lang.reflect.Method.invoke(Native Method) at com.appsflyer.internal.AFc1uSDK.AFKeystoreWrapper(:142) at com.appsflyer.internal.AFd1uSDK.AFInAppEventType(:65) at com.appsflyer.internal.AFc1aSDK.valueOf(:113) at com.appsflyer.internal.AFc1mSDK$3.run(:109) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) at java.lang.Thread.run(Thread.java:1012)