我已经制作了一个Android应用程序 在调试模式下,应用程序没有问题, 但发布后和apk文件。 我收到了谷歌播放用户的崩溃报告
java.lang.NoSuchMethodError: No virtual method setDataSource(Landroid/content/res/AssetFileDescriptor;)V in class Landroid/media/MediaPlayer; or its super classes (declaration of 'android.media.MediaPlayer' appears in /system/framework/framework.jar)
at com.ali.gunprank.MainActivity.onCreate(MainActivity.java:90)
at android.app.Activity.performCreate(Activity.java:6178)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2648)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769)
at android.app.ActivityThread.access$900(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1430)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5910)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
并且gradle文件是:
apply plugin: 'com.android.application'
android {
signingConfigs {
config {
keyAlias ******
keyPassword ******
}
}
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.ali.gunprank"
minSdkVersion 18
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.0'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
testCompile 'junit:junit:4.12'
compile 'com.google.firebase:firebase-ads:10.2.1'
}apply plugin: 'com.google.gms.google-services'
所以任何人都有任何想法我该怎么办?