You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-dontwarn com.android.installreferrer
-keep class com.appsflyer.** { *; }
Unfortunately, when build process reaches proguard step, the following warning occurs and build fails.
ProGuard, version 6.1.0 beta2
Reading input...
Reading program jar [C:\Projects\application-android\app\build\intermediates\transforms\mergeJavaRes\prod\release\0.jar] (filtered)
Reading program jar [C:\Projects\application-android\app\build\intermediates\transforms\AspectTransform\prod\release\1.jar] (filtered)
Warning: class [com/appsflyer/r.class] unexpectedly contains class [com.appsflyer.R]
Reading library jar [C:\Users\Admin\AppData\Local\Android\Sdk\platforms\android-28\android.jar]
Reading library jar [C:\Users\Admin\AppData\Local\Android\Sdk\build-tools\28.0.3\core-lambda-stubs.jar]
Reading library jar [C:\Users\Admin\AppData\Local\Android\Sdk\platforms\android-28\optional\org.apache.http.legacy.jar]
Reading library jar [C:\Users\Admin\AppData\Local\Android\Sdk\platforms\android-28\optional\android.test.mock.jar]
Reading library jar [C:\Users\Admin\AppData\Local\Android\Sdk\platforms\android-28\optional\android.test.base.jar]
Reading library jar [C:\Users\Admin\AppData\Local\Android\Sdk\platforms\android-28\optional\android.test.runner.jar]
Warning: there were 1 classes in incorrectly named files.
You should make sure all file names correspond to their class names.
The directory hierarchies must correspond to the package hierarchies.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unexpectedclass)
If you don't mind the mentioned classes not being written out,
you could try your luck using the '-ignorewarnings' option.
Warning: Exception while processing task java.io.IOException: Please correct the above warnings first.
Thread(Tasks limiter_2): destruction
> Task :app:transformClassesAndResourcesWithProguardForProdRelease FAILED
When I add -dontwarn com.appsflyer.** to proguard file build process ends with success, but running app causes the following error:
2019-04-17 14:34:06.112 E/AndroidRuntime: FATAL EXCEPTION: Thread-21
Process: pl.application, PID: 18355
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:353)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at com.appsflyer.AFExecutor$3$5.run(:30)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/appsflyer/r;
at com.appsflyer.AppsFlyerLib.ˏ(:1119)
at com.appsflyer.AFDeepLinkManager$3.ॱ(:3029)
at com.appsflyer.AppsFlyerLib$3.ˊ(:445)
at com.appsflyer.m$c.ˋ(:181)
at com.appsflyer.m$c.doInBackground(:164)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at com.appsflyer.AFExecutor$3$5.run(:30)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.appsflyer.r" on path: DexPathList[[zip file "/data/app/pl.application-YzH9kA_8z_dQFv_2qIXymA==/base.apk"],nativeLibraryDirectories=[/data/app/pl.application-YzH9kA_8z_dQFv_2qIXymA==/lib/arm64, /data/app/pl.application-YzH9kA_8z_dQFv_2qIXymA==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.appsflyer.AppsFlyerLib.ˏ(:1119)
at com.appsflyer.AFDeepLinkManager$3.ॱ(:3029)
at com.appsflyer.AppsFlyerLib$3.ˊ(:445)
at com.appsflyer.m$c.ˋ(:181)
at com.appsflyer.m$c.doInBackground(:164)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at com.appsflyer.AFExecutor$3$5.run(:30)
at java.lang.Thread.run(Thread.java:764)
After short investigation I have found that both com/appsflyer/r and com/appsflyer/R exists in class.dex from my generated apk file.
Has any of you encountered a similar problem and found a solution?
The text was updated successfully, but these errors were encountered:
Hi,
I'm trying to integrate AppsFlyerSDK to my android app, but building application with proguard fails.
First, I have added dependencies to my
build.gradle
file:And the following lines to my proguard file:
Unfortunately, when build process reaches proguard step, the following warning occurs and build fails.
When I add
-dontwarn com.appsflyer.**
to proguard file build process ends with success, but running app causes the following error:After short investigation I have found that both
com/appsflyer/r
andcom/appsflyer/R
exists in class.dex from my generated apk file.Has any of you encountered a similar problem and found a solution?
The text was updated successfully, but these errors were encountered: