[Q] Stack over flow error in Android - General Questions and Answers

Hi All,
In calculator application while doing some monkey testing I got this force close.
Can any one tell me what is the problem and what is the solution for this...

Most likely a programmer error and there is nothing you can really do without having the source code, changing the code piece causing it and recompiling the file.

If you could print some piece of code and, more, the error log, we could help you.

Related

Ril and smartphone

Hi,
I follow every comment present in this form about using ril.dll for accessing cellID and so on.
I still have a problem with RIL. All compilation process work well but when I start my application on Phone (MPX220) an error responce occurs...
Thanks
Hi,
what error exactly?
error: 80004005
Using the code present in itsutils from xda-developpers.com after calling RIL_Initialize....
Hi,
Unfortunately, 80004005 is defined as 'Unspecified error' (E_FAIL), which doesn't help much. However, given that you are using a Smartphone, the probable cause is that you are using a Priviledged function. Smartphones require applications to be signed in order to use priviledged functions.
For further information about this, see here.
Thanks!! now it seem works even though some other error code 80004001 or 80070057...
Hi,
Error 800004001 is 'Not implemented error' (E_NOTIMPL) which means that a function you are trying to use is not supported by the service provider.
Error 80070057 is 'One or more arguments are not valid error' (E_INVALIDARG) which means that either an argument you are providing to a function is incorrect, or that you have not specified the valid argument specifiers (dwParams) required by some structures used in some functions.
A good place to look for what errors mean is here
thanks a lot...
One more question:
- How can I get the information that Ril_CellTowerInfo should be able to provide?
on my phone exist one process "tstutil" that is the engineering mode menu...

SQL CE 3.5 - First App

I'm working on developing my first WM 6 App using SQL CE 3.5 . I'm sure there are other apps out there that do what mine does, but I'm just wanting the experience of developing it.
I'm working on a fairly simple app to track gas mileage and such. But, for some reason, whenever I debug it, the app can't seem to find the database file. I get an error saying: "The database file cannot be found. Check the path to the database. [ Data Source = .\GasTrackerDB.sdf ]"
I can browse with file explorer on the device and find the database in the same directory as the deployed application, so I'm not really sure where to go from here..
I'm doing everything through the IDE, so all of the code is generated for me to connect to the database.
Anybody experienced enough to help me troubleshoot this stupid problem?
i have been looking for an app that does the same thing as the one you are working on.
when it is finished please pm me. i wish i knew more programing, if i did i would help you.
Try
Code:
string database = string.Format(@"{0}\GasTrackerDB.sdf", GetApplicationPath());
public static string GetApplicationPath()
{
string path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
return path;
}
I did figure it out after messing around with it. I think it has to do with the way VS2008 deploys the app on the emulator...
When I hard-code the path to the database file, it works. So, my app will just have to be installed on the local device and not the SD card
Don't hard-code the path! The method GetApplicationPath() returns the application path. This is also important when installing on OS with different language.
heliosdev said:
Don't hard-code the path! The method GetApplicationPath() returns the application path. This is also important when installing on OS with different language.
Click to expand...
Click to collapse
How is that possible when the Connection String was generated by the IDE? Here's what the .xsd says:
Code:
<Connection ConnectionStringObject="Data Source=\program files\gastracker\GasTrackerDB.sdf" IsAppSettingsProperty="false" Modifier="Assembly" Name="GasTrackerDBConnectionString" ParameterPrefix="@" Provider="Microsoft.SqlServerCe.Client.3.5" />
On application start create the connection string "Data Source = " + database (like post #3)
This connection string can then be passed wherever you need to connect to the database.
That's the problem.. the IDE created all the stuff for the connection string and I don't know enough about it to create everything needed manually.
How do you connect to the db? What are you calling for retrieving data from db? How do you insert data to the db? All these actions need an object which somehow knows the connectionstring. And this string can/must be changed.
Hmm.. That doesn't seem to be a valid function name. I'm using .NET CF 3.5 .I'll keep looking.
Well, I wrote my own function to get the execution path, but I still can't figure out how to modify the connection string at runtime.
This crap is ridiculous. I don't understand why it doesn't "just work" when I let the IDE do everything...
Well, I FINALLY made it work.. i ended up going through the xsd file and changing all the code that creates queries. I had to replace every instance of:
Code:
CType(Me._commandCollection(0), Global.System.Data.SqlServerCe.SqlCeCommand).Connection = New Global.System.Data.SqlServerCe.SqlCeConnection("Data Source=.\GasTrackerDB.sdf;")
With:
Code:
CType(Me._commandCollection(0), Global.System.Data.SqlServerCe.SqlCeCommand).Connection = New Global.System.Data.SqlServerCe.SqlCeConnection("Data Source=" & GetAppPath() & "\GasTrackerDB.sdf;")
That had to be done for every one of my queries created through the designer. Thankfully I only had 5!
Great! Keep in mind that changes in generated code can get lost when the ide is recreating the code. Just keep an eye on it when doing changes in this area!
heliosdev said:
Great! Keep in mind that changes in generated code can get lost when the ide is recreating the code. Just keep an eye on it when doing changes in this area!
Click to expand...
Click to collapse
Yeah, I already ran into that one If it gets to be too much of a pain, I'll see if I can create some sort of compile time script to do a find and replace.. But I haven't spent enough time going back and fixing it yet
go to
http://www.connectionstrings.com/
They have everything you need to build your connection string. From my experience, it's okay to let the IDE build everything EXCEPT the connection string....

[Q] some question about Heathcliff74 's native code tutorial

i believe many people have read the tutorial about developing homebrew apps by Heathcliff74.But did every sussess in doing that. In fact,i failed.
i failed in this step in his article.
INative MyNativeCodeInstance = (INative)new CNative();
however,the return value of the Microsoft.Phone.InteropServices.ComBridge.RegisterComDll if 0 whicn means it success.but when his code running here the app will exits at once even i use try{}catch{}.
soem info of my device:HTC schubert t9292
OS:winphone 7.5
does anyone have the same probelm with me?
@Heathcliff74
how do you think why somebody failed when following these steps.now ,i think it may caused by my device.
If instantiating the COM object is causing a crash, the most likely problem is a bug in your object's definition. I assume you have the WPInteropManifest and all? In that case, it's almost certainly a problem in your native code.
However, without seeing your code, I can't tell you what the problem is.

[Q] Unknown library libverde.so

Hi,
I'm trying to work through a hardware detection problem running an app (Osmos, purchased in the Humble bundle for Android). It seems that maybe there's something weird about how my Chinese tablet reports its multitouch or something, I figured I'd just hack the apk to remove the multitouch check and be done with it.
The problem is that the error string isn't in the application itself, it's part of a support library and occurs during initialisation, there's no obvious call to the library to ask for multitouch though I'm sure something flags it as required somewhere along the line but probably in one of a couple of parameter values that are long, undocumented integers.
The support library is called libverde.so and appears in the apk's lib directory when decompiled (apktool, dex2jar, JD are the tools I'm using). There's almost no information about it on the net, only a reference on a pirate site about patching it to remove a check for screen size (similar to what I want to do).
Has anyone heard of this library? Can provide any information on it?
bp.

[Q] Conversion to Dalvik format failed with error 1 - Tried many solutions

Okay I know there are a bunch of these topics out there, but I have tried just about everything I could find and still I cannot get it to work. I have worked with my project for about 6 months with no errors, I stopped for 3 months and got back into it on a new computer and now it keeps giving me this error when trying to export a signed APK. I have tried the following:
Turning off Build Automatically (and cleaning the project many many times)
Tried Android Tools fix project settings
Changing the proguard.bat to include %1 %2 %3 etc
Removing the libraries from the Java Build Path > Libraries
Uninstalling Eclipse and Reinstalling the new version
Using the new Android ADT Studio
Removing the SDK's and downloading all the new SDK's
I am getting very frustrated and 7500 lines of code in, I dont feel like just starting over. Any suggestions on what steps i should take next?
This is the console error I am receiving:
Code:
[2014-11-08 17:48:57 - ZombieBird-android] Dx
trouble processing "java/io/BufferedInputStream.class":
Ill-advised or mistaken usage of a core class (java.* or javax.*)
when not building a core library.
This is often due to inadvertently including a core library file
in your application's project, when using an IDE (such as
Eclipse). If you are sure you're not intentionally defining a
core class, then this is the most likely explanation of what's
going on.
However, you might actually be trying to define a class in a core
namespace, the source of which you may have taken, for example,
from a non-Android virtual machine project. This will most
assuredly not work. At a minimum, it jeopardizes the
compatibility of your app with future versions of the platform.
It is also often of questionable legality.
If you really intend to build a core library -- which is only
appropriate as part of creating a full virtual machine
distribution, as opposed to compiling an application -- then use
the "--core-library" option to suppress this error message.
If you go ahead and use "--core-library" but are in fact
building an application, then be forewarned that your application
will still fail to build or run, at some point. Please be
prepared for angry customers who find, for example, that your
application ceases to function once they upgrade their operating
system. You will be to blame for this problem.
If you are legitimately using some code that happens to be in a
core package, then the easiest safe alternative you have is to
repackage that code. That is, move the classes in question into
your own package namespace. This means that they will never be in
conflict with core system classes. JarJar is a tool that may help
you in this endeavor. If you find that you cannot do this, then
that is an indication that the path you are on will ultimately
lead to pain, suffering, grief, and lamentation.
[2014-11-08 17:48:57 - ZombieBird-android] Dx 1 error; aborting
[2014-11-08 17:48:57 - ZombieBird-android] Conversion to Dalvik format failed with error 1
bump -> still trying to figure this out, and help would really be appreciated as I cannot really continue any further with my project.
Thank you!
Can someone please help? I'd really appreciate it....

Categories

Resources