SQLException when using Google Analytics with Robolectric (or “Trying to use SQLite3 in Robolectric”)
问题 I'm using robolectric to test an activity that makes use of Google Analytics. Unfortunately, whenever I try to start up the activity I get the following exception android.database.SQLException at com.xtremelabs.robolectric.shadows.ShadowSQLiteDatabase.execSQL(ShadowSQLiteDatabase.java:149) at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java) at com.google.android.apps.analytics.PersistentEventStore$DataBaseHelper.onCreate(Unknown Source) at com.xtremelabs.robolectric.shadows