Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generating new Signed APK with dexguard #5875

Closed
asaadaa opened this issue May 12, 2019 · 4 comments
Closed

generating new Signed APK with dexguard #5875

asaadaa opened this issue May 12, 2019 · 4 comments

Comments

@asaadaa
Copy link

asaadaa commented May 12, 2019

Before filing a bug:

  • Search existing issues, including issues that are closed.
  • Consult our FAQs, supported devices and supported formats pages. These can be
    found at https://exoplayer.dev/.
  • Rule out issues in your own code. A good way to do this is to try and
    reproduce the issue in the ExoPlayer demo app. Information about the ExoPlayer
    demo app can be found here:
    http://exoplayer.dev/demo-application.html.

When reporting a bug:

Fill out the sections below, leaving the headers but replacing the content. If
you're unable to provide certain information, please explain why in the relevant
section. We may close issues if they do not include sufficient information.

[REQUIRED] Issue description

After updating exoplayer to 2.10.0 and trying to generate new signed apk using Dexguard,
I am receiving this crash, however I am ignoring exoplayer form obfuscation process
java.lang.RuntimeException: Unable to instantiate application com….application.GdprApplication: java.lang.ClassNotFoundException: Didn't find class "com…client.application.GdprApplication" on path: DexPathList[[zip file "/data/app/com…-14Vk3sKABT2EgAYakia5SA==/base.apk"],nativeLibraryDirectories=[/data/app/com….-14Vk3sKABT2EgAYakia5SA==/lib/arm, /data/app/com…-14Vk3sKABT2EgAYakia5SA==/base.apk!/lib/armeabi-v7a, /system/lib, /system/vendor/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:979)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6036)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1764)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6942)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com….application.GdprApplication" on path: DexPathList[[zip file "/data/app/com…-14Vk3sKABT2EgAYakia5SA==/base.apk"],nativeLibraryDirectories=[/data/app/com…-14Vk3sKABT2EgAYakia5SA==/lib/arm, /data/app/com…-14Vk3sKABT2EgAYakia5SA==/base.apk!/lib/armeabi-v7a, /system/lib, /system/vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.Instrumentation.newApplication(Instrumentation.java:1094)
at android.app.LoadedApk.makeApplication(LoadedApk.java:973)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6036) 
at android.app.ActivityThread.-wrap1(Unknown Source:0) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1764) 
at android.os.Handler.dispatchMessage(Handler.java:105) 
at android.os.Looper.loop(Looper.java:164) 
at android.app.ActivityThread.main(ActivityThread.java:6942) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374) 
Suppressed: java.io.IOException: Failed to open dex files from /data/app/com….-14Vk3sKABT2EgAYakia5SA==/base.apk because: Failure to verify dex file '/data/app/com…-14Vk3sKABT2EgAYakia5SA==/base.apk': Abstract method 46868(Lcom/google/android/exoplayer2/trackselection/TrackSelection$Factory;.lambda$createTrackSelections$0) has disallowed access flags 1402
at dalvik.system.DexFile.openDexFileNative(Native Method)
at dalvik.system.DexFile.openDexFile(DexFile.java:353)
at dalvik.system.DexFile.(DexFile.java:100)
at dalvik.system.DexFile.(DexFile.java:74)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:374)
at dalvik.system.DexPathList.makeDexElements(DexPathList.java:337)
at dalvik.system.DexPathList.(DexPathList.java:157)
at dalvik.system.BaseDexClassLoader.(BaseDexClassLoader.java:65)
at dalvik.system.PathClassLoader.(PathClassLoader.java:64)
at com.android.internal.os.PathClassLoaderFactory.createClassLoader(PathClassLoaderFactory.java:43)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:69)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:36)
at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:678)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:711)
at android.app.LoadedApk.getResources(LoadedApk.java:944)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2303)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5943)
... 8 more

[REQUIRED] Reproduction steps

Generate signed APK using dexguard tools

[REQUIRED] Link to test content


[REQUIRED] A full bug report captured from the device


[REQUIRED] Version of ExoPlayer being used

2.10.0

[REQUIRED] Device(s) and version(s) of Android being used

all devices

@andrewlewis
Copy link
Collaborator

If you downgrade to ExoPlayer 2.9.6 and generate a signed APK in the same way does the error disappear?

java.lang.ClassNotFoundException: Didn't find class "com….application.GdprApplication" looks unrelated (that class isn't part of ExoPlayer).

Abstract method 46868(Lcom/google/android/exoplayer2/trackselection/TrackSelection$Factory;.lambda$createTrackSelections$0) has disallowed access flags 1402 might be relevant but it looks like it might just be a warning.

@asaadaa
Copy link
Author

asaadaa commented May 13, 2019

Yes, after downgrading exoplayer to 2.9.6, I am able to generate a signed APK,
but I need to use this update because it solves the most common issue in our app #5698

I think the main reason is this one : Abstract method 46868(Lcom/google/android/exoplayer2/trackselection/TrackSelection$Factory;.lambda$createTrackSelections$0) has disallowed access flags 1402

@andrewlewis
Copy link
Collaborator

I couldn't find any more information about this I'm afraid. We haven't heard other reports of the same error. Is Dexguard up to date, and does it handle Java 8 default methods properly? Do you have any other customizations to the build process that might be related, e.g. desugaring? Do you see any issues if you use proguard/D8/R8 instead?

@ojw28
Copy link
Contributor

ojw28 commented May 30, 2019

Closing because this appears to be a Dexguard issue rather than a bug in ExoPlayer.

@ojw28 ojw28 closed this as completed May 30, 2019
@google google locked and limited conversation to collaborators Oct 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants