English 中文(简体)
缩略语
原标题:APK Expansion File Download exception

I recently implemented the APK Expansion File code, described in http://developer.android.com/guide/market/expansion-files.html, into my app. I updated the manifest, created the Service and Receiver files and update my main activity onCreate() to conform to the instructions in the guide.

I created a signed apk of my app, and uploaded it to my Google Play account, along with the obb file. These were saved as "drafts".

I then used adb to install my signed APK onto my device and ran it and immediately got the following exception:


java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myapp/com.example.myapp.MyApp}:
android.database.sqlite.SQLiteException: no such table: 
MetadataColumns: , while compiling: SELECT APKVERSION,_id,DOWNLOADSTATUS,DOWNLOADFLAGS FROM MetadataColumns LIMIT 1
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 1821)
  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 1842)
  at android.app.ActivityThread.access$1500(ActivityThread.java: 132)
  at android.app.ActivityThread $H.handleMessage(ActivityThread.java:1038)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loop(Looper.java:150)
  at android.app.ActivityThread.main(ActivityThread.java:4263)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:507)
  at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:839)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
  at dalvik.system.NativeStart.main(Native Method)
Caused by: android.database.sqlite.SQLiteException: no such table:
MetadataColumns: , while compiling: SELECT APKVERSION,_id,DOWNLOADSTATUS,DOWNLOADFLAGS FROM MetadataColumns LIMIT 1
  at android.database.sqlite.SQLiteCompiledSql.native_compile(Native Method)
  at android.database.sqlite.SQLiteCompiledSql.compile(SQLiteCompiledSql.java: 92)
  at android.database.sqlite.SQLiteCompiledSql.<init>(SQLiteCompiledSql.java: 65)
  at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:83) 
  at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java: 49)
  at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java: 53)
  at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java: 1438)
  at android.database.sqlite.SQLiteDatabase.rawQuery(SQLiteDatabase.java: 1406)
  at com.google.android.vending.expansion.downloader.impl.t.<init>(SourceFile: 76)
  at com.google.android.vending.expansion.downloader.impl.t.a(SourceFile: 44)
  at com.google.android.vending.expansion.downloader.impl.DownloaderService.a(SourceFile: 634)

What is interesting is that if I run my app through the Eclipse debugger, I can execute the code that caused the exception, and continue normal processing, getting a message "Download failed because you may not have purchased this app".

Any idea why, on a signed version, there is an SQLite exception in the downloader library, specifically DownloadsDB.java?

我的项目建设目标为2.3.3

I have the Google Play License, Downloader and Zip libraries referenced by my project

我的发言如下:

<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="15" /    
<uses-permission android:name="com.android.vending.CHECK_LICENSE" /
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<service android:name=".MyAppDownloaderService" />
<receiver android:name=".MyAppAlarmReceiver" />

TIA,

页: 1

问题回答

是的,但目前的做法已经改变。 每项申请都至关重要,

这一错误主要出于几个原因,确保:

you are logged in from your test acoount into your device. key are same in your code as well. you have mentioned the size of expansion file in code correctly in bytes. after uploading wait for 3-4 hours, then it will start downloading, instantly it does not work.





相关问题
In Eclipse, why doesn t "Show In" appear for non-Java files?

If I have a *java file open, I can right click on the source, scroll down to "Show In (Alt-Shift-W)", and select Navigator. If I have an *xml, *jsp, or pretty much anything besides a Java source ...

Eclipse: Hover broken in debug perspective

Since upgrading Eclipse (Galileo build 20090920-1017), hover in debug no longer displays a variable s value. Instead, hover behaves as if I were in normal Java perspective: alt text http://...

Eclipse smart quotes - like in Textmate

Happy Friday — Does anyone know if eclipse has the notion of smart quotes like Textmate. The way it works is to select some words and quote them by simply hitting the " key? I m a newbie here so be ...

Indentation guide for the eclipse editor

Is there a setting or plugin for eclipse that can show indentation guides in the editor? Something like the Codekana plugin for visual studio (not so fancy is also OK). Important that it works with ...

Adding jar from Eclipse plugin runtime tab

I want to add .jar files for plugin from the Runtime tab of manifest file. When I use the Add... button, I can see only sub-directories of the plugin project. So if I want to add same .jar file to ...

How to copy multiple projects into single folder in eclipse

I have two projects, Project1 and Project2. Now i want to copy this projects into eclipse workspace but i want these projects to be in a single folder like below. Eclipse Workspace -> Project -> ...

Java: Finding out what is using all the memory

I have a java application that runs out of memory, but I have no idea which code is allocating the memory. Is there an application with which I can check this? I use Eclipse.

热门标签