Not possible to upload expansion OBB files to Google Play

Today I have uploaded my APK file to Google Play for testing but it is not possible to add any expansion OBB file. There is no option available in the development console.

Any idea, what is happening? :shock:

I haven’t done multi-part APK deployment so far. Just to cover the obvious, did you read through this page? APK Expansion Files  |  Android Developers

Does the Unit OBB system use the ADK Expansion API automatically for you? I would expect all the coding tips on that page to be inside the Unity executable core for Android. If so, perhaps you’re missing something in your Manifest that marks it as requiring one or two expansion files, and thus enables the development console options related to expansion files.

No, that is not the problem. Anyone has uploaded OBB files recently?

1 Like

Hi angel_m

I’m struggling with a similar issue too for over one week now. Welcome to OBB hell :-x

Probably you need to switch to advanced mode in the APK panel of the Google Play Developer Console page.

First you just upload the APK file, then you get to a new form where you can upload the OBB main expansion pack, and if needed a patch file, which I never tested myself. - Hope this helps!

After the upload you should wait for several hours, until you can fetch the OBB…

For testing purpose, you can also put the OBB file on your device over USB by using ā€˜adb push main..com..<app_name>.obb /sdcard/Android/obb/com..<app_name>/’ (that folder needs to be created manually) and ā€˜adb install yourapp.apk’ in the console… The app should find the associated OBB if it’s put in the right place.

I’ve tested Google’s OBB Downloader plugin (Google Play OBB Downloader | Utilities Tools | Unity Asset Store), and it seems to download the file like expected to the same place as above, but we got problems afterwards with a plugin and all files in the StreamingAssets folder. The files from the OBB don’t get extracted into the right folders somehow, at least in our case…

Good luck!

1 Like

I have uploaded the APK file successfully but there isn’t any form to upload the OBB file.

You probably need to switch to advanced mode (upper right corner somewhere), then it should look like that screenshot here: android - Expansion files in the new Google Play developer console - Stack Overflow

That tutorial was somehow helpful too: Tutorial Unity 4 apk splitting into OBB for google play

Actually, doesn’t appear the option to upload OBB files in simple or advanced mode.

BTW I do have followed the tutorial.

I have found a help page telling right now it is not possible to add a OBB file with the first APK . But then what can we do?

Upload one a drawft or publish as beta, create a new version, and upload again :stuck_out_tongue:

Thanks.

I have another problem, now:

I am trying to use the Preloader script from the tutorial of this page:

But I get this error:

Exception: JNI: Init’d AndroidJavaClass with null ptr!
UnityEngine.AndroidJavaClass…ctor (IntPtr jclass) (at C:/BuildAgent/work/ea95e74f6e5f192d/Runtime/Export/AndroidJavaImpl.cs:533)

Any suggestion?

I used these references to implement:

http://labs.exoa.fr/tutorial-unity-4-apk-splitting-google-play-obb/
http://forum.unity3d.com/threads/135224-More-Google-OBB-drama/page2

https://github.com/FriedrichWessel/TestOBB/blob/master/Assets/AssetStorage.cs

Thanks but there isn’t anything related to my problem in those references.

same Problem as angel_m here too…
my old app worked fine now with latest Unity Version i have the trouble…
is there a solution ?
thank you!

@Muckel
I have success created with unity 4.2, I think that was release before 4.2.2f1. Wich versiono are you using?

@angel_m
The link Anthony Kozak :: DƩveloppeur - Consultant - Formateur :: Lille is 404

i’m using 4.2.2f1

the problem is that the APP crashes when try to download the obb beside the Error in the Editor:

Exception: JNI: Init'd AndroidJavaClass with null ptr!
UnityEngine.AndroidJavaClass..ctor (IntPtr jclass)
UnityEngine.AndroidJavaObject.get_JavaLangClass ()
UnityEngine.AndroidJavaObject.FindClass (System.String name)
UnityEngine.AndroidJavaClass._AndroidJavaClass (System.String className)
UnityEngine.AndroidJavaClass..ctor (System.String className)
GooglePlayDownloader.RunningOnAndroid () (at Assets/Plugins/Android/GooglePlayDownloader.cs:12)
GooglePlayDownloader..cctor () (at Assets/Plugins/Android/GooglePlayDownloader.cs:21)
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for GooglePlayDownloader

so this error showed never up before…

What version did u use when it worked ?
thanks

I don’t know. But probably something like 4.2.1. You are saying that it happens in the editor???

Yes this Error Msg is from the Console…
and the APP crashes on device when try to download the obb file…
if i publish direct from Unity to Device (with obb) all works fine…

You cant run android or ios plugins inside of unity3d editor. If you didn’t know about it, probably there is a ton of information that should help you in the basic documentation about plugins.

http://docs.unity3d.com/Documentation/Manual/PluginsForAndroid.html

Now, forget about editor, you must try to identify what is really happening in the device. What is the stack trace of the exception that crash?

You can increase the jni output information by adding ā€œAndroidJNIHelper.debug = true;ā€ code before any call and set adb to check native calls ā€œadb shell setprop debug.checkjni 1ā€.

yes i know that i can not execute android native code…
but also the check fails…
so i tried with Unity 4.3f3 same error
UNity 4.2.1f1 same error
sooo
it has to do with the Android SDK the Google Plugin not communicating correctly…
hmm i try your suggestion to debug the stuff… will report it here…
I also did a clean Android SDK install…
so publishing and running from Unity works fine…
App runs without any issues… exept if i try to fetch the obb…
Also the basic example fails…
thxxxx

is there anyone publishing an Android app using OBB files with success right now?

Please,can give us any support?