【发布时间】:2013-12-23 07:49:44
【问题描述】:
我正在尝试将我的应用程序项目转换为库,我收到类似的错误
resDialogTitle = R.string.crash_dialog_title,
The value for annotation attribute ReportsCrashes.resDialogTitle must be a constant expression
它们在 ACRA 标头中使用
@ReportsCrashes(formKey = "--", mode = ReportingInteractionMode.DIALOG, mailTo = "--", customReportContent = {
ReportField.APP_VERSION_CODE, ReportField.APP_VERSION_NAME,
ReportField.ANDROID_VERSION, ReportField.PHONE_MODEL,
ReportField.CUSTOM_DATA, ReportField.STACK_TRACE, ReportField.LOGCAT }
// resToastText = R.string.crash_toast_text, // optional, displayed as soon as
// the crash occurs, before collecting data which can take a few seconds
resDialogText = getString(R.string.crash_dialog_text),
resDialogIcon = android.R.drawable.ic_dialog_info, // optional.
// default
// is
// a
// warning
// sign
//resDialogTitle = R.string.crash_dialog_title, // optional. default is your
// application name
resDialogCommentPrompt = R.string.crash_dialog_comment_prompt, // optional. when
// defined, adds
// a user text
// field input
// with this
// text resource
// as a label
resDialogOkToast = R.string.crash_dialog_ok_toast // optional. displays a Toast
// message when the user
// accepts to send a report.
)
public class MainAppClass extends Application {
private static MainAppClass singleton;
如何解决这个问题?
【问题讨论】:
标签: android android-library acra