由于它是用Objective C编写的,我该如何在Android或Java中使用此代码进行转换?
ALog(@"ERROR: Account with UserId:%@ AccountType:%d AccoundId:%d DOES NOT EXIST!",
account.userId, account.accountType, account.accountId);
最佳答案
好吧,对于Android,您需要执行以下操作:
Log.i("AccountActivity", "Account with UserId: " + userId +
" AccountType: " + accountType +
" AccountId: " + accountId +
" Does not exist.");
这将以活动和级别(本例中为信息)格式的logcat出现。可能看起来像这样:
I/AccountActivity( 1234): Account with UserId: {id} AccountType: {type} AccountId: {id} Does not exist.
不确定是否能回答您的问题...请在此处查看更多帮助:http://developer.android.com/guide/developing/debugging/debugging-log.html