public abstract class ErrorReporter extends java.lang.Object implements SyncIssueHandler, com.android.ide.common.blame.MessageReceiver
ErrorReporter.EvaluationMode), indicating whether
the IDE is querying the project or not.| Modifier and Type | Class and Description |
|---|---|
static class |
ErrorReporter.EvaluationMode |
| Modifier | Constructor and Description |
|---|---|
protected |
ErrorReporter(ErrorReporter.EvaluationMode mode) |
| Modifier and Type | Method and Description |
|---|---|
ErrorReporter.EvaluationMode |
getMode() |
com.android.builder.model.SyncIssue |
handleSyncError(java.lang.String data,
int type,
java.lang.String msg)
Reports an error.
|
com.android.builder.model.SyncIssue |
handleSyncWarning(java.lang.String data,
int type,
java.lang.String msg)
Reports a warning.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandleIssue, hasSyncIssueprotected ErrorReporter(@NonNull
ErrorReporter.EvaluationMode mode)
@NonNull public ErrorReporter.EvaluationMode getMode()
@NonNull
public final com.android.builder.model.SyncIssue handleSyncError(@Nullable
java.lang.String data,
int type,
@NonNull
java.lang.String msg)
The behavior of this method depends on whether the project is being evaluated by an IDE or from the command line. If it's the former, the error will simply be recorder and displayed after the sync properly finishes. If it's the latter, then the evaluation is aborted right away.
data - a data representing the source of the error. This goes hand in hand with the
type, and is not meant to be readable. Instead a (possibly translated)
message is created from this data and type.type - the type of the error.msg - a human readable error (for command line output, or if an older IDE doesn't know
this particular issue type.)SyncIssue@NonNull
public final com.android.builder.model.SyncIssue handleSyncWarning(@Nullable
java.lang.String data,
int type,
@NonNull
java.lang.String msg)
Behaves similar to handleSyncError(String, int, String) but does not abort the
build.
handleSyncError(String, int, String)