Reputation: 361
I uploaded my apk to Google Play, but had to upload again because I had an expansion file and of course you can't upload the expansion file on the first try. When I uploaded the apk for a 2nd time I changed the version to 2 and it named my expansion file main.2.com.ssowens.groovebass.obb . Therefore, I adjusted the version in my code and renamed the obb file. Now the file isn't found and I can't for the life of me figure out why. What else do I need to update for a version update?
Here is what I changed: Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="main.2.com.ssowens.groovebass.obb"
android:versionCode="2"
android:versionName="1.0" >
In DownloaderFragment
public static final int MAIN_EXPANSION_FILE_VERSION = 2;
Didn't change anything here, but seems to be where it is failing
boolean expansionFilesDelivered() {
for (XAPKFile xf : xAPKS) {
String fileName = Helpers.getExpansionAPKFileName(getActivity(),
xf.mIsMain, xf.mFileVersion);
if (VERBOSE) Log.v(TAG, "+++ fileName +++ " + fileName + " " + xf.mFileSize + " "
+ " " + xf.mIsMain + " , " + xf.mFileVersion);
if (!Helpers.doesFileExist(getActivity(), fileName, xf.mFileSize, false))
return false;
}
return true;
}
Here is what prints out in the log:
09-16 17:56:16.045: E/Trace(20344): error opening trace file: No such file or directory (2)
09-16 17:56:16.138: V/DownloaderFragment(20344): +++ fileName +++ main.2.com.ssowens.groovebass.obb FileSize=> 519953080 xf.mIsMain=> true xf.mFileVersion=> 2
09-16 17:56:16.138: V/DownloaderFragment(20344): +++ expansionFilesNotDelivered +++
09-16 17:56:16.232: D/LVLDL(20344): Service Bound
09-16 17:56:16.271: D/libEGL(20344): loaded /vendor/lib/egl/libEGL_POWERVR_SGX540_120.so
09-16 17:56:16.310: D/libEGL(20344): loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so
09-16 17:56:16.318: D/libEGL(20344): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so
09-16 17:56:16.443: D/OpenGLRenderer(20344): Enabling debug mode 0
09-16 17:56:16.802: I/LicenseChecker(20344): Binding to licensing service.
09-16 17:56:17.013: I/LicenseChecker(20344): Calling checkLicense on service for com.ssowens.groovebass
09-16 17:56:17.013: I/LicenseChecker(20344): Start monitoring timeout.
09-16 17:56:17.615: I/LicenseChecker(20344): Received response.
09-16 17:56:17.615: I/LicenseChecker(20344): Clearing timeout.
09-16 17:56:17.623: E/LicenseValidator(20344): Signature verification failed.
Here is the name of the file:
main.2.com.ssowens.groovebass.obb
Verified file directory, file size and file name.
Upvotes: 1
Views: 1194
Reputation: 1340
I have similar problem of not able to read the expansion file after i had uploaded to Google Play (On the second upload of APK file with expansion pack to Google Play)
I realize that Google Play will update the expansion file naming from 1 to 2 automatically depending on the package version code. So I added in PackageInfo
VersionCode
to APKExpansionSupport
and the problem is solved.
Example:
PackageInfo pInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
ZipResourceFile zrf = APKExpansionSupport.getAPKExpansionZipFile(TravelDoorStartActivity.this, pInfo.versionCode, 0);
Hope that this will help the others beginner like me :)
Upvotes: 1
Reputation: 5670
Looks like you placed your expansion file name in place of package name
package="main.2.com.ssowens.groovebass.obb"
I suppose that you should have:
package="com.ssowens.groovebass"
Expansion file naming rules are:
[main|patch].<expansion-version>.<package-name>.obb
Upvotes: 0