У меня есть исходный файл, подобный этому:
...
import android.util.Log;
...
public class MyActivity extends Activity
{
public static Activity activity = null;
private static final String TAG = "WorldDetermine";
private Camera mCamera;
private CameraPreview mPreview;
public final int cameraId = 0;
@Override
public void onCreate(Bundle savedInstanceState) {
Log.d("myTag", "onCreate started!");
Log.v("blah", "blah blah");
super.onCreate(savedInstanceState);
setContentView(R.layout.main); ...
и пытается получить сообщения журнала по logcat
. Как то так:
adb -s emulator-5554 logcat myTag:D blah:v *:S
, но выводится только пустым (grep не может найти это тоже). Мой проект скомпилирован ant debug
правильно, но у меня возникла проблема на последнем шаге (может ли проблема быть косвенно вызвана этим?):
debug:
BUILD FAILED
/home/psct/development/android-sdk-linux/tools/ant/build.xml:887: The following error occurred while executing this line:
/home/psct/development/android-sdk-linux/tools/ant/build.xml:342: The following error occurred while executing this line:
/home/psct/development/android-sdk-linux/tools/ant/build.xml:334: Problem: failed to create task or type propertyfile
Cause: the class org.apache.tools.ant.taskdefs.optional.PropertyFile was not found.
This looks like one of Ant's optional components.
Action: Check that the appropriate optional JAR exists in
-/usr/share/ant-core/lib
-/root/.ant/lib
-a directory added on the command line with the -lib argument
Do not panic, this is a common problem.
The commonest cause is a missing JAR.
This is not a bug; it is a configuration problem
Total time: 4 seconds