Android Question "This app was created for an older version of Android and may not work properly..." message

adriano.freitas

Active Member
Helo! I'm starting programming with B4A. When my first app runs, it checks if the database exists. If it doesn't exist, create it. If there is, use it. Everything works, however, when the database does not exist and he has to create a new one, the mobile application generates a message that says:

"This app was created for an older version of Android and may not work properly..."

After creating the file, I can run the app several times that doesn't happen.

Would someone know/could help me?

I put below the code that starts the base and the manifest.

Thank you very much!

P.S.: My original language is Portuguese, but I think I can understand the code.



The code that starts the base:

The code that starts the database.:
Sub CriaBaseDeDados()
    Private Query As String
    If File.Exists(File.DirInternal, "treebase.db") = False Then
       SQLTreeBase.Initialize(File.DirInternal, "treebase.db", True)  '  I have SQLTreeBase as a Global variable
       Query = "CREATE TABLE arvore (Codigo INTEGER PRIMARY KEY AUTOINCREMENT, Status TEXT, Pai INTEGER, Estrutura TEXT, Ordem INTEGER, Titulo TEXT, Conteudo TEXT)"
       SQLTreeBase.ExecNonQuery(Query)
       '
       ' Insert some test data
       '
       Query = "INSERT INTO arvore (Status, Pai, Estrutura, Ordem, Titulo, Conteudo) VALUES (?, ?, ?, ?, ?, ?)"       
       SQLTreeBase.ExecNonQuery2(Query, Array As Object("F",0,"*0*", 1, "Teste 1", "Texto Exemplo 1"))
       SQLTreeBase.ExecNonQuery2(Query, Array As Object("A",0,"*0*", 2, "Teste 2", "Texto Exemplo 2"))
       SQLTreeBase.ExecNonQuery2(Query, Array As Object("A",2,"*0*2*", 1, "Teste 2.1", "Texto Exemplo 2.1"))
       SQLTreeBase.ExecNonQuery2(Query, Array As Object("F",2,"*0*2*", 2, "Teste 2.2", "Texto Exemplo 2.2"))
       SQLTreeBase.ExecNonQuery2(Query, Array As Object("F",0,"*0*", 3, "Teste 3", "Texto Exempo 3"))
       SQLTreeBase.ExecNonQuery2(Query, Array As Object("F",3,"*0*2*3*", 1, "Teste 2.1.1", "Texto Exemplo 2.1.1"))
    Else
        SQLTreeBase.Initialize(File.DirInternal, "treebase.db", True)
    End If
End Sub


The Manifest code:

The Manifest Code:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="14" />
<supports-screens android:largeScreens="true"
    android:targetSdkVersion="29"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
 

agraham

Expert
Licensed User
Longtime User
Your manifest code is misssing a target SDK version for some reason.
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="30"/>
Delete the entire contents in the manifest editor, save it and B4A will provide a new default manifest.
 
Upvote 0

adriano.freitas

Active Member
Perfect!
I am so grateful for your help!

Taking advantage, another question that appeared: Can the Title bar have its height modified? And Background Color? If not, can I hide it but keep the app's main menu?
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
Can the Title bar have its height modified? And Background Color? If not, can I hide it but keep the app's main menu?
Don't know, I don't bother with the UI a lot - I just use the defaults. Always post different queries as a new question - more people see it and in the future people with a similar problem/query will find it, and any answer, easier with the forum search.
 
Upvote 0

asales

Expert
Licensed User
Longtime User
Thanks again for the new question and sorry my mistake!
Hi @adriano.freitas .
As you new in the forum, is better to check this:
and the documentation:

As your name is in Portuguese, you can also check this forum:
 
Upvote 0
Top