title: APK Expansion File Download exception
body: <p>I recently implemented the APK Expansion File code, described in
  <a href="http://developer.android.com/guide/market/expansion-files.html" rel="nofollow">http://developer.android.com/guide/market/expansion-files.html</a>, 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.</p>
  
  <p>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".</p>
  
  <p>I then used adb to install my signed APK onto my device and ran it and
  immediately got the following exception:</p>
  
  <hr>
  
  <pre><code>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.&lt;init&gt;(SQLiteCompiledSql.java: 65)
    at android.database.sqlite.SQLiteProgram.&lt;init&gt;(SQLiteProgram.java:83) 
    at android.database.sqlite.SQLiteQuery.&lt;init&gt;(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.&lt;init&gt;(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)
  </code></pre>
  
  <hr>
  
  <p>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".</p>
  
  <p>Any idea why, on a signed version, there is an SQLite exception in the
  downloader library, specifically DownloadsDB.java?</p>
  
  <p>My Project Build Target is 2.3.3</p>
  
  <p>I have the Google Play License, Downloader and Zip libraries
  referenced by my project</p>
  
  <p>And I have the following in my manifest:</p>
  
  <pre><code>&lt;uses-sdk android:minSdkVersion="4" android:targetSdkVersion="15" /    
  &lt;uses-permission android:name="com.android.vending.CHECK_LICENSE" /
  &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  &lt;uses-permission android:name="android.permission.WAKE_LOCK" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/&gt;
  &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
  &lt;service android:name=".MyAppDownloaderService" /&gt;
  &lt;receiver android:name=".MyAppAlarmReceiver" /&gt;
  </code></pre>
  
  <p>TIA,</p>
  
  <p>jb </p>