简体   繁体   中英

how to import com.android.camera package in a java project

Hi I am writing a test using UIAutomator API , however in my java project I want to import the com.android.camera package. However I am always getting an error that this import cannot be resolved. I have added the android.jar in my build path and rest of the things work fine. However I am not able to import this package.

There is no such package in android, maybe you are looking for

com.android.hardware.Camera

class ?

if so try

import com.android.hardware.Camera;

camera类位于下面的包中,因此请尝试导入下面的包而不是com.android.camera添加以下内容。

import android.hardware.Camera;

import android.hardware.Camera;

try to place it after your package name

If you are using Eclipse than just press Ctrl + Shift + O Eclipse will automatically add the required libraries in your source code. If still you are getting import issue than you need to check if you are using correct API or the spelling is correct.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM