concentricsky / android-viewer-for-khan-academy

An open source Android app for Khan Academy.
GNU General Public License v3.0
25 stars 23 forks source link

Crash on startup #1

Open dalb8 opened 11 years ago

dalb8 commented 11 years ago

I built this from source with the following patch to pom.xml, because I figured all the artifacts should be available on mvncentral :

diff --git a/pom.xml b/pom.xml
index b762225..873eff9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,17 +7,6 @@
     <packaging>apk</packaging>
     <name>Viewer for Khan Academy</name>

-    <repositories>
-        <repository>
-            <id>codehaus-snapshots</id>
-            <url>http://snapshots.repository.codehaus.org</url>
-        </repository>
-        <repository>
-            <id>springsource-repo</id>
-            <name>SpringSource Repository</name>
-            <url>http://repo.springsource.org/release</url>
-        </repository>
-    </repositories>

     <dependencies>
         <dependency>
@@ -27,15 +16,10 @@
             <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>android.support</groupId>
-            <artifactId>compatibility-v4</artifactId>
-            <version>11</version>
-        </dependency>
-        <!-- <dependency>
             <groupId>com.google.android</groupId>
             <artifactId>support-v4</artifactId>
             <version>r11</version>
-        </dependency> -->
+        </dependency>
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-core</artifactId>
@@ -132,7 +116,7 @@
                 <plugin>
                     <groupId>com.jayway.maven.plugins.android.generation2</groupId>
                     <artifactId>android-maven-plugin</artifactId>
-                    <version>3.3.2</version>
+                    <version>3.6.1</version>

                     <extensions>true</extensions>
                 </plugin>

It crashes with this on stock Nexus 7 running 4.3: W/dalvikvm(21657): threadid=1: thread exiting with uncaught exception (group=0x41a2e700) E/AndroidRuntime(21657): FATAL EXCEPTION: main E/AndroidRuntime(21657): java.lang.RuntimeException: Unable to create service com.concentricsky.android.khanacademy.data.KADataService: java.lang.IllegalStateException: Could not construct instance of helper class class com.concentricsky.android.khanacademy.data.db.DatabaseHelper E/AndroidRuntime(21657): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2587) E/AndroidRuntime(21657): at android.app.ActivityThread.access$1600(ActivityThread.java:141) E/AndroidRuntime(21657): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1338) E/AndroidRuntime(21657): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime(21657): at android.os.Looper.loop(Looper.java:137) E/AndroidRuntime(21657): at android.app.ActivityThread.main(ActivityThread.java:5103) E/AndroidRuntime(21657): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime(21657): at java.lang.reflect.Method.invoke(Method.java:525) E/AndroidRuntime(21657): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737) E/AndroidRuntime(21657): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) E/AndroidRuntime(21657): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime(21657): Caused by: java.lang.IllegalStateException: Could not construct instance of helper class class com.concentricsky.android.khanacademy.data.db.DatabaseHelper E/AndroidRuntime(21657): at com.j256.ormlite.android.apptools.OpenHelperManager.constructHelper(OpenHelperManager.java:217) E/AndroidRuntime(21657): at com.j256.ormlite.android.apptools.OpenHelperManager.loadHelper(OpenHelperManager.java:165) E/AndroidRuntime(21657): at com.j256.ormlite.android.apptools.OpenHelperManager.getHelper(OpenHelperManager.java:75) E/AndroidRuntime(21657): at com.concentricsky.android.khanacademy.data.KADataService.onCreate(KADataService.java:146) E/AndroidRuntime(21657): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2577) E/AndroidRuntime(21657): ... 10 more E/AndroidRuntime(21657): Caused by: java.lang.reflect.InvocationTargetException E/AndroidRuntime(21657): at java.lang.reflect.Constructor.constructNative(Native Method) E/AndroidRuntime(21657): at java.lang.reflect.Constructor.newInstance(Constructor.java:417) E/AndroidRuntime(21657): at com.j256.ormlite.android.apptools.OpenHelperManager.constructHelper(OpenHelperManager.java:215) E/AndroidRuntime(21657): ... 14 more E/AndroidRuntime(21657): Caused by: java.lang.IllegalStateException: Could not load object config file E/AndroidRuntime(21657): at com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper.<init>(OrmLiteSqliteOpenHelper.java:87) E/AndroidRuntime(21657): at com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper.<init>(OrmLiteSqliteOpenHelper.java:54) E/AndroidRuntime(21657): at com.concentricsky.android.khanacademy.data.db.DatabaseHelper.<init>(DatabaseHelper.java:104) E/AndroidRuntime(21657): ... 17 more E/AndroidRuntime(21657): Caused by: java.sql.SQLException: DatabaseTableConfig reading from stream cannot parse line: { E/AndroidRuntime(21657): at com.j256.ormlite.table.DatabaseTableConfigLoader.fromReader(DatabaseTableConfigLoader.java:74) E/AndroidRuntime(21657): at com.j256.ormlite.table.DatabaseTableConfigLoader.loadDatabaseConfigFromReader(DatabaseTableConfigLoader.java:32) E/AndroidRuntime(21657): at com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper.<init>(OrmLiteSqliteOpenHelper.java:85) E/AndroidRuntime(21657): ... 19 more W/ActivityManager( 433): Force finishing activity com.concentricsky.android.khan/com.concentricsky.android.khanacademy.app.HomeActivity I/WindowManager( 433): Screenshot max retries 4 of Token{42925988 ActivityRecord{42b9c190 u0 com.concentricsky.android.khan/com.concentricsky.android.khanacademy.app.HomeActivity}} appWin=Window{427d7720 u0 Starting com.concentricsky.android.khan} drawState=4 W/WindowManager( 433): Screenshot failure taking screenshot for (1280x800) to layer 22060 W/ActivityManager( 433): Activity pause timeout for ActivityRecord{42b9c190 u0 com.concentricsky.android.khan/com.concentricsky.android.khanacademy.app.HomeActivity} W/ActivityManager( 433): Activity destroy timeout for ActivityRecord{42b9c190 u0 com.concentricsky.android.khan/com.concentricsky.android.khanacademy.app.HomeActivity}

dalb8 commented 11 years ago

Forgot to mention it works fine on Android 4.2!

KIC commented 7 years ago

It used to work fine for me but crashes an start since approx 2 weeks... Too bad please fix