B4A Library Dropbox SDK V2 - Java

Sabotto

Member
Please help me.

I downloaded and modified the project and downloaded the libraries
I'm getting an error here

B4X:
Sub Service_Create
    'This is the program entry point.
    'This is a good place to load resources that are not specific to a single activity.
    kvs.Initialize(File.DirDefaultExternal, "datastore2")
End Sub
Logger connesso a: LCL0218907002357
--------- beginning of crash
--------- beginning of system
--------- beginning of main
Copying updated assets files (1)
*** Service (starter) Create ***
Error occurred on line: 16 (Starter)
android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (Sqlite code 14 SQLITE_CANTOPEN): Could not open database, (OS error - 2:No such file or directory)
at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:231)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:213)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:553)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:215)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:204)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:948)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:927)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:818)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:765)
at anywheresoftware.b4a.sql.SQL.Initialize(SQL.java:44)
at b4a.example3.keyvaluestore._initialize(keyvaluestore.java:362)
at b4a.MioDropbox.starter._service_create(starter.java:152)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:193)
at b4a.MioDropbox.starter.onCreate(starter.java:56)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4521)
at android.app.ActivityThread.access$2600(ActivityThread.java:296)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2243)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:8178)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)
** Service (starter) Start **


What can it be?
These are the used librarie

1596269886636.png
 

netsistemas

Active Member
Licensed User
Permision?

or

i use this code:
and mayby, review this link:
'https://b4x.com/android/forum/threa...ory-file-dirdefaultexternal-not-exists.93099/

B4X:
Sub RutaDBCorrecta() As String
Dim TargetDir As String

'https://b4x.com/android/forum/threads/no-such-file-or-directory-file-dirdefaultexternal-not-exists.93099/


If File.ExternalWritable  Then'
    'Private rp As RuntimePermissions
    TargetDir =  Starter.rp.GetSafeDirDefaultExternal("") ' File.DirDefaultExternal
Else
    TargetDir = File.DirInternal
End If

Return TargetDir
End Sub
in starter i have this code:

B4X:
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
    Public rp As RuntimePermissions


    
    
End Sub
 
Top