Android Question [SOLVED] application instantly stop

Discussion in 'Android Questions' started by makis_best, Jul 27, 2019.

  1. makis_best

    makis_best Active Member Licensed User

    When I run my application instantly stop with this error.

     
  2. DonManfred

    DonManfred Expert Licensed User

    Do you think it is a good practise not to show us the relevant code you are using?

    Start looking at the generated java code from this version to find the b4a line which is raising the error.
    - starter.java:5213 <- line
    - createsqltable.java:34
     
  3. makis_best

    makis_best Active Member Licensed User

    I don't understand what you try to tell me...
    I am not a pro programmer you know...
     
  4. makis_best

    makis_best Active Member Licensed User

    I figure what you mean but I don't know about java...
    But in the file starter.java:5213 is this code

    Code:
    public static String  _service_create() throws Exception{
     //BA.debugLineNum = 
    22;BA.debugLine="Sub Service_Create";
     //BA.debugLineNum = 
    30;BA.debugLine="If File.ExternalWritable = False Then";
    if (anywheresoftware.b4a.keywords.Common.File.getExternalWritable()==anywheresoftware.b4a.keywords.Common.False) {
     //BA.debugLineNum = 
    31;BA.debugLine="Msgbox(\"Cannot write on storage card.\", \"Warning";
    anywheresoftware.b4a.keywords.Common.Msgbox(BA.ObjectToCharSequence("Cannot write on storage card."),BA.ObjectToCharSequence("Warning"),processBA);
     //BA.debugLineNum = 
    32;BA.debugLine="ExitApplication";
    anywheresoftware.b4a.keywords.Common.ExitApplication();
     
    };
     //BA.debugLineNum = 36;BA.debugLine="If File.IsDirectory(File.DirRootExternal,\"DroidVi";
    if (anywheresoftware.b4a.keywords.Common.File.IsDirectory(anywheresoftware.b4a.keywords.Common.File.getDirRootExternal(),"DroidViewDB")==anywheresoftware.b4a.keywords.Common.False) {
     //BA.debugLineNum = 37;BA.debugLine="File.MakeDir(File.DirRootExternal, \"DroidViewDB\"";
    anywheresoftware.b4a.keywords.Common.File.MakeDir(anywheresoftware.b4a.keywords.Common.File.getDirRootExternal(),"DroidViewDB");
     };
     //BA.debugLineNum = 41;BA.debugLine="If File.Exists(File.DirRootExternal & \"/DroidView";
    if (anywheresoftware.b4a.keywords.Common.File.Exists(anywheresoftware.b4a.keywords.Common.File.getDirRootExternal()+"/DroidViewDB/","DVDatabase.db")==anywheresoftware.b4a.keywords.Common.False) {
     //BA.debugLineNum = 42;BA.debugLine="Log(File.DirRootExternal & \"/DroidViewDB/\")";
    anywheresoftware.b4a.keywords.Common.LogImpl("0393236",anywheresoftware.b4a.keywords.Common.File.getDirRootExternal()+"/DroidViewDB/",0);
     //BA.debugLineNum = 44;BA.debugLine="CreateSqlTable.CreateTablesInDatabase";
    mostCurrent._vvvvv2._v0(processBA);   <<----  5213 line
     };
     //BA.debugLineNum = 46;BA.debugLine="DisableStrictMode";
    _vvv2();
     //BA.debugLineNum = 47;BA.debugLine="End Sub";
    return "";
    }
     
  5. makis_best

    makis_best Active Member Licensed User

    The <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> solve the problem.

    Thank you all.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice