Bug in LAMW IDE/Wizard? (jFileProvider and Manifest)
lazarus / 43-Android
----------------------------------------------------------------------
Manlio · 2020-11-19 15:25
I'm facing the following problem, and I can't tell if I'm doing
something wrong, or if there is a bug in LAMW -- and in either case,
any help will be appreciated!
Using the latest LAMW with a project that contains a jFileProvider
component, my AndroidManifest.xml includes the following snippet:
Code: XML [Select][+][-]window.onload = function(){var x1 =
document.getElementById("main_content_section"); if (x1) { var x =
document.getElementsByClassName("geshi");for (var i = 0; i
Notice that "com.example.ee9" is the package name of my app.
Now, when I compile the the LAMW library, the manifest file gets
automatically modified, like in this other snippet:
Code: XML [Select][+][-]window.onload = function(){var x1 =
document.getElementById("main_content_section"); if (x1) { var x =
document.getElementsByClassName("geshi");for (var i = 0; i
As you can see:
1) An additional "provider" tag is added, even though the tag for that
provider was already there
2) This new provider tag uses "org.lamw.fileprovider" as the package
name (as if it were in the demo app) instead of my app's package ID.
It would seem that when LAMW/IDE Wizard is checking the manifest file,
it doesn't notice that the provider tag is there, and adds a new one
with the wrong package ID. Perhaps LAMW thinks that
"org.lamw.fileprovider" is the correct package ID, and when it doesn't
find it, it adds it... if it looked for the right package ID it would
see that it is already there.
... or am I doing something wrong?
Thanks for any help!
----------------------------------------------------------------------
jmpessoa · 2020-11-19 17:12
Quote or if there is a bug in LAMW -- and in either case, any help
will be appreciated!
Ok. I will fix it?
But, this cause some error in your project? or running the App?
----------------------------------------------------------------------
Manlio · 2020-11-19 17:17
Quote from: jmpessoa on November 19, 2020, 06:12:17 pm
But, this cause some error in your project? or running the App?
Sorry, I forgot to mention that! The project compiles OK, but building
the APK with gradle fails because of that.
I'm using gradle 5.3.1. The error message was that gradle failed to
merge manifests. Eventually I figured out that if I remove that extra
tag before calling gradle, then it works again.
----------------------------------------------------------------------
jmpessoa · 2020-11-19 17:40
Good.
I will try some fix.
A side note: LAMW now need gradle to "6.6.1"
----------------------------------------------------------------------
jmpessoa · 2020-11-19 20:16
Fixed!!!
NOTE:
you can get many "providers" like this:
Code: Pascal [Select][+][-]window.onload = function(){var x1 =
document.getElementById("main_content_section"); if (x1) { var x =
document.getElementsByClassName("geshi");for (var i = 0; i
And that is OK!!!