Android Question 1.png: open failed: ENOENT (No such file or directory)

Status
Not open for further replies.

Shay

Well-Known Member
Licensed User
Longtime User
I upgraded from B4A 6.x to 8.50 and tried to compile and getting the following errors on each file that start with number, such as 1.mp3, 1.png, etc..
why?

java.lang.RuntimeException: Unable to create service takziv.financhick.com.starter: java.lang.RuntimeException: java.io.FileNotFoundException: /storage/emulated/0/Android/data/takziv.financhick.com/files/virtual_assets/1.png: open failed: ENOENT (No such file or directory)
 

Mikonios

Active Member
Licensed User
Longtime User
After two days testing that they were working fine, suddenly WriteString, ReadString, Writer.Write ::: failed.
Release: B4a 9.80
Probe Debug Mode & Debug Legacy wiht Error ( Work over fisical device Android 5.1.1 Lollipop)
B4X:
java.io.FileNotFoundException: xxxx.txt: open failed: ENOENT (No such File Or directory)    ' Err message
B4X:
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="28"/>
AddPermission (android.permission.WRITE_EXTERNAL_STORAGE)                                        ' Insert Manifiest
Can someone tell me where the problem is ??
And modules correctly aligned. ::

1589225520178.png
 
Last edited:
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
After two days testing that they were working fine, suddenly WriteString, ReadString, Writer.Write ::: failed.
Release: B4a 9.80
Probe Debug Mode & Debug Legacy wiht Error
B4X:
java.io.FileNotFoundException: xxxx.txt: open failed: ENOENT (No such File Or directory)    ' Err message
B4X:
AddPermission (android.permission.WRITE_EXTERNAL_STORAGE)                                        ' Insert Manifiest
Can someone tell me where the problem is ??
And modules correctly aligned. ::

View attachment 93829
My guess is you probably should have started a new thread for this. Are you using Runtime Permissions?

- Colin.
 
Upvote 0

Mikonios

Active Member
Licensed User
Longtime User
My Permissions Manifiest::
B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="28"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />)
AddPermission(android.permission.GET_ACCOUNTS)                     
AddPermission(android.permission.READ_PHONE_STATE)                
AddPermission(android.permission.WRITE_EXTERNAL_STORAGE)            ' Err: WriteString, ReadString ' (*) Dangerous
AddPermission(android.permission.ACCESS_FINE_LOCATION)              ' (*) Dangerous
AddPermission(android.permission.ACCESS_COARSE_LOCATION)            ' (*) Dangerous
AddPermission(android.permission.WRITE_MEDIA_STORAGE)
AddPermission(android.permission.ACCESS_NETWORK_STATE)

The terrible thing is that it was compiling and running correctly. It generated the meta files for sql well and suddenly without modifying the environment it starts giving this uncontrolled error, and neither libraries nor modules nor java nor anything have been modified.
Now I cannot continue with the project and I have to dedicate myself to correcting anomalies in the environment.

The error occurs in both Debug & Release mode.
 
Last edited:
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
My Permissions Manifiest::
B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="28"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />)
AddPermission(android.permission.GET_ACCOUNTS)                      
AddPermission(android.permission.READ_PHONE_STATE)                 
AddPermission(android.permission.WRITE_EXTERNAL_STORAGE)            ' Err: WriteString, ReadString ' (*) Dangerous
AddPermission(android.permission.ACCESS_FINE_LOCATION)              ' (*) Dangerous
AddPermission(android.permission.ACCESS_COARSE_LOCATION)            ' (*) Dangerous
AddPermission(android.permission.WRITE_MEDIA_STORAGE)
AddPermission(android.permission.ACCESS_NETWORK_STATE)

The terrible thing is that it was compiling and running correctly. It generated the meta files for sql well and suddenly without modifying the environment it starts giving this uncontrolled error, and neither libraries nor modules nor java nor anything have been modified.
Now I cannot continue with the project and I have to dedicate myself to correcting anomalies in the environment.
That's not what I asked. Are you using Runtime Permissions? Your targetSdkVersion is set to 28, so if you aren't using Runtime Permissions your app will crash when you try to execute any commands that require a dangerous permission (ie: WRITE_EXTERNAL_STORAGE). This is not anything new - the original Runtime Permissions tutorial was written almost 4 years ago. Minimum targetSdkVersion requirement for Play Store has been 26 since August 2018 (& 28 since August 2019), so you should have been using Runtime Permissions for at least a couple of years...

- Colin.
 
Upvote 0

Mikonios

Active Member
Licensed User
Longtime User
(& 28 since August 2019), Date when the app stopped working in the Play Store. I love beautiful Google.
I am afraid that I must analyze what you transfer to me, study the Runtime Permissions and make these modifications before improvements.
Thank you very much for your indications Colin !!!!
- Mika
 
Upvote 0
Status
Not open for further replies.
Top