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

Bugfix #10709

Closed
wants to merge 2 commits into from
Closed

Bugfix #10709

wants to merge 2 commits into from

Conversation

XiaoLongTX
Copy link

Hello, I found a playback crash caused by a compilation problem.
My app uses compileSdkVersion of 30, but Exoplayer uses 31. I compile the release version of the apk, when minifyEnabled is set to true, the app plays video on Android 12 mobile phones, and when using 5g, there will be java.lang.AbstractMethodError: abstract method "void android.telephony .TelephonyCallback$DisplayInfoListener.onDisplayInfoChanged(android.telephony.TelephonyDisplayInfo)"
crash.
The reason is that when compileSdkVersion 30 is used to compile the release version apk, the compilation environment cannot find the class android.telephony.TelephonyCallback$DisplayInfoListener, and there is no other code calling related logic, so it is deleted or inline optimized. So the logic of keep must be added here to ensure that the onDisplayInfoChanged method is not deleted. I tried a lot of methods, and finally found that -keepattributes LineNumberTable must be added at the same time to make the following keep logic take effect.
As for the keep of DefaultTrackSelector$SpatializerWrapperV32, it is the same reason.

XiaoLongTX and others added 2 commits October 18, 2022 20:02
…iled in the compileSdkVersion compilation environment of the lower version will not crash when used in the mobile phone of the higher version.
@icbaker
Copy link
Collaborator

icbaker commented Oct 21, 2022

The recommended fix for this problem is to increase your compileSdkVersion as described here: #10684 (comment)

I'm going to close this as we don't think playing proguard config whack-a-mole is the right way to fix this.

We're looking into changing the library metadata so that any app depending on it is forced to upgrade their compileSdkVersion (i.e. the error happens at compile time, rather than runtime).

@icbaker icbaker closed this Oct 21, 2022
@icbaker icbaker self-assigned this Oct 21, 2022
@google google locked and limited conversation to collaborators Dec 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants