Android Question [SOLVED] application instantly stop

makis_best

Well-Known Member
Licensed User
Longtime User
When I run my application instantly stop with this error.

 

DonManfred

Expert
Licensed User
Longtime User
When I run my application instantly stop with this error.
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
 
Upvote 0

makis_best

Well-Known Member
Licensed User
Longtime User
I figure what you mean but I don't know about java...
But in the file starter.java:5213 is this code

B4X:
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 "";
}
 
Upvote 0

makis_best

Well-Known Member
Licensed User
Longtime User
The <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> solve the problem.

Thank you all.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…