我是Android开发人员。我想在
中使用课程ShutdownOem
file:/vendor/qcom/proprietary/oem-services/java/com/qti/server/power/ShutdownOem.java
我用com.qti.server.power
导入了这个类。但是在编译时会出现错误:
错误:包com.qti.server不存在
import com.qti.server.power;
你知道为什么吗?
ShutdownOem.java的代码如下:
package com.qti.server.power;
import android.util.Log;
import java.lang.reflect.Method;
import dalvik.system.PathClassLoader;
public final class ShutdownOem {
private static final String TAG = "QualcommShutdown";
public void rebootOrShutdown(boolean reboot, String reason) {
Log.i(TAG, "Qualcomm reboot/shutdown.");
//Sub-system shutdown.
if(SubSystemShutdown.shutdown() != 0) {
Log.e(TAG, "Failed to shutdown modem.");
} else
Log.i(TAG, "Modem shutdown successful.");
}
}
答案 0 :(得分:-1)
试试这段代码
import com.qti.server.power.ShutdownOem;