pkpio / MDroid

Moodle for Android
https://play.google.com/store/apps/details?id=in.co.praveenkumar
GNU General Public License v3.0
36 stars 47 forks source link

I have error when running. How can i resolve ? #87

Closed farihulrouf closed 8 years ago

farihulrouf commented 8 years ago
06-13 02:18:56.118 16008-16008/in.co.praveenkumar E/SQLiteLog: (1) no such table: MOODLE_SITE_INFO
06-13 02:18:56.119 16008-16008/in.co.praveenkumar D/AndroidRuntime: Shutting down VM
06-13 02:18:56.120 16008-16008/in.co.praveenkumar E/AndroidRuntime: FATAL EXCEPTION: main
                                                                    Process: in.co.praveenkumar, PID: 16008
                                                                    java.lang.RuntimeException: Unable to start activity ComponentInfo{in.co.praveenkumar/in.co.praveenkumar.mdroid.activity.LaunchActivity}: android.database.sqlite.SQLiteException: no such table: MOODLE_SITE_INFO (code 1): , while compiling: SELECT * FROM MOODLE_SITE_INFO WHERE id=? LIMIT 1
                                                                        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379)
                                                                        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2442)
                                                                        at android.app.ActivityThread.access$800(ActivityThread.java:156)
                                                                        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1351)
                                                                        at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                        at android.os.Looper.loop(Looper.java:211)
                                                                        at android.app.ActivityThread.main(ActivityThread.java:5389)
                                                                        at java.lang.reflect.Method.invoke(Native Method)
                                                                        at java.lang.reflect.Method.invoke(Method.java:372)
                                                                        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1020)
                                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)
                                                                     Caused by: android.database.sqlite.SQLiteException: no such table: MOODLE_SITE_INFO (code 1): , while compiling: SELECT * FROM MOODLE_SITE_INFO WHERE id=? LIMIT 1
                                                                        at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
                                                                        at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:895)
                                                                        at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:506)
                                                                        at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
                                                                        at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
                                                                        at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
                                                                        at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:44)
                                                                        at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1316)
                                                                        at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1163)
                                                                        at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1034)
                                                                        at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1240)
                                                                        at com.orm.SugarRecord.find(SugarRecord.java:208)
                                                                        at com.orm.SugarRecord.findById(SugarRecord.java:138)
                                                                        at in.co.praveenkumar.mdroid.helper.SessionSetting.setCurrentValues(SessionSetting.java:62)
                                                                        at in.co.praveenkumar.mdroid.helper.SessionSetting.<init>(SessionSetting.java:43)
                                                                        at in.co.praveenkumar.mdroid.activity.LaunchActivity.onCreate(LaunchActivity.java:17)
                                                                        at android.app.Activity.performCreate(Activity.java:5990)
                                                                        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
                                                                        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2332)
                                                                        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2442) 
                                                                        at android.app.ActivityThread.access$800(ActivityThread.java:156) 
                                                                        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1351) 
                                                                        at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                        at android.os.Looper.loop(Looper.java:211) 
                                                                        at android.app.ActivityThread.main(ActivityThread.java:5389) 
                                                                        at java.lang.reflect.Method.invoke(Native Method) 
                                                                        at java.lang.reflect.Method.invoke(Method.java:372) 
                                                                        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1020) 
                                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815) 
06-13 02:19:00.752 16008-16008/in.co.praveenkumar I/Process: Sending signal. PID: 16008 SIG: 9
06-13 02:19:34.046 16237-16237/in.co.praveenkumar I/Process: Sending signal. PID: 16237 SIG: 9
pkpio commented 8 years ago

Looks like the required SQL tables for local caching are not created in your case. This is strange and unlikely if you installed the application from playstore. If you are building from source, make sure to declare the Custom application class. This is already done in the original source code.

pkpio commented 8 years ago

And also, for future reference, please refrain from sending multiple emails about the same issue. It has been only 2 hours since the issue was opened. We don't all live in the same timezone.

farihulrouf commented 8 years ago

do you have example source for custom application class ?

pkpio commented 8 years ago

MDroid uses custom application class. You just have to declare this in manifest file

If you run a simple clone of MDroid source, it should work fine.

farihulrouf commented 8 years ago

i have sample run without changing source code but still error (no such table: MOODLE_SITE_INFO). i

pkpio commented 8 years ago

Could you uninstalling the application and try again? And also, which device are you using?

farihulrouf commented 8 years ago

yes it's sucess when unistalling . oh ya can i change string.xml for change language i have an error ( Unfertunately Mdroid has stopped .

pkpio commented 8 years ago

https://developer.android.com/training/basics/supporting-devices/languages.html

Rajook commented 3 years ago

App not responding issue when I want to download any video of my course content it is not downloading the video.