我是Android新手,所以只能在示例中學習和玩弄東西。目前,我正在通過Timer Task生成圖像的示例,我陷入了一個困境,我真的需要專家的建議。下面是代碼和它在哪裏使用Log.i(「MARKER」,「* **」).....有些人可以告訴我爲什麼我在行的最後一節出錯? ?與日誌標記卡住
@Override
public void run() {
// TODO Auto-generated method stub
Log.i(「MARKER」,」******************************************」);
//int numViews = container.getChildCount();
ImageView toAdd = new ImageView(ImagePlayActivity.this);
Drawable imgContent = ImagePlayActivity.this.getResources().getDrawable(R.drawable.icon);
toAdd.setImageDrawable(imgContent);
toAdd.setTag(「img」+counter++);
Random rndGen = new Random();
LayoutParams lp = new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT,rndGen.nextInt(300),rndGen.nextInt(300));
toAdd.setLayoutParams(lp);
toAdd.setBackgroundColor(Color.TRANSPARENT);
AlphaAnimation anim = new AlphaAnimation(0, 1);
anim.setDuration(1000);
container.addView(toAdd);
//container.invalidate();
toAdd.startAnimation(anim);
}
};
在此先感謝。
看起來你正在使用針對雙引號代替Log.i常規雙引號(「標記」,」 *************」) ; – Samuel
顯示堆棧跟蹤錯誤日誌 – Yahor10
我只收到錯誤「令牌上的語法錯誤,請刪除這些令牌」。 –