Android SQLite Database Tutorial 2 # Introduction + Creating Database and Tables (Part 2)

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 456

  • @jakubmarincic7543
    @jakubmarincic7543 5 лет назад +105

    Guyz. There was some sort of update to SQLite. If you want to see whats in ".db" file you need to extract all three files located in "database" folder (If you have only 2 files as showed in video, then you can use method from the video, I guess). Next you need to open them in a manager, that supports opening multiple files. "DB Browser for SQLite" works perfectly, but you need to install it (it's free though).
    I've spent several hours debugging why is my .db file empty and why there is no table at all. So try to put this comment to the top, so others can save some time :D Thx.

    • @rutvij2811
      @rutvij2811 5 лет назад +3

      saved my life there bro. Here I was thinking that am stupid that I am not even able to make a different table after watching the tutorial.

    • @premkirankatinedi4479
      @premkirankatinedi4479 5 лет назад +2

      Saved my time..thanks !!!

    • @lNephthys00
      @lNephthys00 5 лет назад +1

      Had everything perfect then thought it was broken. Thank you so much!

    • @RezaJafari1984
      @RezaJafari1984 5 лет назад +1

      Thank you dude

    • @imrsk
      @imrsk 5 лет назад

      God spotted here

  • @ArshdeepSingh-vw2uj
    @ArshdeepSingh-vw2uj 6 лет назад +1

    For those who do not see content in data folder (steps are really simple just exaggerated!) which is actually there but you don't have permission to see it via android device monitor
    1. file-> project structure -> (copy SDK file location) -> (open SDK file in file explorer)->(you will see a folder 'platform-tools' click on it) -> (copy this file location)
    2. ->now press 'win+r' (to open run)->type 'cmd' -> just type this 'cd /d (your location that you have copied)'
    3. now type adb root -> press enter
    4. now come back to android studio rebuild the Gradle and now you should be able to see the file
    or
    4. come back to the android studio on the right-hand bottom corner you will see 'Device File Explorer' written vertically just press on that. right click on your database to save it somewhere.

  • @cjjb
    @cjjb 9 лет назад +4

    Great tutorial.
    If anyone's Android Device Monitor will not open and throws an error, try running Android Studio as the administrator. It worked for me!

    • @prabhu2099
      @prabhu2099 8 лет назад +3

      +Conor I am still getting "An error has occurred" with a reference to a log file, even after running as administrator. What else should I do?

    • @maksymkovalenko6415
      @maksymkovalenko6415 6 лет назад +1

      Or, you can try " Device File Explorer". It's work for me.

    • @horriblecoder7280
      @horriblecoder7280 6 лет назад

      Maksym Kovalenko you saved me

  • @Linxy
    @Linxy 9 лет назад +5

    For those who cannot seem to get the data folder expanding, try using the emulator. For me the case was that it wouldnt expand while connected to a real device but when using a emulator on pc it worked.

    • @veyndan89
      @veyndan89 9 лет назад +2

      ***** Thanks. I was having the same problem. It appears that you need your device to be rooted to be able to access the folders.

    • @cjjb
      @cjjb 9 лет назад

      +aka Linxy Thanks, worked for me.

    • @TheRosso84
      @TheRosso84 6 лет назад +1

      emulator still doesnt expand :/

  • @muhammadalifhaikal3981
    @muhammadalifhaikal3981 4 года назад

    Thank you for explaining about creating database and table sqlite sir.. Hopefully will help us to doing some final year project

  • @vibgyorgamingtech
    @vibgyorgamingtech 5 лет назад +3

    Hear yourself at 1.5 speed. Looks perfect during explanations.

  • @christianmichon1940
    @christianmichon1940 8 лет назад

    Your tutorial is very clear. I had no problem to follow every step. Thanks for all of your efforts and Generosity !

  • @tiztrain
    @tiztrain 6 лет назад +1

    For anyone having issues 3 things need to be checked:
    1. Running Android Studio as administrator
    2. Make sure after "CREATE TABLE" there is a space. Eg. "CREATE TABLE " + .... also if you are using the variables instead of hard coding the values in, put a space in front of the variable properties. Eg. " INTEGER PRIMARY KEY AUTOINCREMENT," ... my full string is:
    "CREATE TABLE " + TABLE_NAME + "(" + COL_1 + " INTEGER PRIMARY KEY AUTOINCREMENT," + COL_2 + " TEXT," + COL_3 + " TEXT," + COL_4 + " TEXT"+ ")"
    3. Make sure you are running an emulator with a lower API, users have stated 23 and below, I am using 22.
    Thanks to everyone who posted their solutions in the comments. Lifesavers

  • @mubbashirmumtaz8585
    @mubbashirmumtaz8585 5 лет назад

    Those who are facing problem finding Database File inthe newer version, Open File Explorer on the right hand side (if you see files then you're good to go and if you can't then) > run your program or virtual device you'll be then able to see your files.
    Like this comment so others can get help it took me 15 minutes to realize and find this in the newer android version.

    • @lkz8344
      @lkz8344 4 года назад

      Sorry to be a bother, and I know this is 6 months later, but I cannot seem to find my folder after opening database file and searching in folder data > data. I also don't think I saved it anywhere else.

  • @YazlmAkademisieed
    @YazlmAkademisieed 7 лет назад

    I couldn't use db until I saw your videos, thank you :)

  • @HabiburRahman-xs9gb
    @HabiburRahman-xs9gb 4 года назад

    for new viewers who dont find Android/android device monitor...it's on the bottom right corner of your android studio..device file explorer

  • @karangupta8965
    @karangupta8965 5 лет назад

    Very helpful...most other videos do not go this in depth. Thanks!

  • @horriblecoder7280
    @horriblecoder7280 6 лет назад +1

    Device file explorer is what you should refer. Search it and open it. Go to data-) data-) find your app and click databases.

  • @venugopalvangari9556
    @venugopalvangari9556 6 лет назад +17

    09:03
    In Latest Version(from 3.1) u can get db file directly at bottom right --> Device File Explorer

    • @Alquerian
      @Alquerian 4 года назад +1

      Good call! Android Device Monitor was deprecated as of Android Studio 3.1

  • @meherkhan933
    @meherkhan933 7 лет назад

    Outstanding!!! Thank you very much for your SQLite database connectivity tutorial, slowly explain everything. I don't have any word to describe it. I wish you all the success in life and definitely you will for high level in IT. Brilliant.....

  • @vishnubhaarath7002
    @vishnubhaarath7002 4 года назад

    In Android Studio 3.1 or higher You can open the database by:
    View>Tool Windows>Device File Explorer>data>data>appname>database

  • @dusansasic7755
    @dusansasic7755 7 лет назад

    Solution for not opening data base!
    You just have to use an emulator with lower api then 23. I used 19 and it worked for me.

    • @sahidul154
      @sahidul154 7 лет назад

      I'm using api 19 in emulator still same problem

  •  7 лет назад

    For those who don't use Firefox, SQLite Viewer with Google Drive plugin in Chrome seems good enough.

  • @p32929
    @p32929 7 лет назад

    Thanks for telling us about the Firefox addon :) It was really a big help to check if the database is created right or not :)

  • @arvvv340
    @arvvv340 5 лет назад

    Good day sir! Why does the TABLE in CREATE TABLE became red? It says that INDEX, TABLE, TEMP, TEMPORARY, TRIGGER, UNIQUE, VIEW or VIRTUAL expected, got tableregisteration (which is the table name I put)? Your tutorials are life saving for a beginner like me. Please help :(

  • @gorcsaandreea2735
    @gorcsaandreea2735 5 лет назад +1

    Thank you very much! You helped me a lot and I understood the explanations as well.

  • @rrafaelpaz
    @rrafaelpaz 8 лет назад +4

    Thank you for this very clearly class! Keep it up, mate!

  • @editprousama
    @editprousama 4 года назад

    Fix it if ur db is not showing :-
    If you are using an actual device, you will not be able to see or access it from outside unless you root your phone.
    If you are using the emulator, the DDMS view will let you navigate to it and pull it from there.

  • @sairam9508
    @sairam9508 7 лет назад +4

    1.what is cursorfactory?
    2.Why should we give cursorfactory as null?
    3.when should we use it? and how?
    can anyone explain pls!!!!!

  • @okcecicence6072
    @okcecicence6072 7 лет назад

    Awesome tutorials mate.Are you going to create more Android tutorials? Would be awesome if you combine with some database and create an app or something.

  • @florinpaul351
    @florinpaul351 4 года назад

    Thank you. The Tutorial was so helpful. Everything was working perfect.

  • @janghagos13
    @janghagos13 3 года назад

    i think you skip a part? i followed your instruction but ive got an error. is says error: constructor DatabaseHelper in class DatabaseHelper cannot be applied to given types;

  • @chhayaprakashraojadhav16be26
    @chhayaprakashraojadhav16be26 4 года назад

    that firefox trick was nice

  • @ricksoftwareengineering1489
    @ricksoftwareengineering1489 7 лет назад

    This video has few mistakes but thanks for sharing this with everyone!

  • @fester6537
    @fester6537 5 лет назад +1

    The database won't be created until you call getWritableDatabase() or getReadableDatabase(). Something to keep in mind if the databases aren't showing up for you

  • @abnerpaulccarilindo6503
    @abnerpaulccarilindo6503 7 лет назад

    GREAT VIDEO! WHAT IF I WOULD USE 4 TABLES, WHERE DO I CREATE IT? WHAT ABOUT FOREIGN KEYS? THANKS!

  • @waelhassan1911
    @waelhassan1911 8 лет назад

    Thank you for your good explanation
    Can you explain how to make relations between tables

  • @arsalkiyani4895
    @arsalkiyani4895 8 лет назад

    This is my second comment on this video please help me that data folder is not open when clicking on it. please guide as soon as possible Thank you

  • @Montaine111
    @Montaine111 7 лет назад

    hi, please enable closed captions? I was able to see the captions with the First tutorial, but seems disabled for this one and the next. :( I'm deaf and dependent on the subtitles to hear what you're saying.
    "there is no CC button displayed, that means the RUclips channel owner has disabled captions"

  • @velocityXIII
    @velocityXIII 8 лет назад

    Thank you very much!. Really helpful and straight forward!

  • @henilpatel1633
    @henilpatel1633 4 года назад

    Nicely explain....☺️

  • @bilalahmedkhan9184
    @bilalahmedkhan9184 8 лет назад

    Woo hoo thanks alot sire, it helped me very much..

  • @DanielBrito
    @DanielBrito 9 лет назад

    thanks for the excellent tutorial and the sqlite trick for firefox

  • @nuwanseneviratne8599
    @nuwanseneviratne8599 6 лет назад

    Thank you sir.... that's really helpful... many thanks..

  • @SinanNoureddine
    @SinanNoureddine 6 лет назад

    Thank you Sir! Saved me a lot of time

  • @kaarirenka
    @kaarirenka 8 лет назад

    Thank you very much , your tutorials helped me alot

  • @luvpatel1867
    @luvpatel1867 4 года назад

    Great video man!

  • @user0m170
    @user0m170 7 лет назад +1

    thank you so much ! well explained, such clarity!

  • @sohamashtekar5315
    @sohamashtekar5315 8 лет назад

    After Creating it ones will it be stored in device memory permanently or it will be created after u open the app??

  • @ts404
    @ts404 8 лет назад

    If you cannot view the files in the Android Device Manager, try using an emulator with an API level of 23.

  • @pranishshrestha4781
    @pranishshrestha4781 8 лет назад

    No database is created when I use the same code. When the application was executed in debug mode, I found out that the onCreate() method was not called. How to solve this issue?

  • @yashsamsung2539
    @yashsamsung2539 7 лет назад

    Hey Bro
    field of table that was i trying to created are id,name,cont no,area bt it will give me this error that
    Error:Failed to capture snapshot of output files for task 'transformClassesWithDexForDebug' property 'streamOutputFolder' during up-to-date check.
    > Failed to create MD5 hash for file 'C:\Users\Dell\AndroidStudioProjects\DBApp\app\build\intermediates\transforms\dex\debug\folders\1000\5\slice_3\classes.dex'.
    so how i solve this

  • @nishabuhameedk2641
    @nishabuhameedk2641 9 лет назад

    Thanks for the glimpses on Firefox Add-on :)

  • @HeyThereGuy
    @HeyThereGuy 7 лет назад

    Fantastic. Thank you for making this.

  • @josatstech4935
    @josatstech4935 4 года назад

    i have enjoyed this video

  • @edwarlkd814
    @edwarlkd814 8 лет назад

    Mine works except the database is not created. I checked using all different ways explained in the video, but it just not there.
    I can't find it on ANdroid Device Monitor and same when using SQLiteManager on Firefox.
    Please help, the code compiles without problem using a virtual emulator. I am confused and lost

  • @kushalar899
    @kushalar899 4 года назад

    hello sir,
    I got a true reply with Toast but when it is opened with DB Browser SQLite no table found... I'm not getting what is the error,, Please respond sir

  • @greendingy
    @greendingy 8 лет назад

    Thanks for the video. Do you happen to know how to save the .db (or .csv) in another location instead of the default folder (/data/data)? E.g. on your SD card or the "Downloads" folder. I'm asking because when running the app of an actual phone (not emulator), you can't access where the app stores the .db unless the phone is rooted. I would like to retrieve the created .db to my PC. Thanks in advance.

  • @videocollection1925
    @videocollection1925 7 лет назад

    Very Simple Solution is that Change your api level to 23 to below
    Over 23 it won't work
    Thanks

  • @DCorn098
    @DCorn098 7 лет назад

    If this is made for API 23 (So you can see the database on ADM), what is the solution for API 25 (Nougat)? I mean is there a way on API 25 to see de database file on ADM?

  • @JavaAnatomy
    @JavaAnatomy 8 лет назад

    Can you please explain how to import an already existing database into my app. i have a huge.sql file which i want to use in my android app.

  • @NoName-on2ih
    @NoName-on2ih 8 лет назад

    If I want to create two or more tables in sqlite and android studio.., How I can code with this? Please reply me asap because Im doing the android project. Thank you.

  • @Kenjum55555
    @Kenjum55555 7 лет назад

    A fix that stopped crashes for me:
    In DatabaseHelper.class, look at the constructor. Change
    super(context, DATABASE_NAME, null, 1);
    to
    super(context, DATABASE_NAME, null, 2);
    The program was working on my emulator (API 23) but not my phone (API 25). You can see the database files in Android Data Monitor if you are using an emulator/phone that is API 23 or older, otherwise I don't think you can view the files unless your emulator/phone is rooted.
    I spent like 6 hours trying to figure this out. The solutions that were popping up were using external storage (I didn't want to stray too far from this tutorial's setup), change the target API (23 instead of 25, but didn't work), rooting phone (I didn't want to root my phone), or doing some shell commands (I didn't have proper permissions). I was looking at my Android Monitor and it was saying it couldn't find the file and was pointing to my getAllData() function in DatabaseHelper.class (getAllData() is covered in a later video in this series). Then, I started messing with anything that looked like could be changed. In the constructor I changed a 1 to 0 and the program crashed immediately. I then changed it to a 2 and it worked. I don't know why it worked, but it worked.

  • @HaNguyen-vs9nw
    @HaNguyen-vs9nw 5 лет назад

    Sorry sir. I was creating a connection between my laptop and my mobile phone, and just find database in data/android... when choosing view/tool windows/device file explore. So, how can I manipulate with tool: SQLite Manager to open database like choosing view/tool windows/device file explore ??

  • @larrytsai5787
    @larrytsai5787 9 лет назад +2

    Thanks for tutorial, I tried access my /data/data folder but it doesn't drop any of my folders down... I rooted my phone but still no luck. Any Ideas?

    • @kattejansp2980
      @kattejansp2980 9 лет назад +3

      Larry Tsai Had the same problem with the device monitor, the folder wouldn't open/drop down when i clicked it. I just looked at it on my phone instead. I found two ways, either download a sqlite manager to your phone from google play and give it superuser/root access, navigate to /data/data/com.xxx.xxx/the appname /other folder/ so on /databases/ then you can see your database on your phone. Or use your file explorer if you have one and send the .db file to your computer in your normal way you send files. I use ES file explorer BUT you need to toggle the root explorer button on it aswell. When ES file explorer open, open the left "slide"/fas-accesst" menu, either slide from left to right or click the three lines up in the let corner. Find tools , then toggle the root-explorer button to on. And you should be able to navigate in the /data/data-files.
      I see you have your phone rooted, but to anyone else who reads this. I'm pretty sure you need a rooted phone for this to work.

  • @mramzanshahidkhan3917
    @mramzanshahidkhan3917 8 лет назад

    I am not getting my project name when Clicks on the Android Device Manager............Please help me to solve this and my database in Firafox is allso not connecting............

  • @jfrancoginn6923
    @jfrancoginn6923 8 лет назад

    THIS IS SO AWESOME ! THANKS FOR THIS!

  • @prashantsawarwadkar5127
    @prashantsawarwadkar5127 6 лет назад

    if suppose I created the table and write its respective code in main method then where should i find the created table details. please help with this. reply as early as possible. thankq in advance

  • @GiLoVaZz
    @GiLoVaZz 7 лет назад

    Did you do anything in 5:48 because i see more classes than the 3 u had previously?? I have the problem in which wheni search in the DDMS i click on data>data> (and all i see are com or con files and i cant even open them.... any halp?

  • @Jin-ec1vc
    @Jin-ec1vc 8 лет назад

    Thank you very much for this perfect video!

  • @AmitVerma-iq3oe
    @AmitVerma-iq3oe 8 лет назад

    I have write the same code but when going android device monitor data is not going open, what should I do, Sir @ProgrammingKnowledge please guide for this issue because some people I also facing this problem so please reply!!!

  • @mrensayne
    @mrensayne 7 лет назад +1

    The Data Folder wouldn't open for me either. I wouldn't recommend watching this and expecting a working end product.

  • @tusharbhardwaj6067
    @tusharbhardwaj6067 4 года назад +1

    How to extract student table from device file explorer?

  • @faseehullah3411
    @faseehullah3411 8 лет назад

    I try more time also my code is the exact copy of video code but the data cannot inserted whats the problem.please reply as soon as possible

  • @sharminkhalid7328
    @sharminkhalid7328 4 года назад

    this video is very helpful but when I run at my android 3.5 got some issues

  • @ナンダルケジー
    @ナンダルケジー 4 года назад

    i had errors with " SQLiteDatabase db = this.getWritableDatabase(); " i'm using real phone.. is there something wrong with your code upon creating db in file manager?

  • @mutharasant6454
    @mutharasant6454 7 лет назад

    My app stopped suddenly showing "fatal exception" in android monitor and I checked whether the table is created. And the table is also not created.

  • @adroitpersonn2356
    @adroitpersonn2356 7 лет назад

    I am not getting any error while running the app. but I cant see the database. in android monitor. Following is my code.
    public class DatabaseHelper extends SQLiteOpenHelper {
    public static final String Database_Name = "Student.db";
    public static final String Table_Name ="student_table";
    public static final String Col_1="ID";
    public static final String Col_2="Name";
    public static final String Col_3="Surname";
    public static final String Col_4="Marks";
    public DatabaseHelper(Context context) {
    super(context, Database_Name, null, 1);
    }
    @Override
    public void onCreate(SQLiteDatabase sqLiteDatabase) {
    sqLiteDatabase.execSQL("create table "+ Table_Name +"ID INTEGER PRIMARY KEY AUTOINCREMENT, NAME TEXT, SURNAME TEXT, MARKS INTEGER");
    SQLiteDatabase db = this.getWritableDatabase();
    }
    @Override
    public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {
    sqLiteDatabase.execSQL("DROP TABLE IF EXISTS "+ Table_Name);
    onCreate(sqLiteDatabase);
    }
    }
    Main Activity.
    public class MainActivity extends AppCompatActivity {
    DatabaseHelper db;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    db = new DatabaseHelper(this);
    }
    }

  • @akhilyeluri735
    @akhilyeluri735 7 лет назад

    what is the use of drop table query in onUpgrade method?? i mean what does it exacly do??.

  • @gigamgamboa828
    @gigamgamboa828 8 лет назад +3

    in android device monitor file explorer data/data it only show a lot of "cons" folder. there is no package name. how to solve this please. thank you

    • @PrashantYadavSkywalker
      @PrashantYadavSkywalker 8 лет назад

      +Gigam Gamboa yeah same problem, did u find any solution

    • @NelvinGP3001
      @NelvinGP3001 8 лет назад +1

      I got the same problem here. Anyone have the solution now? Please help

    • @vatsalshah8389
      @vatsalshah8389 7 лет назад +1

      i got the same problem

  • @previnkumar1477
    @previnkumar1477 6 лет назад

    Hi, I'm using a latest version of firefox. Its saying that sqlite manager has been removed in a previous release. Its suggesting a way to download another version of firefox. Is there any other way to have sqlite manager easily?

  • @rachitmalik3075
    @rachitmalik3075 7 лет назад

    Hello Sir,
    i am typing a same code in our program but not connect to data base . the error is show Unfortunately, xyz has stopped.
    please tell me how to solve this error .

  • @lakshancosta
    @lakshancosta 5 лет назад

    device monitor is not shown in the updated android studio. please help!! new 2019 November update

  • @alextejada350
    @alextejada350 7 лет назад

    I run the code and works but how can see if database exists in real device? I searched the app folder and I didn't see nothing.

  • @shirleyshah2029
    @shirleyshah2029 4 года назад

    I couldn't find the db file in the Device File Explorer. When I opened the database folder, it showed that there was nothing there

  • @gaongake9146
    @gaongake9146 6 лет назад

    HI GUYS I CANT SEEM TO FIND THE ANDROID OPTION for device monito ON THE TOOL DROP DOWN BOX...ANY IDEA i am using android studio 3.1.1 version

  • @Layklant
    @Layklant 7 лет назад

    Well explained, thank you!

  • @mothernature8172
    @mothernature8172 5 лет назад

    Can i ask a question about other things? but still about android studio

  • @svb9527
    @svb9527 8 лет назад +1

    My File Explorer shows no files at all - any ideas on how to solve this issue :S ? By the way: Great tutorial (!)

    • @ts404
      @ts404 8 лет назад +1

      Run emulator with an API of 23.

    • @adityareddy4716
      @adityareddy4716 7 лет назад

      Mine too,did you find a solution after 4 months?

  • @koushikpg007
    @koushikpg007 4 года назад

    by the way if the app is crashing make sure you have space after table like this "create table "+ TABLE_NAME

  • @domelque
    @domelque 9 лет назад

    I'm doing it step by step, but when I want to star app on emu then shows " App has stopped" ;/ Where I do wrong ?

  • @farhat347
    @farhat347 9 лет назад

    hello ProgrammingKnowledge by using your database code is there a way to create multiple table using a the same Database

  • @althafrahman262
    @althafrahman262 6 лет назад

    Sir,
    im fed up with a problem that the app will crash when i include the command SQLiteDatabase db = this.getWritableDatabase(); on the constructor.
    give me the solution for that. im using android studio 2.3.3

  • @zohaib2595
    @zohaib2595 8 лет назад

    Sir pls can you tell me what this "Unexpected error while parsing input:Invalid ui automator heirarcy file" error mean is? i am creating database in android studio but A stdio is showing this messege. All of my coding is same to your code but i dont know why it show this error messege.

  • @angelicamarie5190
    @angelicamarie5190 7 лет назад

    hI, my android device monitor keeps throwing me an error. is there any possible way to view my database? btw im not using emulator, i directly connect my phone to debug. TIA

  • @adrianaisaila8408
    @adrianaisaila8408 9 лет назад

    my andoroid divice monitor doesn't show me any divices. what should i do? thank you in advance!

  • @ShubhadipBhowmickMohak4U
    @ShubhadipBhowmickMohak4U 6 лет назад

    I am using bluestacks as an emulator, where can I find the database and the table???
    Thanks

  • @vincentcalzado7512
    @vincentcalzado7512 7 лет назад

    Hi there guys :D I've done reading comments regarding with your problems, and i conclude that there is 2 major problem that most of you are facing right now :
    Problem #1 : The app cant open and keeps closing.
    Problem #2 : The data folder can't be open.
    Okay I'm not here to be a hero or so what.. I'm here just to share what I've learned.. I'm not good with this language and yeah me too also takes so much hard time to solve these problems.
    Okay here's the solutions :
    1. Repair the public void onCreate(SQLiteDatabase db) in DatabaseHelper.java class :
    Here's the code :
    public void onCreate(SQLiteDatabase db) {
    String SQL_String = "CREATE TABLE " + TABLE_NAME + "(" + COL_1 + " INTEGER PRIMARY KEY AUTOINCREMENT," + COL_2 + " TEXT," + COL_3 + " TEXT," + CoL_4 +"INTEGER"+ ")";
    db.execSQL(SQL_String);
    }
    Credits to +MickyM
    2. Try to run the Android Studio in Administrator and if the device you're using to run the app is a real Android Device (not Virtual or Emulator) you must root your device first and if you're using an emulator you must run the "Android Device Monitor" in 23 API (or Lower APIs), APIs above 23 can cause problems when deploying Android Device Monitor. (I recommend the API 22 or the Lollipop version of Android OS).
    You can see it here : stackoverflow.com/questions/34603355/android-device-monitor-data-folder-is-empty
    Credits to +Scott Chow

  • @mohammedkastali7096
    @mohammedkastali7096 4 года назад

    i have same problems here
    db.execSQL("create table" +TABLE_NAME+"(id INTEGER PRIMARY KeY AUTOINCREMENT, name TEXT,surname TEXT,marks INTEGER );
    }
    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
    db.execSQL("DROP TABLE IF EXISTS"+TABLE_NAME);
    OnCreate(db);

  • @rishabhasthana6842
    @rishabhasthana6842 7 лет назад

    hello Sir
    after opening file explorer followed by data folder I am not able to open further folders after first data folder
    please help

  • @Lexacakes
    @Lexacakes 8 лет назад +5

    I did the TOOL > Android > Android Device Monitor then i didn't see my app name, help please Programming Knowledge

    • @ts404
      @ts404 8 лет назад +3

      You need to have your emulator running with your app in order to see it show up in the ADM. Also, in order to view the individual files you should be running with an API of 23.

    • @NagaVenkateshgavini
      @NagaVenkateshgavini 8 лет назад +2

      Run the application in emulator first, then you can go to the monitor,

    • @TMNTurtleNL
      @TMNTurtleNL 7 лет назад +2

      My application keeps stopping automatically.. Any suggestions?

    • @rajurajesh8690
      @rajurajesh8690 7 лет назад +3

      i too facing same issue.. if your problm solved.. kindly share it.

    • @logancarvalho
      @logancarvalho 7 лет назад +1

      have you found something?

  • @thandeka9110
    @thandeka9110 8 лет назад

    thanks for grt tutorials. How do i add date picker (DOB) column and radio buttons (Gender) column in Android SQLite database?

    • @LyssusX
      @LyssusX 8 лет назад

      You can add more columns in the DatabaseHelper class

    • @thandeka9110
      @thandeka9110 8 лет назад

      Thanks for your reply, it much appreciated, however i would like your help. I m creating a College Project which includes databases and im struggling on few things like adding Gender column. May i please send you my code and edit for me where and how radio buttons should go.

    • @LyssusX
      @LyssusX 8 лет назад

      Literally just add another column in the DatabaseHelper class

    • @thandeka9110
      @thandeka9110 8 лет назад

      My struggle is only on Add and Create method. Please post me an example. From here i will be alright Thanks.

    • @LyssusX
      @LyssusX 8 лет назад

      0:00 add your extra column
      3:56 include your extra column in create
      when you add to your db, just include your extra column with everything else
      what you're looking for is exactly what ProgrammingKnowledge is showing you step by step. if you're still confused, just watch the videos again

  • @nn-he5cg
    @nn-he5cg 7 лет назад

    спасибо за видео! но включи субтитры, пожалуйста !
    Thank you for the video! but turn on the subtitles, please

  • @mehvishshaikh7902
    @mehvishshaikh7902 7 лет назад

    My File Explorer shows no files at all - any ideas on how to solve this issue even wen im using API 24
    .Plz rply asap

  • @AryanvedhFromIndia
    @AryanvedhFromIndia 7 лет назад

    Hi, I am trying to use it in fragment class. (not in main activity) and i am able to connect my fragment class to database class with this method that you just showed "myDB = new StudentsDatabase(this);"
    what do i need to do in order to connect my database class to fragment class? anyone? any help?