Android : App Crashes - Can't Find A Java Method Despite - No Compiler Error
Aug 20, 2010
My Android app runs fine, but: If I insert a call to WebView.setScrollbarFadingEnabled, it crashes saying:
Could not find method android.webkit.WebView.setScrollbarFadingEnabled, referenced from [my class]
VFY: unable to resolve virtual method 289: Landroid/webkit/WebView;.setScrollbarFadingEnabled (Z)V
I am using Android 1.5, not a custom ROM. My app defines minSdkVersion="3" I always clean before compiling.
Is setScrollbarFadingEnabled unavailable in Android 1.5? If so, why don't I receive a compiler error?
View 1 Replies
May 7, 2010
It is clear that cross compilers will not be allowed by the Apple App Store, so a developer will need to be familiar with Objective-C to create applications for the iPhone.I was wondering, is there a cross compiler that will take Objective-C application code and rebuild it into a similar Java application that can be packaged for Android? That way, a developer could still learn just one language (obj-c) but put out applications on many devices.I understand that the Java port would be less optimal than a natively coded application, but could conceivably save a developer some time.
View 4 Replies
View Related
Sep 22, 2010
am getting this error: cannot find symbol symbol: method log(java.lang.String) when using method : log("some test", +test);
I have imported import android.text.TextUtils; import android.util.Log;
Still its throwing same error why it is so ?
View 8 Replies
View Related
Aug 9, 2010
Currently I am trying to compile native code for Android. The code is from the OpenCV port for Android. I pasted all the code correctly in my project and edited my make files accordingly. When I set android:debuggable to false everything works fine and I get my native library. When I try while android:debuggable is set to true I get an error.
Here is a part of the log:
CODE:....................
From what I have found on the internet this is caused by the optimization level of the compilation. As long as the code isn't compiled so that is is debuggable afterwards everything should be fine.
Now apparently it is possible to avoid this by setting APP-OPTIM := release in the Application.mk or adding -O2 to LOCAL_CFLAGS. I have tried both and still I get this error.
Right now I don't really care that much about debugging my native code, but I would like to have basic debugging enabled. And I don't want to keep switching android:debuggable in my manifest every time I want to compile. I'm not even sure if it is okay at all if I just set android:debuggable to false pre compiling and to true post compiling, but I am sure I will forget it every second run.
View 1 Replies
View Related
Jul 22, 2010
I'm trying to build android system ; enviroment: ubuntu 10.04, gcc-4.4 jdk 1.6-0-20
get source code follows http://source.android.com/source/download.html
$ . build/envsetup.sh
$ choosecombo
$ make
then compiler error occurs:
CODE:........
In line 554: the code below:
CODE:...........
View 2 Replies
View Related
Jul 15, 2009
I've run into the following issue:
Say I have an Animal class, which is parcelable, and I have a Dog class and a Cat class, which are subclasses of Animal and also implement Parcelable.
Say I have a service with the following AIDL interface:
sendAnimals(List<Animal> animals);
Now I'm calling this remote interface from some client application, passing it a List containing Cats and Dogs. What happens now is that android calls the Cat's and the Dog's writeToParcel() methods at the client side, but at the server side, the Animal's CREATOR is used, which calls Animal's readFromParcel() method. So the right data is sent from the client, but the wrong unmarshalling code is executed at the server.
I have tried to put this in the AIDL file:
sendAnimals(List<T extends Animal> animals);
This results in a syntax error from the aidl compiler though.
My current workaround is as follows: - In each specific Animal subtype's writeToParcel() method, I write the class name as a String into the Parcel as the first element. - In the Animal's CREATOR.createFromParcel() I read the first String out of the parcel, and based on that I create the appropriate type and call the appropriate readFromParcel() method.
I think this is kind of ugly though. I would expect the android framework to take care of this for me.
(My application is not actually dealing with animals, this is just to make it simpler to explain the issue)
View 7 Replies
View Related
Mar 16, 2009
I'm trying to call a java method from javascript using addJavascriptInterface(); but seems does not work, it always display "failure"; java code...
View 2 Replies
View Related
Feb 11, 2009
I'm having some problems porting a Java application to work in Android platform. I detected an incompatibility problem between java sun and Adroid sdk in java.lang.Class. I oberved that: public Field[] getFields() Returns an array containing Field objects describing all fields which are defined. That's array is sorted as attributes are declared in the main Class in sun jdk. For example, next Class is defined as: public class Example { public boolean stop; public int atr1; public String name; ....
}
View 5 Replies
View Related
Nov 25, 2009
I'm experiencing crashes that don't produce a "force close" message. Instead, the app exits immediately without an error message. In the log, it seems the problem is inside the framework's libraries but I don't really know how to interpret it.
Here it is:
CODE:.............................
View 3 Replies
View Related
Oct 26, 2010
I am new at android development and java programming, but I have decided to program a drinking game app in android. This app basically simulates a deck a cards, a player clicks a button to draw a card then based on the card thats drawn the player plays a drinking game (ie takes 1 drink, takes 2 drinks ect).
I have the main program in one java file, and the code that shuffles the card deck and puts the card sequence in an array in other java file. My problem is that whenever a class from the other java file (classicMode.java) is called from the main program (fubar.java), my android program crashes and gives the error : "The application Drinking Game - FUBAR (process com.games.dg) has stopped unexpectedly. Please try again". Code...
View 1 Replies
View Related
Aug 28, 2010
the title say it all. I wanna know a corresponding method in Android/Java that is like the GetTickCount method in C#/C++?
View 1 Replies
View Related
Aug 18, 2010
I am testing my application on an LG Eve phone. I have an application that tries to download something from the web, and when it throws an exception, it is supposed to launch an alertdialog saying that there was an error. When the phone has no wifi signal, the program crashes at builder.create() (see code below). However, when there is wifi signal, and the exception is thrown by something else (for instance, a typo in the url), the dialog launches the way it's supposed to. Any clue as to why this could be?
Code for onCreateDialog:
@Override
protected Dialog onCreateDialog(int id){
Dialog d = null;
switch (id){...............
View 1 Replies
View Related
Feb 27, 2010
I have two android projects, ProjA requires ProjB (in Eclipse Properties > Java Build Path > Projects > Add > ProjB). Every thing compiles ok in Eclipse, but when I run ProjA I get an error: Could not find method XXX, referenced from method YYY. Where XXX - is the method from ProjB. How can I fix the settings?
View 3 Replies
View Related
Dec 7, 2009
I want to use a map in my application but I can't get it to run.
It always crashes with the following error:
CODE:.....
My XML file:
CODE:...................
My layout:
CODE:...............
In my code I add the map like this:
CODE:.............
View 5 Replies
View Related
Sep 15, 2010
Why should a static method in java accept only final or non final variables within its method, but not static?
For example I have the following method:
CODE:.................
View 6 Replies
View Related
Jun 19, 2010
In Android, is there a similar method to the repaint() in java?
View 1 Replies
View Related
Dec 22, 2009
In my Android app, I need to call a non static java method from C/C++. But i get a blunt crash when i do it using GetMethodID/CallVoidMethod()1 methods.
I have done like this:
1. Register the method using GetMethodID() as follows (mine is a cpp file): jmethodID xyz = (env)->GetMethodID( cls, "showxyz", "()V");
2. And I call this method as follows: env->CallVoidMethod(cls, xyz);
3. In java, my showxyz() is defined this way(this basically enables a button which was disabled) void showxyz() {findViewById(R.id.btnPass).setEnabled(true);}
And this crashes.
But I have been using this method of calling Java funcs from C using a set of GetStaticMethodID/CallStaticVoidMethod()(for nonstatic methods) and that works always.
But in this case, I have to call a non-static method and i get a crash.
View 2 Replies
View Related
Nov 19, 2010
VitaminTable.java:
CODE:.....
manifest file:
CODE:...........
main.xml:
CODE:...
I get the following error:
CODE:.......................
View 3 Replies
View Related
Oct 30, 2009
I have following problem: I have my "MainActivity". In this Activity, i start a thread (SaxParser in another "normal" java file). Now I want to call a method from the MainActivity out of the normal java file? I have read something of an Application object, but i only find things, where i have to create a new Intent. Is it possible to use the application object in the other "normal" java file like that: Code...
View 5 Replies
View Related
Oct 15, 2009
JNI problem : from c Languege call Java. i think from c Language call Java, but that CallIntMethod() return value is not equals getIpv6() -> 99, CallIntMethod() its always return strange value is [-1091242504] or [11212] . additional i already solve [Method not found: Code...
View 3 Replies
View Related
Sep 29, 2010
I thought when you passed objects to methods in Java, they were supposed to be by value.
public class MyClass{
int mRows;
int mCols;
Tile mTiles[][]; //Custom class
//Constructor
public MyClass(Tile[][] tiles, int rows, int cols) {..........
At this point, any changes to the mTiles object are reflected back to the tiles object.
View 3 Replies
View Related
Jul 20, 2010
I have some java code that I want to share with some classmates however I do not want to share the source with them.What is the standard method to provide someone with a Java executable that they can use but they cannot see the source.Not sure if this is relevant but the code that I will be giving them will be run on android.
View 3 Replies
View Related
Sep 15, 2010
I am having a static method .In the method when I decalare a variable , it was showing an error in eclipse saying that the variable should be decalared as final.
Can I know the reason for this , y should a variable in a static method be declared as final? I am writng an Android application where I should pass as an argument current Context of that application. So, when I pass the current context to the method and trying to copy it in a local variable , I am getting this error saying that the variable should be declared as final.
My method is like this:
CODE:.............
Error is showing at line where Context myctx=ctx; is declared and asking me to declare it as final.
View 4 Replies
View Related
May 31, 2010
I would like to know if is there a way to call android:layout_gravity property from a java method. I didn't found any method in Android documentation to do it. This is the picture of the layout I want to implement: But in my situation, I need to do it through Java code, because I'll implement another layout views dinamically. To avoid merging xml layout with Java code, I would prefer make all layout using Java. Code...
View 2 Replies
View Related
Mar 5, 2010
I was wondering how should I proceed to debug while working with frameworks. Like specifically how can i tell which method is being called when a particular event happens.
View 2 Replies
View Related
Mar 20, 2010
Could someone please suggest me a good/efficient way to communicate with the server. I could think of two options 1) Use http post methods to send data to a php script at the server which would later call the google api's written in another java program (jar)or use php to use google api's (if its possible) to find nearby restaurants and send the list back to client. 2) Use simple java socket programming. The server has a jar file that supports multi threading and it does the job of finding restaurants and sending the list.
View 4 Replies
View Related
May 27, 2009
I've been getting this error "Could not find method javax.microedition.io.Connector.open, referenced from method org.ksoap2.transport.ServiceConnectionMidp."
View 7 Replies
View Related
Apr 27, 2010
I know that I can get some informations from the Sim card by using the TelephonyManager class, but I couldn't find any specific method to get its country and area code, and also if the user is on roaming the area code would probably change to the location he currently is.
You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscribe@googlegroups.com For more options,
View 2 Replies
View Related
Oct 5, 2010
I wanted to use the ApiDemos in the SDK samples but I have a problem in finding the R.java file, I don't know why is it missing.
View 5 Replies
View Related
Aug 2, 2009
Do you know a library or method to serialize / deserialize Java bean to json in android?
how i can introspect a javabean and fill its fields?
View 5 Replies
View Related