在 Android Studio 中启用 Proguard 后制作签名 apk 时出错

Error while making signed apk after enabling the Proguard in Android Studio

在 Android Studio 中启用 Proguard 后制作签名 apk 时出错。

Warning:org.andengine.engine.camera.hud.controls.AnalogOnScreenControl: can't find referenced method 'float cos(float)' in library class android.util.FloatMath Warning:org.andengine.engine.camera.hud.controls.AnalogOnScreenControl: can't find referenced method 'float sin(float)' in library class android.util.FloatMath Warning:org.andengine.entity.modifier.PathModifier$Path: can't find referenced method 'float sqrt(float)' in library class android.util.FloatMath Warning:org.andengine.entity.particle.ParticleSystem: can't find referenced method 'float floor(float)' in library class android.util.FloatMath Warning:org.andengine.entity.particle.emitter.CircleOutlineParticleEmitter: can't find referenced method 'float cos(float)' in library class android.util.FloatMath Warning:org.andengine.entity.particle.emitter.CircleOutlineParticleEmitter: can't find referenced method 'float sin(float)' in library class android.util.FloatMath Warning:org.andengine.entity.particle.emitter.CircleParticleEmitter: can't find referenced method 'float cos(float)' in library class android.util.FloatMath Warning:org.andengine.entity.particle.emitter.CircleParticleEmitter: can't find referenced method 'float sin(float)' in library class android.util.FloatMath Warning:org.andengine.opengl.font.StrokeFont: can't find referenced method 'float floor(float)' in library class android.util.FloatMath Warning:org.andengine.util.adt.transformation.Transformation: can't find referenced method 'float sin(float)' in library class android.util.FloatMath Warning:org.andengine.util.adt.transformation.Transformation: can't find referenced method 'float cos(float)' in library class android.util.FloatMath Warning:org.andengine.util.algorithm.path.astar.EuclideanHeuristic: can't find referenced method 'float sqrt(float)' in library class android.util.FloatMath Warning:org.andengine.util.math.MathUtils: can't find referenced method 'float ceil(float)' in library class android.util.FloatMath Warning:org.andengine.util.math.MathUtils: can't find referenced method 'float sin(float)' in library class android.util.FloatMath Warning:org.andengine.util.math.MathUtils: can't find referenced method 'float cos(float)' in library class android.util.FloatMath Warning:org.andengine.util.math.MathUtils: can't find referenced method 'float sqrt(float)' in library class android.util.FloatMath Warning:org.andengine.util.modifier.ease.EaseCircularIn: can't find referenced method 'float sqrt(float)' in library class android.util.FloatMath Warning:org.andengine.util.modifier.ease.EaseCircularOut: can't find referenced method 'float sqrt(float)' in library class android.util.FloatMath Warning:org.andengine.util.modifier.ease.EaseElasticIn: can't find referenced method 'float sin(float)' in library class android.util.FloatMath Warning:org.andengine.util.modifier.ease.EaseElasticOut: can't find referenced method 'float sin(float)' in library class android.util.FloatMath Warning:org.andengine.util.modifier.ease.EaseSineIn: can't find referenced method 'float cos(float)' in library class android.util.FloatMath Warning:org.andengine.util.modifier.ease.EaseSineInOut: can't find referenced method 'float cos(float)' in library class android.util.FloatMath Warning:org.andengine.util.modifier.ease.EaseSineOut: can't find referenced method 'float sin(float)' in library class android.util.FloatMath``

Android FloatMath 文档:

This class was deprecated in API level 22.

Use Math instead.

您的一个依赖项似乎是为比您的目标 SDK 级别更旧的 Android SDK 构建的。

尝试添加: -keep public class android.util.FloatMath 遵守你的混淆规则。