|
Post by baroquedub on Jan 27, 2021 14:27:26 GMT
Unity 2019.4.15 Simple SQL v 2.12.1
After changing to 'Android' in SimpleSQL>Options (using .Net 4.0 and IL2CPP) my build to Quest (android VR device) is failing with the following error:
G:\_UNITY Projects\VRKitchen_3 _wc\Temp\gradleOut\launcher\src\main\AndroidManifest.xml:27:9-36 Error:
Attribute application@allowBackup value=(false) from [:unityLibrary] AndroidManifest.xml:27:9-36
is also present at [:sqlite-android-3280000:] AndroidManifest.xml:10:9-35 value=(true).
Suggestion: add 'tools:replace="android:allowBackup"' to <application> element at AndroidManifest.xml:5:3-83 to override. Do I have to do what the suggestion mentions, and if so where do I find the AndroidManifest?
Or is there something else going on here?
(I've previously used SimpleSQL with a mobileVR headset without any problems)
|
|
|
Post by echo17 on Jan 27, 2021 17:14:02 GMT
I'm not really familiar with Android and have not encountered this error before. SimpleSQL builds fine on my Android Galaxy tab, so I'm not sure I'll be able to help troubleshoot this. You might try posting this question on the Unity Answers forum since this is related to sqlite's Android plugin (and not specifically SimpleSQL). The package sqlite-android-3280000 comes directly from sqlite.org, here: link
|
|
|
Post by baroquedub on Jan 27, 2021 19:02:41 GMT
Ok, so I got passed the error by essentially doing what it says. In Publish Settings I ticked on 'Custom Main Manifest': This creates an AndroidManifest.xml file in the Plugin folder (in Assets/) and then in that, I changed <application> to <application tools:replace="android:allowBackup"> Build now completes successfully and the sqlite database seems to work fine. Might be worth adding to the FAQ?
|
|
|
Post by echo17 on Feb 3, 2021 12:40:12 GMT
Good catch, I will add to the FAQ
|
|
jboss
New Member
Posts: 3
|
Post by jboss on Mar 4, 2021 12:32:11 GMT
I am developing for the Oculus Quest and Oculus requires its own store compatible AndroidManifest, so I can't simply create a custom manifest. Although there is actually an AndroidManifest in \Assets\Plugins\Android
And when I add the line tools:replace="android:allowBackup" in either the Oculus created manifest (AndroidManifest.OVRSubmission) or the custome manifest, I get a build error that tools is not a recognised prefix (and actually, already in Visual Studio I get an error telling that Namespace prefix 'tools' is not defined. What is going wrong?
Thanks! Edit: I found out I need to add xmlns:tools="schemas.android.com/tools" in the manifest tag. But now I get weird behaviour. If I add the tools:replace only to the AndroidManifest file it gets removed after build. If I add it only to the AndroidManifest.OVRSubmission file it gets copied to the AndroidManiefest file. But I still get the error and the build fails.
|
|
|
Post by echo17 on Mar 5, 2021 17:09:48 GMT
If I add the tools:replace only to the AndroidManifest file it gets removed after build. If I add it only to the AndroidManifest.OVRSubmission file it gets copied to the AndroidManiefest file. But I still get the error and the build fails. Sorry, but I have no experience with Android manifests. You might have some luck submitting your question to the Unity answer forums since this is more of a general Unity / Android question.
|
|
jboss
New Member
Posts: 3
|
Post by jboss on Mar 12, 2021 8:28:29 GMT
Oke, thanks. I'll give it a try. But my experiences with Unity answers are quite disappointing, so I'm afraid I'll have to figure it out myself anyway
|
|
jboss
New Member
Posts: 3
|
Post by jboss on Apr 11, 2021 9:48:58 GMT
I managed to solve it, although perhaps not in the preferred way For a different reason I picked up an old project that also uses SimpleSQL. That project is an app for Android tablet or phone, so not related to Oculus at all. And that builds fine and works fine. So I checked the SimpleSQL options and noticed that it had 4 instead of 3 options (Win 64 is the fourth) and I actually had Mac/Ios/Win selected, not Android. There was no changelog in the Documentation folder, so I checked the User Manual, that said version 1.1.0. The source folder, though, has version 2.1.0 So I copied that SimpleSQL folder to my Oculus Quest project, checked the Plugins/Android folder of my old project and found libsqlite3.so and copied that to my Quest project as well and now it builds without problems and works fine. Afterwards I checked the source folder of the backup of the project that did not work and there I have two zip files, 1.9.0 and 2.12.1. The problem may have been some mix-up between versions, but with 2.1.0 it works now.
|
|
|
Post by echo17 on Apr 12, 2021 11:06:37 GMT
libsqlite.so is an older version of Android's sqlite library. The newest version of SimpleSQL users a more modern Android sqlite library, so perhaps the Oculus is not compatible with that newer version. I couldn't find older versions of the library on Sqlite.org's website, but perhaps they have an archive somewhere ( sqlite.org/download.html). If anyone needs the older version, reach out to me at my email address in the signature and I'll get that over to you. Thank you for the additional info. I'm sure it will help others coming across this issue.
|
|