尝试使用"react-native run-android“在react-native 0.55.2上运行项目,但得到以下错误
Configure project :rn-fetch-blob
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported
> Task :react-native-ble-manager:compileDebugJavaWit
我有一个定位服务: public class LocationService extends Service implements Serializable {
public static final String TAG = "LocationService";
private LocationListener locationListener;
private LocationManager locationManager;
public static boolean locationUpdateSent = false;
@
我想使用setPlayer()方法,但是我得到了以下错误:
com.chibde.visualizer.LineBarVisualizer.setPlayer(int)‘:尝试在空对象引用上调用虚拟方法的 java.lang.NullPointerException
public class Scanner {
public static MediaPlayer mediaPlayer = new MediaPlayer();
public View _view;
private Context _context;
@RequiresApi(api = Bu
我正在开发一个应用程序,需要在android棒棒糖(API 21,22)中打开闪光灯。
但是当我运行它的时候。
它显示失败的错误,所以我在谷歌上找到了这个,但我不明白如何解决问题!!
FATAL EXCEPTION: main
Process: com.example.amir133.flashlight, PID: 15787
java.lang.IllegalArgumentException: Bad argument passed to camera service
at android.hardware.camera2.utils.CameraBinderDecorator.
目前,我遇到了一个小问题:在我调用的异步任务完成后,我试图在我的片段上创建可见的2个按钮。为此,我用了这个:
while (!recordi.getterminé){
}
terminé();
但这不是最优的,我的应用程序也没有响应:(那么,在onPostExecute函数中有什么方法可以调用函数terminé()呢?谢谢。
这是我的代码:
碎片:
public class FragmentEnregistrer extends Fragment {
String path,nomfinal, ip="http://MYIP/php";
I
我正在创建一个text- to -speech应用程序,希望在tts对象说话时向扬声器显示一个对话框,并在完成时自动隐藏它自己。有谁有办法做到这一点?下面是我目前所处的位置,有什么想法吗? private lateinit var textToSpeech: TextToSpeech
private lateinit var alertDialogBuilder: AlertDialog.Builder
class MainActivity : AppCompatActivity() {
@RequiresApi(Build.VERSION_CODES.LOLLIPOP)
我有一个应用程序,这需要每24小时通知,应该开始振动5分钟,直到用户点击通知。当应用程序在后台打开或运行时,它工作得很好,但如果我终止应用程序,我会得到一个错误"Notificator停止工作“,并且没有通知。我正在使用Android 7。我如何解决这个问题?
public class MainActivity extends AppCompatActivity {
private int hour = 0;
private int minute = 0;
public static boolean timerIsRunning = false;
public static bool
这是在单击带有日期的EditText字段时弹出的代码吗?
final DatePickerDialog.OnDateSetListener lastdateof = new DatePickerDialog.OnDateSetListener() {
@RequiresApi(api = Build.VERSION_CODES.N)
@Override
public void onDateSet(DatePicker datePicker, int year, int monthOfYear, int dayOfMonth) {
我有个按钮。当我点击它,音频将被播放。那个声音总是会被延迟地重复。也就是说,音频将播放,然后暂停5秒,然后它将被一遍又一遍地播放。到目前为止,效果很好。
public static MediaPlayer mediaPlayer = new MediaPlayer();
public View mView;
private Context mContext;
public boolean status;
public boolean getStatus() {
return status;
}
public void setStatus(boolean status) {
t
我正在开发一个在Android6.0上运行时工作非常好的应用程序。当我尝试在4.2.2上运行它时,它会完全崩溃,信号11 SIGSEGV。
就在这次崩溃之前,逻辑显示了以下错误:
dalvikvm: Unable to match class for part: Landroid/webkit/WebResourceRequest;Landroid/webkit/WebResourceError
这告诉我,我使用的是4.2.2中不可用的两个类。除了没有任何工具捕捉到这一点之外,我还确保不会发生这种情况,因为我使用这些类的每个地方都会在使用这些类的方法之前放置正确的@TargetApi注释。例如
我正在从user.Following中实现Access Location,这是我的代码。我的问题是,当我点击位置权限时,它没有得到location.Bt当我手动打开位置设置后,它给我的location.My要求是我想强制检查我的应用程序的位置权限,即(它去设置和打开位置) .I给了AndroidMeanifest file.And中的所有权限,下面是我的SpashScreen。 package com.example.sbaapp;
public class SpashScreen extends AppCompatActivity {
AlertDialog.Builder ale
因此,由于某种原因,我的后台服务崩溃了,我不知道为什么。因此,我的服务包含BLE,并通过以下方式绑定到来自MainActivity的服务:
public void startBluetoothService() {
// Start the BLE Service
Log.d(TAG, "Starting BLE Service");
Intent gattServiceIntent = new Intent(this, BLE_Service.class);
bindService(gattServiceIntent, mServiceConn