Log in or register to post comments

AndroidManifest override and split application binary - Unity

September 12, 2018 - 2:44am #1

Hi,

I've been searching for a solution for 2 days but can't be able to find it. It starts with the build larger than 100MB so I enable the Split Application Binary (SAB) option. Then I try uploading it to the Play Store and get the error :

"The minimum version code of the ARCore dependency com.google.ar.core.min_apk_version is not in the AndroidManifest.xml file, but the com.google.ar.core metadata tag has been specified" (although I'm not using ARCore and ARCore Supported is NOT checked)

So I search and find that I can override the AndroidManifest to add the missing line, so I build, copy the AndroidManifest from "Temp/StagingArea/" folder to my "Plugins/Android/" folder, add the line and build again. Now I can upload the build to the Play Store (wait for it to be online) then when I launch the app it looks like the .obb can't be accessed. (I tried using the Apk without the .obb directly on my phone and I had the same issue)

I tried multiple things and think the problem is related to AndroidManifest override and SAB because if I don't split my app or if I don't override AndroidManifest the app is working fine. But then I can't upload it to Play Store, either it's too big, either I got the ARCore error and now I'm stuck. 

I think there are multiple ways to fix this but it used to work without overriding AndroidManifest so I guess its just the google.ar.core line being added when it should not or the min_apk_version line not being added when it should.

 

Hope I explained myself clearly and that we can find a quick solution together,

Best Regards

 

AndroidManifest override and split application binary - Unity

September 25, 2018 - 3:59pm #8

We found the solution. Do the manifest steps as you already have, but before you make a build, you need to remove a line in the manifest that says <meta-data android:name="unity.build-id" android:value="[some id]"/>. This line is probably linked to the .obb that gets generated, so we don't want to override it.

AndroidManifest override and split application binary - Unity

September 20, 2018 - 12:48am #7

Well after reinstalling Unity for another reason it happens that it got the older Vuforia version that I used to use. When I searched for an older version I couldn't find one recent enough so this was a good thing.

And in this Vuforia version, it didn't add the ARCore line therefore not blocking the play store publish and it seems like it works (at least it works on my phone, need to try other ones today)

So the bug is definitely in Vuforia 7.2.23, when you override the android manifest with split application binary ticked it loses access to the obb, you can try to reproduce it yourself I'm sure you're going to have the same results (unless it was a broken thing in my Unity 2018.1.0f2 installation then my bad not reinstalling it right away)

AndroidManifest override and split application binary - Unity

September 17, 2018 - 1:41pm #6

Hey,

 

First thanks for your answer.

Yes I added both lines as stated in my first post and the error on the play store was gone so I could publish the new app but the problem is the app launched isn't working properly.

 

When I add the .aar in my plugins folder I just have a normal error because my device doesn't support arcore and thats normal, I don't use arcore and I don't need/want it (I'm not at the office right now so I can't get you some screenshots but I don't think its the problem since the AndroidManifest override solves the google play store issue but not the not working app)

 

Nothing relevant in the logs the apk is just working on its own without the obb so only the preloading (first) scene is available and there are no errors or anything, the problem isn't the vuforia plugin directly because

Quote:

On iOS, the app runs perfectly (just like in Editor) and can be uploaded to the AppStore.

On Android, without overriding the Android Manifest the app runs perfectly but can't be uploaded to the PlayStore.

On Android with overridden Android Manifest, the app starts the first scene with all texts missing then black screen when loading to the next scene (seems like missing obb) but can be uploaded to the PlayStore

, it's more the way Vuforia builds its AndroidManifest file that is in conflict with split application binary in some way. Is there a way to edit how Vuforia builds its AndroidManifest ? 

Thanks again, maybe we can manage to get this working before friday with your help

AndroidManifest override and split application binary - Unity

September 17, 2018 - 10:17am #5

Hello,

Can you confirm that when you override the manifest you are adding bot ARCore being optional AND setting the min APK version to 24? Both of these are required for that solution to work.

What error are you getting when you add the .aar into your Plugins folder? Could you share a screenshot and the log information?

When you get the black screen with text missing, what is being printed to the logs? Any relevant information? Do you see anything indicating Vuforia has initialized?

Thanks,

Vuforia Engine Support

AndroidManifest override and split application binary - Unity

September 14, 2018 - 7:43am #4

Hey Strasza,

I haven't solved this problem yet and I need to have it working for next week (the sooner the better) so here are some additional infos if it can help you figure this out or find a workaround

I'm using Unity 2018.1.0f2 and Vuforia 7.2.23. 

On iOS, the app runs perfectly (just like in Editor) and can be uploaded to the AppStore.

On Android, without overriding the Android Manifest the app runs perfectly but can't be uploaded to the PlayStore.

On Android with overridden Android Manifest, the app starts the first scene with all texts missing then black screen when loading to the next scene (seems like missing obb) but can be uploaded to the PlayStore

 

Changing these parameters in PlayerSettings didn't solve the issue:

- Multithreaded Rendering 

- Require ES3.1+AEP 

- Minimum API Level 

- Auto Graphics API (current are OpenGLES3 and Vulkan)

 

Sorry for being insistent but I'm out of ideas and the deadline is just around the corner! 

Hoping to hear from you soon,

Best Regards

AndroidManifest override and split application binary - Unity

September 13, 2018 - 12:53am #3

Hi,

thanks for your answer but unfortunately I've already tried this solution, in fact, that's the solution I'm talking about when I overrode the AndroidManifest and as I said it worked to upload the app to the Play Store but the app seems to lose the link to the .obb and therefore is not a valid solution for my problem.

And if you're talking about the .aar in Plugins/Android folder I tried it too but with that, there is an error when I start the app.

 

I think I've tried every available solution in the forums, maybe there is a quick fix that can be made to the "constructor" of the AndroidManifest file so that it doesn't write the ar.core line or add directly the missing line for ar.core dependency?

AndroidManifest override and split application binary - Unity

September 12, 2018 - 1:55pm #2

Hello DevSonic,

A user over in this thread, https://developer.vuforia.com/forum/unity/play-store-submission-error-comgooglearcore, seems to have found a solution to a problem that sounds very similar to yours. Could you try their suggestion and let us know if it fixes your issue?

Thanks,

Vuforia Engine Support

Log in or register to post comments