You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`
FATAL EXCEPTION: mqt_native_modules
(link to log)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
03-10 12:49:00.577 2919 3008 E AndroidRuntime: Process: com.doquestion, PID: 2919
03-10 12:49:00.577 2919 3008 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.io.File.exists()' on a null object reference
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at me.vanpan.rctqqsdk.QQSDK.getOutputMediaFile(QQSDK.java:702)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at me.vanpan.rctqqsdk.QQSDK.getOutputMediaFile(QQSDK.java:696)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at me.vanpan.rctqqsdk.QQSDK.saveBitmapToFile(QQSDK.java:643)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at me.vanpan.rctqqsdk.QQSDK.processImage(QQSDK.java:512)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at me.vanpan.rctqqsdk.QQSDK.shareImage(QQSDK.java:224)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:374)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:162)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:739)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at android.os.Looper.loop(Looper.java:135)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:194)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at java.lang.Thread.run(Thread.java:818)
`
这是我修改后的获取缓存的方法,老的方法在某些没有外存的手机上可能导致CARSH
The text was updated successfully, but these errors were encountered:
`
private File getOutputMediaFile(String ext) {
ext = ext != null ? ext : "jpg";
File mediaStorageDir = getCurrentActivity().getExternalCacheDir();
if (mediaStorageDir == null) {
mediaStorageDir = getCurrentActivity().getCacheDir();
}
if (mediaStorageDir == null || (!mediaStorageDir.exists() && !mediaStorageDir.mkdirs())) {
return null;
}
String timeStamp = new SimpleDateFormat("ddMMyyyy_HHmm").format(new Date());
File mediaFile;
String mImageName = "RN_" + timeStamp + "." + ext;
mediaFile = new File(mediaStorageDir.getPath() + File.separator + mImageName);
Log.d("path is", mediaFile.getPath());
return mediaFile;
}
`
`
FATAL EXCEPTION: mqt_native_modules
(link to log)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
03-10 12:49:00.577 2919 3008 E AndroidRuntime: Process: com.doquestion, PID: 2919
03-10 12:49:00.577 2919 3008 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.io.File.exists()' on a null object reference
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at me.vanpan.rctqqsdk.QQSDK.getOutputMediaFile(QQSDK.java:702)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at me.vanpan.rctqqsdk.QQSDK.getOutputMediaFile(QQSDK.java:696)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at me.vanpan.rctqqsdk.QQSDK.saveBitmapToFile(QQSDK.java:643)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at me.vanpan.rctqqsdk.QQSDK.processImage(QQSDK.java:512)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at me.vanpan.rctqqsdk.QQSDK.shareImage(QQSDK.java:224)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:374)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:162)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:739)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at android.os.Looper.loop(Looper.java:135)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:194)
03-10 12:49:00.577 2919 3008 E AndroidRuntime: at java.lang.Thread.run(Thread.java:818)
`
这是我修改后的获取缓存的方法,老的方法在某些没有外存的手机上可能导致CARSH
The text was updated successfully, but these errors were encountered: