AndroidRuntime: java.lang.IllegalArgumentException: Log tag "AccountSetupIncomingFragment" exceeds limit of 23 characters
10-26 11:12:58.845 14695 14695 E AndroidRuntime: FATAL EXCEPTION: main
10-26 11:12:58.845 14695 14695 E AndroidRuntime: Process: com.android.email, PID: 14695
10-26 11:12:58.845 14695 14695 E AndroidRuntime: java.lang.IllegalArgumentException: Log tag "AccountSetupIncomingFragment" exceeds limit of 23 characters
10-26 11:12:58.845 14695 14695 E AndroidRuntime:
10-26 11:12:58.845 14695 14695 E AndroidRuntime: at android.util.Log.isLoggable(Native Method)
10-26 11:12:58.845 14695 14695 E AndroidRuntime: at com.android.mail.utils.LogUtils.isLoggable(LogUtils.java:180)
10-26 11:12:58.845 14695 14695 E AndroidRuntime: at com.android.mail.utils.LogUtils.d(LogUtils.java:229)
10-26 11:12:58.845 14695 14695 E AndroidRuntime: at com.android.email.activity.setup.AccountSetupIncomingFragment.loadSettings(AccountSetupIncomingFragment.java:504)
10-26 11:12:58.845 14695 14695 E AndroidRuntime: at com.android.email.activity.setup.AccountSetupIncomingFragment.onActivityCreated(AccountSetupIncomingFragment.java:284)
10-26 11:12:58.845 14695 14695 E AndroidRuntime: at android.app.Fragment.performActivityCreated(Fragment.java:2362)
10-26 11:12:58.845 14695 14695 E AndroidRuntime: at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1014)
10-26 11:12:58.845 14695 14695 E AndroidRuntime: at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1171)
10-26 11:12:58.845 14695 14695 E AndroidRuntime: at android.app.BackStackRecord.run(BackStackRecord.java:816)
10-26 11:12:58.845 14695 14695 E AndroidRuntime: at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1578)
10-26 11:12:58.845 14695 14695 E AndroidRuntime: at android.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:563)
10-26 11:12:58.845 14695 14695 E AndroidRuntime: at com.android.email.activity.setup.AccountSetupFinal.proceed(AccountSetupFinal.java:585)
10-26 11:12:58.845 14695 14695 E AndroidRuntime: at com.android.email.activity.setup.AccountSetupFinal.onNextButton(AccountSetupFinal.java:804)
10-26 11:12:58.845 14695 14695 E AndroidRuntime: at com.android.email.activity.setup.AccountSetupBasicsFragment$3.onClick(AccountSetupBasicsFragment.java:228)
10-26 11:12:58.845 14695 14695 E AndroidRuntime: at android.view.View.performClick(View.java:5640)
10-26 11:12:58.845 14695 14695 E AndroidRuntime: at android.view.View$PerformClick.run(View.java:22436)
10-26 11:12:58.845 14695 14695 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:751)
10-26 11:12:58.845 14695 14695 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)
10-26 11:12:58.845 14695 14695 E AndroidRuntime: at android.os.Looper.loop(Looper.java:158)
10-26 11:12:58.845 14695 14695 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6177)
10-26 11:12:58.845 14695 14695 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
10-26 11:12:58.845 14695 14695 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:890)
10-26 11:12:58.845 14695 14695 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:780)
10-26 11:12:58.846 3378 3395 W ActivityManager: Force finishing activity com.android.email/.activity.setup.AccountSetupFinal
frameworks/base/core/jni/android_util_Log.cpp
static jboolean android_util_Log_isLoggable(JNIEnv* env, jobject clazz, jstring tag, jint level)
{
if (tag == NULL) {
return false;
} const char* chars = env->GetStringUTFChars(tag, NULL);
if (!chars) {
return false;
} jboolean result = false;
if ((strlen(chars)+sizeof(LOG_NAMESPACE)) > PROPERTY_KEY_MAX) {
char buf2[200];
snprintf(buf2, sizeof(buf2), "Log tag \"%s\" exceeds limit of %zu characters\n",
chars, PROPERTY_KEY_MAX - sizeof(LOG_NAMESPACE)); jniThrowException(env, "java/lang/IllegalArgumentException", buf2);
} else {
result = isLoggable(chars, level);
} env->ReleaseStringUTFChars(tag, chars);
return result;
}
TAG 有字符个数限制,最大23个字符
public static boolean isLoggable(String tag, int level) {
if (IS_DEV_BUILD) {
return true;
} if (MAX_ENABLED_LOG_LEVEL > level) {
return false;
}
return Log.isLoggable(tag, level) || Log.isLoggable(TAG, level);
}