I working on a project that listing an order from citizen include text and images.
I have encountered an awesome problem that Qgraphicsscene->addPixmap, sometimes works and sometimes it does not. I cannot detect what problem is.
QGraphicsPixmapItem* pItem;
pItem = scene->addPixmap(QPixmap::fromImage(img));
img is loaded properly and tested if it did not loaded.
When I Run Application Qt Creator output Below:
Starting remote process.E/Zygote (23262): MountEmulatedStorage()
E/Zygote (23262): v2
I/SELinux (23262): Function: selinux_compare_spd_ram, SPD-policy is existed. and_ver=SEPF_SM-A500F_4.4.4 ver=46
I/SELinux (23262): Function: selinux_compare_spd_ram , priority [2] , priority version is VE=SEPF_SM-A500F_5.0.2-1_0039
E/SELinux (23262): [DEBUG] get_category: variable seinfo: default sensitivity: NULL, cateogry: NULL
I/libpersona(23262): KNOX_SDCARD checking this for 10276
I/libpersona(23262): KNOX_SDCARD not a persona
I/ActivityManager( 1004): Start proc org.qtproject.serikbelediyesi for activity org.qtproject.serikbelediyesi/org.qtproject.qt5.android.bindings.QtActivity: pid=23262 uid=10276 gids={50276, 9997, 3003, 1028, 1015} abi=armeabi-v7a
D/TimaKeyStoreProvider(23262): TimaSignature is unavailable
D/ActivityThread(23262): Added TimaKeyStore provider
E/Qt (23262): Can't create main activity
E/Qt (23262): java.io.FileNotFoundException: /data/data/org.qtproject.serikbelediyesi/lib/libplugins_platforms_libqoffscreen.so: open failed: ENOENT (No such file or directory)
E/Qt (23262): at libcore.io.IoBridge.open(IoBridge.java:456)
E/Qt (23262): at java.io.FileInputStream.<init>(FileInputStream.java:76)
E/Qt (23262): at java.io.FileInputStream.<init>(FileInputStream.java:103)
E/Qt (23262): at org.qtproject.qt5.android.bindings.QtActivity.createBundledBinary(QtActivity.java:416)
E/Qt (23262): at org.qtproject.qt5.android.bindings.QtActivity.extractBundledPluginsAndImports(QtActivity.java:489)
E/Qt (23262): at org.qtproject.qt5.android.bindings.QtActivity.startApp(QtActivity.java:582)
E/Qt (23262): at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:895)
E/Qt (23262): at android.app.Activity.performCreate(Activity.java:6374)
E/Qt (23262): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
E/Qt (23262): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2752)
E/Qt (23262): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2873)
E/Qt (23262): at android.app.ActivityThread.access$900(ActivityThread.java:181)
E/Qt (23262): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1482)
E/Qt (23262): at android.os.Handler.dispatchMessage(Handler.java:102)
E/Qt (23262): at android.os.Looper.loop(Looper.java:145)
E/Qt (23262): at android.app.ActivityThread.main(ActivityThread.java:6145)
E/Qt (23262): at java.lang.reflect.Method.invoke(Native Method)
E/Qt (23262): at java.lang.reflect.Method.invoke(Method.java:372)
E/Qt (23262): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
E/Qt (23262): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
E/Qt (23262): Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
E/Qt (23262): at libcore.io.Posix.open(Native Method)
E/Qt (23262): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
E/Qt (23262): at libcore.io.IoBridge.open(IoBridge.java:442)
E/Qt (23262): ... 19 more
D/PhoneWindow(23262): *FMB* installDecor mIsFloating : false
yes OK, Updrage your Qt Library to Qt 5.6 Release Candidate
I haven't found any solution yet. but i upgraded to Qt 5.6 Release Candidate, Any Problem Seeing. many times change my code and add some example code to my project, there is not any problem. libplugins_platforms_libqoffscreen.so
always creating and loding properly and QLabel or any QWidget show my pixmap.
Related
2022-02-26 00:24:09.641 32217-32217/com.example.kampusegel1 E/SQLiteAssetHelper: Couldn't open EatItDB.db for writing (will try read-only):
com.readystatesoftware.sqliteasset.SQLiteAssetHelper$SQLiteAssetException: Missing databases/EatItDB.db file (or .zip, .gz archive) in assets, or target folder not writable
at android.content.res.AssetManager.nativeOpenAsset(Native Method)
at android.content.res.AssetManager.open(AssetManager.java:875)
at android.content.res.AssetManager.open(AssetManager.java:852)
at com.readystatesoftware.sqliteasset.SQLiteAssetHelper.copyDatabaseFromAssets(SQLiteAssetHelper.java:436)
at com.readystatesoftware.sqliteasset.SQLiteAssetHelper.createOrOpenDatabase(SQLiteAssetHelper.java:400)
at com.readystatesoftware.sqliteasset.SQLiteAssetHelper.getWritableDatabase(SQLiteAssetHelper.java:176)
at com.readystatesoftware.sqliteasset.SQLiteAssetHelper.getReadableDatabase(SQLiteAssetHelper.java:254)
at com.example.kampusegel1.Database.Database.addToCart(Database.java:55)
at com.example.kampusegel1.FoodDetail$1.onClick(FoodDetail.java:58)
at android.view.View.performClick(View.java:7870)
at android.widget.TextView.performClick(TextView.java:14970)
at android.view.View.performClickInternal(View.java:7839)
at android.view.View.access$3600(View.java:886)
at android.view.View$PerformClick.run(View.java:29363)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:7860)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1075)
2022-02-26 00:24:09.644 32217-32217/com.example.kampusegel1 W/SQLiteLog: (28) failed to open "/data/user/0/com.example.kampusegel1/databases/EatItDB.db" with flag (131072) and mode_t (0) due to error (2)
2022-02-26 00:24:09.644 32217-32217/com.example.kampusegel1 E/SQLiteLog: (14) cannot open file at line 37805 of [68b898381a]
2022-02-26 00:24:09.644 32217-32217/com.example.kampusegel1 E/SQLiteLog: (14) os_unix.c:37805: (2) open(/data/user/0/com.example.kampusegel1/databases/EatItDB.db) -
2022-02-26 00:24:09.644 32217-32217/com.example.kampusegel1 E/SQLiteLog: (1) Process ple.kampusegel1 : Pid (32217) Uid (10420) Euid (10420) Gid (10420) Egid (10420)
2022-02-26 00:24:09.644 32217-32217/com.example.kampusegel1 E/SQLiteLog: (1) osStat failed "/data/user/0/com.example.kampusegel1/databases/EatItDB.db" due to error (2)
2022-02-26 00:24:09.644 32217-32217/com.example.kampusegel1 E/SQLiteLog: (1) Stat of /data/user/0/com.example.kampusegel1/databases : st_mode(40771) st_uid(10420) st_gid(10420) st_ino(3678242)
2022-02-26 00:24:09.644 32217-32217/com.example.kampusegel1 E/SQLiteLog: (1) Stat of /data/user/0/com.example.kampusegel1 : st_mode(40700) st_uid(10420) st_gid(10420) st_ino(3678239)
2022-02-26 00:24:09.644 32217-32217/com.example.kampusegel1 E/SQLiteLog: (1) Stat of /data/user/0 : st_mode(40771) st_uid(1000) st_gid(1000) st_ino(3473409)
2022-02-26 00:24:09.644 32217-32217/com.example.kampusegel1 E/SQLiteLog: (1) Stat of /data/user : st_mode(40711) st_uid(1000) st_gid(1000) st_ino(2555905)
2022-02-26 00:24:09.644 32217-32217/com.example.kampusegel1 E/SQLiteLog: (1) Stat of /data : st_mode(40771) st_uid(1000) st_gid(1000) st_ino(2)
2022-02-26 00:24:09.646 32217-32217/com.example.kampusegel1 E/SQLiteDatabase: Failed to open database '/data/user/0/com.example.kampusegel1/databases/EatItDB.db'.
android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 1294 SQLITE_CANTOPEN_ENOENT[1294]): Could not open database
at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:300)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:218)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:737)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:284)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:251)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:1386)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:1331)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:994)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:940)
at com.readystatesoftware.sqliteasset.SQLiteAssetHelper.getReadableDatabase(SQLiteAssetHelper.java:264)
at com.example.kampusegel1.Database.Database.addToCart(Database.java:55)
at com.example.kampusegel1.FoodDetail$1.onClick(FoodDetail.java:58)
at android.view.View.performClick(View.java:7870)
at android.widget.TextView.performClick(TextView.java:14970)
at android.view.View.performClickInternal(View.java:7839)
at android.view.View.access$3600(View.java:886)
at android.view.View$PerformClick.run(View.java:29363)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:7860)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1075)
2022-02-26 00:24:09.646 32217-32217/com.example.kampusegel1 D/AndroidRuntime: Shutting down VM
2022-02-26 00:24:09.647 32217-32217/com.example.kampusegel1 E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.kampusegel1, PID: 32217
android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 1294 SQLITE_CANTOPEN_ENOENT[1294]): Could not open database
at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:300)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:218)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:737)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:284)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:251)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:1386)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:1331)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:994)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:940)
at com.readystatesoftware.sqliteasset.SQLiteAssetHelper.getReadableDatabase(SQLiteAssetHelper.java:264)
at com.example.kampusegel1.Database.Database.addToCart(Database.java:55)
at com.example.kampusegel1.FoodDetail$1.onClick(FoodDetail.java:58)
at android.view.View.performClick(View.java:7870)
at android.widget.TextView.performClick(TextView.java:14970)
at android.view.View.performClickInternal(View.java:7839)
at android.view.View.access$3600(View.java:886)
at android.view.View$PerformClick.run(View.java:29363)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:7860)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1075)
This is how the app crashes when I click the button.
I created the assets/databases folder.
I also deleted the cache files, but my problem is still not resolved.
Can you help me?
Is there an updated version?
Uninstalled and re-run, if passed, it must be no update, the version of the data
From China, English is not good
I am trying to integrate paynow api to my application, I have not done much, so far I have just added this dependance to gradle: implementation 'zw.co.paynow:java-sdk:1.1.1'
Supprisingly the app crashes, if I remove it the app does not crash, so adding it is crashing my app. So my question is, what could be missing that causes this crash?
logcat:
2021-06-11 19:32:31.825 25519-25519/? E/Zygote: isWhitelistProcess - Process is Whitelisted
2021-06-11 19:32:31.829 25519-25519/? E/libpersona: Couldn't open the File - /data/system/users/0/personalist.xml - No such file or directory
2021-06-11 19:32:32.655 25519-25519/com.coin.cryptobase E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.coin.cryptobase, PID: 25519
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.coin.cryptobase/com.coin.cryptobase.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.coin.cryptobase.MainActivity" on path: DexPathList[[zip file "/data/app/com.coin.cryptobase-faku93JC1CyPtG_PsAGmrA==/base.apk"],nativeLibraryDirectories=[/data/app/com.coin.cryptobase-faku93JC1CyPtG_PsAGmrA==/lib/arm, /system/lib, /system/vendor/lib]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2841)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6942)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.coin.cryptobase.MainActivity" on path: DexPathList[[zip file "/data/app/com.coin.cryptobase-faku93JC1CyPtG_PsAGmrA==/base.apk"],nativeLibraryDirectories=[/data/app/com.coin.cryptobase-faku93JC1CyPtG_PsAGmrA==/lib/arm, /system/lib, /system/vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.Instrumentation.newActivity(Instrumentation.java:1181)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2831)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6942)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Suppressed: java.io.IOException: Failed to open dex files from /data/app/com.coin.cryptobase-faku93JC1CyPtG_PsAGmrA==/base.apk because: Failure to verify dex file '/data/app/com.coin.cryptobase-faku93JC1CyPtG_PsAGmrA==/base.apk': Bad method handle type 7
at dalvik.system.DexFile.openDexFileNative(Native Method)
at dalvik.system.DexFile.openDexFile(DexFile.java:353)
at dalvik.system.DexFile.<init>(DexFile.java:100)
at dalvik.system.DexFile.<init>(DexFile.java:74)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:374)
at dalvik.system.DexPathList.makeDexElements(DexPathList.java:337)
at dalvik.system.DexPathList.<init>(DexPathList.java:157)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:65)
at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:64)
at com.android.internal.os.PathClassLoaderFactory.createClassLoader(PathClassLoaderFactory.java:43)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:69)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:36)
at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:678)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:711)
at android.app.LoadedApk.getResources(LoadedApk.java:944)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2303)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5943)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1764)
... 6 more
First clean the project, then invalidate android studio from File -> Invalidate Caches / Restart.. -> Invalidate and Restart.
Update:
I created an asset folder and inside of it is a century.ttf file. First I got a wrong encoding problem but after I followed these steps after File was loaded in the wrong encoding 'UTF-8' while pasting new font to Assets Folder in Android Studio the error message disappeared.
Then I wrote into my MainActivity:
FOURTH UPDATE:
Typeface typeface = Typeface.createFromAsset(getAssets(),"century.ttf");
Text.setTypeface(typrface);
But then my app suddenly stops.
FOURTH UPDATE:
09-08 20:17:54.742 1266-1301/? E/cutils: Failed to mkdir(/data/system/users/0): No such file or directory
09-08 20:17:54.742 1266-1301/? E/vold: Failed to prepare /data/system/users/0: No such file or directory
09-08 20:17:54.743 1266-1301/? E/vold: Failed to prepare user 0 storage
09-08 20:17:54.822 1266-1314/? E/Cryptfs: Bad magic for real block device /dev/block/vdd
09-08 20:17:54.742 1266-1301/? E/cutils: Failed to mkdir(/data/system/users/0): No such file or directory
09-08 20:17:54.742 1266-1301/? E/vold: Failed to prepare /data/system/users/0: No such file or directory
09-08 20:17:54.743 1266-1301/? E/vold: Failed to prepare user 0 storage
09-08 20:17:54.822 1266-1314/? E/Cryptfs: Bad magic for real block device /dev/block/vdd
09-08 20:17:56.997 1310-1310/? E/libEGL: load_driver(/system/lib/egl/libGLES_emulation.so): dlopen failed: library "/system/lib/egl/libGLES_emulation.so" not found
09-08 20:17:57.012 1266-1301/? E/vold: Failed to chmod /data/system_ce/0: No such file or directory
09-08 20:17:57.012 1266-1301/? E/vold: Failed to chmod /data/misc_ce/0: No such file or directory
09-08 20:17:57.012 1266-1301/? E/vold: Failed to chmod /data/media/0: No such file or directory
09-08 20:17:57.048 1310-1310/? E/SurfaceFlinger: hwcomposer module not found
09-08 20:17:57.851 1310-1326/? E/SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
09-08 20:17:57.853 1340-1345/? E/libEGL: load_driver(/system/lib/egl/libGLES_emulation.so): dlopen failed: library "/system/lib/egl/libGLES_emulation.so" not found
09-08 20:18:05.693 1266-1301/? E/vold: Failed to chmod /data/system_ce/0: No such file or directory
09-08 20:18:05.693 1266-1301/? E/vold: Failed to chmod /data/misc_ce/0: No such file or directory
09-08 20:18:05.693 1266-1301/? E/vold: Failed to chmod /data/media/0: No such file or directory
09-08 20:18:05.928 1405-1405/? E/cutils: Failed to read /data/.layout_version: No such file or directory
[ 09-08 20:18:05.928 1405: 1405 D/ ]
Assuming that device has multi-user storage layout; upgrade no longer supported
[ 09-08 20:18:05.928 1405: 1405 D/ ]
Upgrading to /data/misc/user directories
09-08 20:18:05.968 1416-1416/? E/perfprofd: unable to open configuration file /data/data/com.google.android.gms/files/perfprofd.conf
09-08 20:18:06.123 1403-1403/? E/EmulatedCamera_Factory: 2 cameras are being emulated. 0 of them are fake cameras.
09-08 20:18:06.123 1403-1403/? E/EmulatedCamera_HotplugThread: createFileIfNotExists: Could not create file '/data/misc/media/emulator.camera.hotplug.0', error: 'Permission denied' (13)
09-08 20:18:06.123 1403-1403/? E/EmulatedCamera_HotplugThread: createFileIfNotExists: Could not create file '/data/misc/media/emulator.camera.hotplug.1', error: 'Permission denied' (13)
09-08 20:18:06.123 1403-1403/? E/CameraService: setUpVendorTags: Vendor tag operations not fully defined. Ignoring definitions.
09-08 20:18:06.204 1402-1402/? E/RadioService: couldn't load radio module radio.primary (No such file or directory)
09-08 20:18:06.204 1402-1402/? E/SoundTriggerHwService: couldn't load sound trigger module sound_trigger.primary (No such file or directory)
09-08 20:18:07.021 1534-1534/? E/ipv6proxy: Failed to forward Neighbor Solicitation for fe80::5c01:45ff:fe1b:e65c from radio0-peer to eth0: Cannot assign requested address
09-08 20:18:07.039 1544-1544/? E/hostapd: Configuration file: /system/etc/simulated_hostapd.conf
09-08 20:18:07.308 1401-1401/? E/memtrack: Couldn't load memtrack module (No such file or directory)
09-08 20:18:07.308 1401-1401/? E/android.os.Debug: failed to load memtrack module: -2
09-08 20:18:07.695 1401-1401/? E/Typeface: Error mapping font file /system/fonts/DroidSansFallback.ttf
09-08 20:18:08.021 1534-1534/? E/ipv6proxy: Failed to forward Router Advertisement from eth0 to wlan1: Network is unreachable
09-08 20:18:08.021 1534-1534/? E/ipv6proxy: Failed to forward Router Advertisement from eth0 to radio0-peer: Cannot assign requested address
09-08 20:18:08.231 1411-1411/? E/Netd: cannot find interface dummy0
09-08 20:18:08.398 1401-1401/? E/libEGL: load_driver(/system/lib/egl/libGLES_emulation.so): dlopen failed: library "/system/lib/egl/libGLES_emulation.so" not found
09-08 20:18:08.423 1401-1401/? E/Hyphenator: error loading hyphenation /system/usr/hyphen-data/hyph-as.hyb
java.io.FileNotFoundException: /system/usr/hyphen-data/hyph-nb.hyb: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:455)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:247)
at android.text.Hyphenator.loadHyphenator(Hyphenator.java:118)
at android.text.Hyphenator.init(Hyphenator.java:224)
at com.android.internal.os.ZygoteInit.preloadTextResources(ZygoteInit.java:252)
at com.android.internal.os.ZygoteInit.preload(ZygoteInit.java:206)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:743)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:187)
at libcore.io.IoBridge.open(IoBridge.java:441)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:247)
at android.text.Hyphenator.loadHyphenator(Hyphenator.java:118)
at android.text.Hyphenator.init(Hyphenator.java:224)
at com.android.internal.os.ZygoteInit.preloadTextResources(ZygoteInit.java:252)
at com.android.internal.os.ZygoteInit.preload(ZygoteInit.java:206)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:743)
09-08 20:18:08.430 1401-1401/? E/Hyphenator: error loading hyphenation /system/usr/hyphen-data/hyph-nn.hyb
java.io.FileNotFoundException: /system/usr/hyphen-data/hyph-nn.hyb: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:455)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:247)
at android.text.Hyphenator.loadHyphenator(Hyphenator.java:118)
at android.text.Hyphenator.init(Hyphenator.java:224)
at com.android.internal.os.ZygoteInit.preloadTextResources(ZygoteInit.java:252)
at com.android.internal.os.ZygoteInit.preload(ZygoteInit.java:206)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:743)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:187)
at libcore.io.IoBridge.open(IoBridge.java:441)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:247)
at android.text.Hyphenator.loadHyphenator(Hyphenator.java:118)
at android.text.Hyphenator.init(Hyphenator.java:224)
at com.android.internal.os.ZygoteInit.preloadTextResources(ZygoteInit.java:252)
at com.android.internal.os.ZygoteInit.preload(ZygoteInit.java:206)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:743)
09-08 20:18:08.430 1401-1401/? E/Hyphenator: error loading hyphenation /system/usr/hyphen-data/hyph-or.hyb
java.io.FileNotFoundException: /system/usr/hyphen-data/hyph-or.hyb: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:455)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:247)
at android.text.Hyphenator.loadHyphenator(Hyphenator.java:118)
at android.text.Hyphenator.init(Hyphenator.java:224)
at com.android.internal.os.ZygoteInit.preloadTextResources(ZygoteInit.java:252)
at com.android.internal.os.ZygoteInit.preload(ZygoteInit.java:206)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:743)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:187)
at libcore.io.IoBridge.open(IoBridge.java:441)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:247)
at android.text.Hyphenator.loadHyphenator(Hyphenator.java:118)
at android.text.Hyphenator.init(Hyphenator.java:224)
at com.android.internal.os.ZygoteInit.preloadTextResources(ZygoteInit.java:252)
at com.android.internal.os.ZygoteInit.preload(ZygoteInit.java:206)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:743)
09-08 20:18:08.430 1401-1401/? E/Hyphenator: error loading hyphenation /system/usr/hyphen-data/hyph-pa.hyb
java.io.FileNotFoundException: /system/usr/hyphen-data/hyph-pa.hyb: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:455)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:247)
at android.text.Hyphenator.loadHyphenator(Hyphenator.java:118)
at android.text.Hyphenator.init(Hyphenator.java:224)
at com.android.internal.os.ZygoteInit.preloadTextResources(ZygoteInit.java:252)
at com.android.internal.os.ZygoteInit.preload(ZygoteInit.java:206)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:743)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:187)
at libcore.io.IoBridge.open(IoBridge.java:441)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:247)
at android.text.Hyphenator.loadHyphenator(Hyphenator.java:118)
at android.text.Hyphenator.init(Hyphenator.java:224)
at com.android.internal.os.ZygoteInit.preloadTextResources(ZygoteInit.java:252)
at com.android.internal.os.ZygoteInit.preload(ZygoteInit.java:206)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:743)
09-08 20:18:08.431 1401-1401/? E/Hyphenator: error loading hyphenation /system/usr/hyphen-data/hyph-pt.hyb
Process: com.example.fdai3744.t_online20, PID: 3050
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.fdai3744.t_online20/com.example.fdai3744.t_online20.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setTypeface(android.graphics.Typeface)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2665)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setTypeface(android.graphics.Typeface)' on a null object reference
at com.example.fdai3744.t_online20.MainActivity.onCreate(MainActivity.java:25)
at android.app.Activity.performCreate(Activity.java:6679)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
FOURTH UPDATE:
Follow the instructions in the link below and go to the manifest file and add android:name="the-below-implementation" under application xml tag
https://github.com/chrisjenx/Calligraphy
Considering you use ttf fonts in asset folder, generate typeface like this.
Typeface typeface = Typeface.createFromAsset(getAssets(),"YourFontName.ttf");
Text.setTypeface(typrface);
Your code is requesting font/century (see: Caused by: java.lang.RuntimeException: Font asset not found font/century). The actual asset is font/century.tff (according to your comment), or possibly font/century.ttf (which would be the more likely file extension for TrueType fonts).
The font path you provide needs to match the actual path in assets/, including file extensions.
Try putting the ttf file into a "fonts" folder inside the "Assets" folder and then change the source path "fonts/century.ttf". My guess is that the file isn't being recognized as a font file.
This is how I have it set-up in one of my projects:
I am getting one strange error it occurs randomly to any time and crashes the app. i am testing on nexus 6 in Android 7.0
here is log cat
E/LocalFingerprints: cannot compute fingerprint for: content://media/external/images/media/306155
java.io.IOException: read failed: EISDIR (Is a directory)
at libcore.io.IoBridge.read(IoBridge.java:481)
at java.io.FileInputStream.read(FileInputStream.java:252)
at android.os.ParcelFileDescriptor$AutoCloseInputStream.read(ParcelFileDescriptor.java:889)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:273)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at java.security.DigestInputStream.read(DigestInputStream.java:161)
at java.io.FilterInputStream.read(FilterInputStream.java:107)
at kei.b(PG:81)
at imp.a(PG:1324)
at ilf.a(PG:131)
at com.google.android.libraries.social.autobackup.FingerprintScannerIntentService.onHandleIntent(PG:81)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:67)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: android.system.ErrnoException: read failed: EISDIR (Is a directory)
at libcore.io.Posix.readBytes(Native Method)
at libcore.io.Posix.read(Posix.java:169)
at libcore.io.BlockGuardOs.read(BlockGuardOs.java:231)
at libcore.io.IoBridge.read(IoBridge.java:471)
at java.io.FileInputStream.read(FileInputStream.java:252)
at android.os.ParcelFileDescriptor$AutoCloseInputStream.read(ParcelFileDescriptor.java:889)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:273)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at java.security.DigestInputStream.read(DigestInputStream.java:161)
at java.io.FilterInputStream.read(FilterInputStream.java:107)
at kei.b(PG:81)
at imp.a(PG:1324)
at ilf.a(PG:131)
at com.google.android.libraries.social.autobackup.FingerprintScannerIntentService.onHandleIntent(PG:81)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:67)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
I'm messing around with DBFlow in a android app trying to learn the framework a bit, and I've started getting errors, though I'm not sure they are related to DBFlow.
Here is the error messages:
01-12 06:49:43.817 1294-1310/? E/BluetoothAdapter: Bluetooth binder is null
01-12 06:49:43.818 1294-1310/? E/KernelCpuSpeedReader: Failed to read cpu-freq
java.io.FileNotFoundException: /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:452)
at java.io.FileInputStream.<init>(FileInputStream.java:76)
at java.io.FileInputStream.<init>(FileInputStream.java:103)
at java.io.FileReader.<init>(FileReader.java:66)
at com.android.internal.os.KernelCpuSpeedReader.readDelta(KernelCpuSpeedReader.java:49)
at com.android.internal.os.BatteryStatsImpl.updateCpuTimeLocked(BatteryStatsImpl.java:8002)
at com.android.server.am.BatteryStatsService.updateExternalStats(BatteryStatsService.java:1366)
at com.android.server.am.BatteryStatsService$BatteryStatsHandler.handleMessage(BatteryStatsService.java:125)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.android.server.ServiceThread.run(ServiceThread.java:46)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
at libcore.io.IoBridge.open(IoBridge.java:438)
at java.io.FileInputStream.<init>(FileInputStream.java:76)
at java.io.FileInputStream.<init>(FileInputStream.java:103)
at java.io.FileReader.<init>(FileReader.java:66)
at com.android.internal.os.KernelCpuSpeedReader.readDelta(KernelCpuSpeedReader.java:49)
at com.android.internal.os.BatteryStatsImpl.updateCpuTimeLocked(BatteryStatsImpl.java:8002)
at com.android.server.am.BatteryStatsService.updateExternalStats(BatteryStatsService.java:1366)
at com.android.server.am.BatteryStatsService$BatteryStatsHandler.handleMessage(BatteryStatsService.java:125)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.android.server.ServiceThread.run(ServiceThread.java:46)
01-12 06:49:43.818 1294-1310/? E/KernelUidCpuTimeReader: Failed to read uid_cputime
java.io.FileNotFoundException: /proc/uid_cputime/show_uid_stat: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:452)
at java.io.FileInputStream.<init>(FileInputStream.java:76)
at java.io.FileInputStream.<init>(FileInputStream.java:103)
at java.io.FileReader.<init>(FileReader.java:66)
at com.android.internal.os.KernelUidCpuTimeReader.readDelta(KernelUidCpuTimeReader.java:71)
at com.android.internal.os.BatteryStatsImpl.updateCpuTimeLocked(BatteryStatsImpl.java:8031)
at com.android.server.am.BatteryStatsService.updateExternalStats(BatteryStatsService.java:1366)
at com.android.server.am.BatteryStatsService$BatteryStatsHandler.handleMessage(BatteryStatsService.java:125)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.android.server.ServiceThread.run(ServiceThread.java:46)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
at libcore.io.IoBridge.open(IoBridge.java:438)
at java.io.FileInputStream.<init>(FileInputStream.java:76)
at java.io.FileInputStream.<init>(FileInputStream.java:103)
at java.io.FileReader.<init>(FileReader.java:66)
at com.android.internal.os.KernelUidCpuTimeReader.readDelta(KernelUidCpuTimeReader.java:71)
at com.android.internal.os.BatteryStatsImpl.updateCpuTimeLocked(BatteryStatsImpl.java:8031)
at com.android.server.am.BatteryStatsService.updateExternalStats(BatteryStatsService.java:1366)
at com.android.server.am.BatteryStatsService$BatteryStatsHandler.handleMessage(BatteryStatsService.java:125)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.android.server.ServiceThread.run(ServiceThread.java:46)
I'm pretty new to Android development and confused why they are occurring. It is not crashing my application, and doesn't appear to happen every single time.
By the way, I'm using the Nexus 5 Emulator to run this, so maybe it's related to that? Usually errors are bad, so I'm assuming this is something to be concerned with, regardless of it not appearing to effect the app...?
Maybe you need permision read/write Files
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
You are refering to the DBFlow framework. Well DBFlow is probably just a library to interact with a DB. Now the real question is do you know if your app has permission to read each of those files? What you see in command line vs app are not the same. I believe in the emulator you run as root. As for your app you are not root. Try checking what permissions your app has with respect to that File via the File APIs
If you use lib LeakCanary that happens because the lib writes of the leaks on your external storage, if you use the android API 23 and higher you will be asked for permission runtime, but dont have that permission in Manifest file.