Hello,
I am trying to implement obb files into the basic android project on LazyFoo’s HelloMobile.
I created the obb file using jobb like this:
~/projects/android/android-sdk-linux/tools/jobb -pn com.tutorial.game -pv 1 -d ./world -o main.1.com.tutorial.game.obb
(where world is a directory containing 1 file: world.bin)
I push the obb onto my tablet (nvidia shield) like this:
adb push ./main.1.com.tutorial.game.obb /storage/emulated/0/Android/obb/com.tutorial.game/main.1.com.tutorial.game.obb
The androidmanifest.xml contains:
package="com.tutorial.game"
android:versionCode=“1”
the main.cpp contains:
SDL_SetHint(SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION, “1”);
SDL_SetHint(SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION, “1”);
I try to read a file like this:
string filename(“world.bin”);
SDL_RWops *fin = SDL_RWFromFile(filename.c_str(), “rb”);
if (fin != NULL)
{
cout << string("ANDROID: file ok: ") + filename << endl;
SDL_RWclose(fin);
}
else
{
cout << string("ANDROID: file NOKNOK: ") + filename << endl;
cout << string("readAndroid - SDL error: ") + SDL_GetError() << endl;
}
I have installed the following extras with the android SDKManager:
“Google Play APK Expansion library”
“Google Play Licensing library”
(both libraries are checked in the SDKManager)
Im targetting Android 4.4.2 (API 19)
I am getting following exception (in SDLActivity.java):
throw new IOException(“Could not access APK expansion support library”, ex);
Any tips would be welcome since I am struggling with this problem for over a week now.
Karel.