B4A Library Vitamio 5 (Version 5.2.3)

Addo

Well-Known Member
Licensed User
First compiling error

B4X:
Building app bundle    Error
[BT:1.5.0] Error: The file 'C:\Program Files (x86)\Anywhere Software\Basic4android\bundleconfig.json' is not a valid BundleConfig JSON file.
com.android.tools.build.bundletool.model.exceptions.InvalidCommandException: The file 'C:\Program Files (x86)\Anywhere Software\Basic4android\bundleconfig.json' is not a valid BundleConfig JSON file.
    at com.android.tools.build.bundletool.model.exceptions.InternalExceptionBuilder.build(InternalExceptionBuilder.java:57)
    at com.android.tools.build.bundletool.commands.BuildBundleCommand.parseBundleConfigJson(BuildBundleCommand.java:358)
    at com.android.tools.build.bundletool.commands.BuildBundleCommand.lambda$fromFlags$0(BuildBundleCommand.java:189)
    at java.base/java.util.Optional.ifPresent(Optional.java:183)
    at com.android.tools.build.bundletool.commands.BuildBundleCommand.fromFlags(BuildBundleCommand.java:189)
    at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:71)
    at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:47)
Caused by: com.google.protobuf.InvalidProtocolBufferException: Cannot find field: uncompressNativeLibraries in message android.bundle.BundleConfig
    at com.google.protobuf.util.JsonFormat$ParserImpl.mergeMessage(JsonFormat.java:1313)
    at com.google.protobuf.util.JsonFormat$ParserImpl.merge(JsonFormat.java:1273)
    at com.google.protobuf.util.JsonFormat$ParserImpl.merge(JsonFormat.java:1135)
    at com.google.protobuf.util.JsonFormat$Parser.merge(JsonFormat.java:351)
    at com.android.tools.build.bundletool.commands.BuildBundleCommand.parseBundleConfigJson(BuildBundleCommand.java:352)
    ... 5 more
 

moster67

Expert
Licensed User
Longtime User
Thank you @Erel. It works
It is almost like you anticipated that a similar requirement as mine would be needed.....

I had to put the "optimizations part" at the top of the JSON file but maybe it is not necessary and I messed up something while testing.
I am attaching my bundleconfigvitamio.json file which worked for me.

I would suggest that you use the attached JSON file only when you need to compile an App Bundle when Vitamio is used. If not, you are defeating the purpose App Bundles.

To use the attached JSON file, just make a temporary copy of the original bundleconfig.json file. Rename it to something else, perhaps bundleconfigoriginal.json. Then use the attached bundleconfigvitamio.txt file renaming it to bundleconfig.json (watch out for the extension). When you have generated your App Bundle, replace it with the original JSON file.

I am very pleased we got it working.
 

Attachments

  • bundleconfigvitamio.txt
    785 bytes · Views: 218

Zero7

Member
@moster67 hi, sorry to post here, I cannot send you a PM as you requested. I did a donation to obtain Vitamio5 wrapper. Can you contact me or send me a mail to the address I used for donation? My username is in the concept.

Thank you.
 

moster67

Expert
Licensed User
Longtime User
Thank you for your donation. I sent you instructions by mail.
@moster67 hi, sorry to post here, I cannot send you a PM as you requested. I did a donation to obtain Vitamio5 wrapper. Can you contact me or send me a mail to the address I used for donation? My username is in the concept.

Thank you.
 

Almora

Active Member
Licensed User
Longtime User
hi..
this method does not work when sdk31 is set.
 

moster67

Expert
Licensed User
Longtime User
hi..
this method does not work when sdk31 is set.
I am away from my computer but try adding to the Manifest:

android:extractNativeLibs="true" //in the Android Manifest

PS: you may need to adapt it for the manifest editor in B4A

Please let us know if it works.
 

Almora

Active Member
Licensed User
Longtime User
I am away from my computer but try adding to the Manifest:



PS: you may need to adapt it for the manifest editor in B4A

Please let us know if it works.
Okay. I'm going to publish it on google play and test whether it works.
 

moster67

Expert
Licensed User
Longtime User
What error do you get when uploading the bundle? Or do you get an error when installing the app on the device?

I read that the option
android.bundle.enableUncompressedNativeLibs=false
is deprecated from version 8.0 of the Android Gradle plugin (don't know if it is related to the bundle configuration or SDK 31?).

According to this post on SO, it might work by adding the following to the build.gradle file:
Java:
android {
    packagingOptions {
        jniLibs {
            useLegacyPackaging = true
        }
    }
}

Perhaps it can be included in the bundleconfig.json file in B4A? Maybe you can try to convert it into .json? Perhaps something like this:
JSON:
"packagingOptions": {
        "jniLibs":
        {
            "useLegacyPackaging":true
        }
    },
You will need to test.
Maybe only @Erel can answer this?
 

moster67

Expert
Licensed User
Longtime User
Following my previous post, there is also an option called useLegacyPackagingFromBundle. Perhaps it can be used like this in the json file (I am only throwing suggestions here since I am unable to test myself)
"useLegacyPackagingFromBundle":true
 

Almora

Active Member
Licensed User
Longtime User
The app works fine without publishing it on google play. but it doesn't work when published on google play. The error message does not appear. throws it off the page.



manifest...
useLegacyPackagingFromBundle="true"

I tried these and submitted them to be published on google play again.
 

Almora

Active Member
Licensed User
Longtime User
the last methods didn't work. the video does not open. throws it from the application.
 

RobertG ChuriónR

Member
Licensed User
Excuseme if i write here, but, this project functions in new android versions yet? for streaming, the source is code mp2a and mp2v, i can not do it with exoplayer, and witch addoexe audio fine but video null, thanks for your replies.
 

RobertG ChuriónR

Member
Licensed User
It is no longer compatible with new SDKs.
Thanks for your response, could you please guide me on how to play streams with exoplayer whose format is mp2a and mp2v? I found an example in the forum with ffmpeg (addoexo) but it plays only mp2a (audio) but not mp2v (it does not show video) . Highly grateful.
 

Almora

Active Member
Licensed User
Longtime User
There is no mp2v in the supported list of ExoPlayer. this is opened by those who have a wide form of support, such as vitamio.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…