Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6750569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:49:23+00:00 2026-05-26T12:49:23+00:00

I’m having a problem with the SQL Lite for my phone model is LG

  • 0

I’m having a problem with the SQL Lite for my phone model is LG Optimus One P500. my phone android version is updated from FroYo to Gingerbread and update works fine on me. My app also works fine on other phone models.

Application works at first and also shows my main page but when I start the game the problem then appears and then force closes my app.

Database creation (initialization) activity begins after the score page will show so I think the problem should not exists after I start the game but after all this problem only started when I added my database codes.

For better understanding my activity goes like this:

  1. Get name at the startup then stores the name in a String variable
    after start button is pressed. (My problem then exists on this part)
  2. I have a timer and score text in my second Layout this will be fetched later after the game is finished.
  3. The database will now be created(if not yet exists) and those 3 data will then be stored in the database.

Here’s my database code (I just get it from a tutorial from the web):

public class DataHelper {

    private static final String DATABASE_NAME = "scores.db";
       private static final int DATABASE_VERSION = 1;
       private static final String TABLE_NAME = "tblScores";

       private Context context;
       private SQLiteDatabase db;

       private SQLiteStatement insertStmt;
       private static final String INSERT = "insert into "
          + TABLE_NAME + "(name,score,time) values (?,?,?)";

       public DataHelper(Context context) {
              this.context = context;
              OpenHelper openHelper = new OpenHelper(this.context);
              this.db = openHelper.getWritableDatabase();
              this.insertStmt = this.db.compileStatement(INSERT);
           }

       public long insert(String name, String score, String time) {
          this.insertStmt.bindString(1, name);
          this.insertStmt.bindString(2, score); 
          this.insertStmt.bindString(3, time);
          return this.insertStmt.executeInsert();
       }

       public void deleteAll() {
          this.db.delete(TABLE_NAME, null, null);
       }

       public List<String> selectAll() {
              List<String> list = new ArrayList<String>();
              Cursor cursor = this.db.query(TABLE_NAME, new String[] { "name","score","time" },
                /*"name in ('A','B')"*/ null, null, /*"name"*/null, null, "score, time desc");
              if (cursor.moveToFirst()) {
                 do {
                    list.add(cursor.getString(0)+" "+cursor.getString(1)+" "+cursor.getString(2));
                    //list.add(cursor.getString(1));
                 } while (cursor.moveToNext());
              }
              if (cursor != null && !cursor.isClosed()) {
                 cursor.close();
              }
              return list;
           }

       private static class OpenHelper extends SQLiteOpenHelper {

          OpenHelper(Context context) {
             super(context, DATABASE_NAME, null, DATABASE_VERSION);
          }

          @Override
          public void onCreate(SQLiteDatabase db) {
             db.execSQL("CREATE TABLE " + TABLE_NAME + "(id INTEGER PRIMARY KEY, name TEXT, score TEXT, time TEXT)");
          }

          @Override
          public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
             Log.w("Example", "Upgrading database, this will drop tables and recreate.");
             db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME);
             onCreate(db);
          }
       }
    }

Here’s the log file from my phone:

[android.intent.category.LAUNCHER] flg=0x10200000 cmp=arc.android.memorygame/.Ma
inActivity } from pid 1875
D/PhoneWindow( 1875): <!>com.android.internal.policy.impl.PhoneWindow 1472<!> co
uldn't save which view has focus because the focused view com.jiubang.ggheart.ap
ps.desks.appfunc.XViewFrame@40675e08 has no id.
I/ActivityManager( 1573): Start proc arc.android.memorygame for activity arc.and
roid.memorygame/.MainActivity: pid=12927 uid=10098 gids={1015}
I/ggheart ( 1875): <!>fs 742<!> onStop
I/wpa_supplicant( 1731): wpa_supplicant_get_scan_results: Start
I/wpa_supplicant( 1731): CTRL-EVENT-SCAN-RESULTS  Ready
I/wpa_supplicant( 1731): wpa_supplicant_event_scan_results: ap_scan 1,  disconne
cted 0
I/wpa_supplicant( 1731): No suitable AP found.
I/wpa_supplicant( 1731): Setting scan request: 20 sec 0 usec
I/dun_service( 1481): process rmnet event
I/dun_service( 1481):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
V/WifiMonitor( 1573): <!>android.net.wifi.WifiMonitor$MonitorThread 176<!> Event
 [Setting scan request: 20 sec 0 usec]
I/#LGIME  ( 1671): <!>com.jungle.android.utils.Glog 32<!> #### onStartInput: res
tarting=false, fieldId=2131099699
I/ActivityManager( 1573): <!>com.android.server.am.ActivityRecord 444<!> Display
ed arc.android.memorygame/.MainActivity: +1s490ms
D/StatusBarPolicy( 1657): [BRIGHTHY] 0. mDataNetType: 1
D/StatusBarPolicy( 1657): [BRIGHTHY] curNetwork=51502 curHPLMN=51502
E/dalvikvm-heap(12927): 9850880-byte external allocation too large for this proc
ess.
E/GraphicsJNI(12927): VM won't let us allocate 9850880 bytes
D/skia    (12927): --- decoder->decode returned false
W/dalvikvm(12927): threadid=1: thread exiting with uncaught exception (group=0x4
0018560)
E/AndroidRuntime(12927): FATAL EXCEPTION: main
E/AndroidRuntime(12927): android.view.InflateException: Binary XML file line #2:
 Error inflating class <unknown>
E/AndroidRuntime(12927):        at android.view.LayoutInflater.createView(Layout
Inflater.java:518)
E/AndroidRuntime(12927):        at com.android.internal.policy.impl.PhoneLayoutI
nflater.onCreateView(PhoneLayoutInflater.java:56)
E/AndroidRuntime(12927):        at android.view.LayoutInflater.createViewFromTag
(LayoutInflater.java:568)
E/AndroidRuntime(12927):        at android.view.LayoutInflater.inflate(LayoutInf
later.java:386)
E/AndroidRuntime(12927):        at android.view.LayoutInflater.inflate(LayoutInf
later.java:320)
E/AndroidRuntime(12927):        at android.view.LayoutInflater.inflate(LayoutInf
later.java:276)
E/AndroidRuntime(12927):        at com.android.internal.policy.impl.PhoneWindow.
setContentView(PhoneWindow.java:207)
E/AndroidRuntime(12927):        at android.app.Activity.setContentView(Activity.
java:1657)
E/AndroidRuntime(12927):        at arc.android.memorygame.MainActivity.startGame
(MainActivity.java:194)
E/AndroidRuntime(12927):        at arc.android.memorygame.MainActivity$1.onClick
(MainActivity.java:108)
E/AndroidRuntime(12927):        at android.view.View.performClick(View.java:2485
)
E/AndroidRuntime(12927):        at android.view.View$PerformClick.run(View.java:
9080)
E/AndroidRuntime(12927):        at android.os.Handler.handleCallback(Handler.jav
a:587)
E/AndroidRuntime(12927):        at android.os.Handler.dispatchMessage(Handler.ja
va:92)
E/AndroidRuntime(12927):        at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(12927):        at android.app.ActivityThread.main(ActivityThrea
d.java:3729)
E/AndroidRuntime(12927):        at java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime(12927):        at java.lang.reflect.Method.invoke(Method.java:5
07)
E/AndroidRuntime(12927):        at com.android.internal.os.ZygoteInit$MethodAndA
rgsCaller.run(ZygoteInit.java:874)
E/AndroidRuntime(12927):        at com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:632)
E/AndroidRuntime(12927):        at dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime(12927): Caused by: java.lang.reflect.InvocationTargetException
E/AndroidRuntime(12927):        at java.lang.reflect.Constructor.constructNative
(Native Method)
E/AndroidRuntime(12927):        at java.lang.reflect.Constructor.newInstance(Con
structor.java:415)
E/AndroidRuntime(12927):        at android.view.LayoutInflater.createView(Layout
Inflater.java:505)
E/AndroidRuntime(12927):        ... 20 more
E/AndroidRuntime(12927): Caused by: java.lang.OutOfMemoryError: bitmap size exce
eds VM budget
E/AndroidRuntime(12927):        at android.graphics.BitmapFactory.nativeDecodeAs
set(Native Method)
E/AndroidRuntime(12927):        at android.graphics.BitmapFactory.decodeStream(B
itmapFactory.java:460)
E/AndroidRuntime(12927):        at android.graphics.BitmapFactory.decodeResource
Stream(BitmapFactory.java:336)
E/AndroidRuntime(12927):        at android.graphics.drawable.Drawable.createFrom
ResourceStream(Drawable.java:697)
E/AndroidRuntime(12927):        at android.content.res.Resources.loadDrawable(Re
sources.java:1709)
E/AndroidRuntime(12927):        at android.content.res.TypedArray.getDrawable(Ty
pedArray.java:601)
E/AndroidRuntime(12927):        at android.view.View.<init>(View.java:1951)
E/AndroidRuntime(12927):        at android.view.View.<init>(View.java:1899)
E/AndroidRuntime(12927):        at android.view.ViewGroup.<init>(ViewGroup.java:
286)
E/AndroidRuntime(12927):        at android.widget.LinearLayout.<init>(LinearLayo
ut.java:120)
E/AndroidRuntime(12927):        ... 23 more
W/ActivityManager( 1573):   Force finishing activity arc.android.memorygame/.Mai
nActivity
W/ActivityManager( 1573): Activity pause timeout for HistoryRecord{4070d4e8 arc.
android.memorygame/.MainActivity}
I/DemoService( 1875): <!>fs 730<!> DiyScheduer.onStart
I/ggheart ( 1875): <!>fs 732<!> onStart
I/ActivityManager( 1573): No longer want com.viber.voip:keepAliveReceiver (pid 2
474): hidden #16
D/StatusBarPolicy( 1657): [BRIGHTHY] 0. mDataNetType: 1
D/StatusBarPolicy( 1657): [BRIGHTHY] curNetwork=51502 curHPLMN=51502
I/#LGIME  ( 1671): <!>com.jungle.android.utils.Glog 32<!> #### onStartInput: res
tarting=false, fieldId=-1
I/ActivityManager( 1573): Process arc.android.memorygame (pid 12927) has died.

Also, anyone can help me in querying in Java? I’m quite a newbie in this one. As you see I’m just editing then testing the query commands. A detailed view on how this works will be fine.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T12:49:24+00:00Added an answer on May 26, 2026 at 12:49 pm

    Well. the exception is in there – OutOfMemoryError while inflating a bitmap

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am currently running into a problem where an element is coming back from
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.