Tôi nhận được lỗi sau cố gắng xây dựng một thông cáo apkPro bảo vệ Lỗi xây dựng phát hành apk
:app:compileReleaseNdk UP-TO-DATE
:app:compileReleaseSources
:app:lintVitalRelease
:app:proguardRelease
Warning: android.support.v4.app.NotificationCompat$NotificationCompatImplBase: can't find referenced method 'void setLatestEventInfo(android.content.Context,java.lang.CharSequence,java.lang.CharSequence,android.app.PendingIntent)' in library class android.app.Notification
Warning: android.support.v4.app.NotificationCompat$NotificationCompatImplGingerbread: can't find referenced method 'void setLatestEventInfo(android.content.Context,java.lang.CharSequence,java.lang.CharSequence,android.app.PendingIntent)' in library class android.app.Notification
Warning: android.support.v4.app.NotificationCompatGingerbread: can't find referenced method 'void setLatestEventInfo(android.content.Context,java.lang.CharSequence,java.lang.CharSequence,android.app.PendingIntent)' in library class android.app.Notification
Warning: there were 3 unresolved references to library class members.
You probably need to update the library versions.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedlibraryclassmember)
:app:proguardRelease FAILED
Trong build.gradle Tôi có điều này:
phụ thuộc { biên dịch "com.android .Hỗ trợ: hỗ trợ-v4: 23.0.0" }
Và vẫn nhận được lỗi tương tự nếu tôi thay đổi nó để "com.android.support:support-v13:23.0.0"
Khi thông báo lỗi cho biết: "Có thể bạn cần cập nhật phiên bản thư viện". Thư viện nào là nó đề cập đến và làm thế nào để cập nhật nó?
Các tài liệu tham khảo trong các lỗi nói: "If you're developing for Android and ProGuard complains that it can't find a method that is only available in a recent version of the Android run-time, you should change the build target in your project.properties file or build.gradle file to that recent version. You can still specify a different minSdkVersion and a different targetSdkVersion in your AndroidManifest.xml file."
Đây là build.gradle của tôi, đó là vì hầu hết gần đây là có như API của nó 23. Vậy làm thế nào tôi có thể sửa chữa vấn đề?
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.cequint.ecid"
minSdkVersion 23
compileSdkVersion 23
}
bạn đã thử cập nhật cho 'com.android.support: hỗ trợ-v4: 23.1.0'? –
Thông báo lỗi tương tự của nó sau khi cập nhật lên com.android.support:support-v4:23.1.0 – Gruntcakes
Tôi đã thêm điều này vào pro guard.cfg và nó hoạt động: -dontwarn android.support.v4. ** – Gruntcakes