日期:2014-05-20  浏览次数:20875 次

问个javac的问题
这两天在搞android

有个javac的问题请教一下

我想问一下,我javac编译说找不到程序包,是怎么回事?

C:\android-ndk-r7c\samples\hello-jni\src>javac com/example/hellojni/*.java
com\example\hellojni\gameView.java:4: 错误: 程序包android.content不存在
import android.content.Context;
                      ^
com\example\hellojni\gameView.java:5: 错误: 程序包android.content.res不存在
import android.content.res.Resources;
                          ^
com\example\hellojni\gameView.java:6: 错误: 程序包android.graphics不存在
import android.graphics.Bitmap;
                       ^
com\example\hellojni\gameView.java:7: 错误: 程序包android.graphics.Bitmap不
import android.graphics.Bitmap.Config;
                              ^
com\example\hellojni\gameView.java:8: 错误: 程序包android.graphics不存在
import android.graphics.BitmapFactory;
                       ^
com\example\hellojni\gameView.java:9: 错误: 程序包android.graphics不存在
import android.graphics.Canvas;
                       ^
com\example\hellojni\gameView.java:10: 错误: 程序包android.graphics不存在
import android.graphics.Color;
                       ^
com\example\hellojni\gameView.java:11: 错误: 程序包android.graphics不存在
import android.graphics.Rect;
                       ^
com\example\hellojni\gameView.java:12: 错误: 程序包android.util不存在
import android.util.DisplayMetrics;
                   ^
com\example\hellojni\gameView.java:13: 错误: 程序包android.util不存在
import android.util.Log;
                   ^
com\example\hellojni\gameView.java:14: 错误: 程序包android.view不存在
import android.view.MotionEvent;
                   ^
com\example\hellojni\gameView.java:15: 错误: 程序包android.view不存在
import android.view.View;
                   ^
com\example\hellojni\gameView.java:17: 错误: 找不到符号
public class gameView extends View{
                              ^
  符号: 类 View
com\example\hellojni\gameView.java:22: 错误: 找不到符号
        private Bitmap mBitmap;
                ^
  符号:   类 Bitmap
  位置: 类 gameView