Android :: Java Model Exception When Cleaning Project

Sep 30, 2009

I keep getting this error under several projects. 10 minutes ago I exported an android .apk, then changed the AndroidManifest.xml and now can't export. I reverted back to the original AndroidManifest.xml but still it doesn't work. I guess the plugin is broken. Is there a set of Ant tasks that can be used to build Android apps?

.............

Android :: Java Model Exception when cleaning project


Android :: Sqlite Exception:java.lang.Illegal Argument Exception Column Id Does Not Exist

Jul 14, 2010

I created a sql lite database with the following columns:
static final String dbName="demoDB";
static final String tableName="Employees";
static final String colID="EmployeeID";
public void onCreate(SQLiteDatabase db) {
// TODO Auto-generated method stub
db.execSQL("CREATE TABLE "+tableName+" ("+colID+" INTEGER PRIMARY KEY AUTOINCREMENT, "+
colName+" TEXT, "+colAge+" Integer);");
I want to select all the records in the database like this and display them in a gridview:SQLiteDatabase db=this.getWritableDatabase();Cursor cur= db.rawQuery("Select "+colName+", "+colAge+" from "+tableName, new String [] {});String [] from=new String []{DatabaseHelper.colName,DatabaseHelper.colAge};
int [] to=new int [] {R.id.colName,R.id.colAge};
SimpleCursorAdapter sca=new SimpleCursorAdapter(this,R.layout.gridrow,c,from,to);
GridView grid=(GridView)findViewById(R.id.grid);
grid.setAdapter(sca);but i receive the following exception:java.lang.IllegalArgumentException: column '_id' does not exist.the db table does not have a column with name '_id'so what is wrong with this code

View 3 Replies View Related

Android :: Get Project And Std Java Project To Play Nice?

Aug 11, 2010

I can now get our Android project to talk to our non-Android project. But there's still an issue: I are trying to have an Android class call a non Android Hello World class. I tried compiling our non-Android Hello World class in a separate Eclipse workspace. I then packaged it into a jar. I imported that jar into our Android Hello World class.

I then called one of the methods in the non-Android Hello World class. When I ran the Android Hello World class as an Android application, the following runtime error occurred. Here are the Android debug logs:

08-11 09:07:56.764: ERROR/AndroidRuntime(333): FATAL EXCEPTION: main
08-11 09:07:56.764: ERROR/AndroidRuntime(333): java.lang.ExceptionInInitializerError
08-11 09:07:56.764: ERROR/AndroidRuntime(333): at com.hello2.hello2.onCreate(hello2.java:27)
08-11 09:07:56.764: ERROR/AndroidRuntime(333): at android.app.Instrumentation.callActivityOnCreate(I nstrumentation.java:1047).....................

View 1 Replies View Related

Android :: R.java File From Android Library Project Not Importing Into Application Project

Aug 8, 2010

I followed the instructions here on how to create an Android library project, and use it in an Android application:

http://developer.android.com/guide/developing/eclipse-adt.html

But it is not working. I can see the library project is added to my application but I cannot reference anything in it because it won't build. The R.java file from the lib is NOT being added to my application project, so the lib project contains tons of errors, everywhere it tries to reference it's own R.java file.

I don't know if this has anything to do with it, but in the console there are messages stating that the there is "No resource identifier found for attribute 'X' in package 'Lib Package'. My library package has a a few styleable attributes defined for a custom view I made, all of which are being complained about in this console message. The library builds just fine, and I don't get those messages in the console until I hook the library to my application, so I don't know what's up with this.

View 1 Replies View Related

Android :: Visualizing Java Project

May 8, 2009

I have been tasked with porting a large Java code base to the Android platform. The project makes extensive use of AWT which isn't' supported on Android. I'm looking for a tool that lets me visualize all of the classes in the project. I'd like to be able to see all of the relationships between classes so that I can get a good idea of where to start the port.

View 3 Replies View Related

Android :: Use Java Classes In Project?

Apr 28, 2010

Since i'm still new on Android programming, I have some problems on some issues. I have a QuadTree data structure implementation in 3 seperated Java files and i would like to use this data structure in my application. But i don't know how to use this .java files in an Android project. I tried to put them in a new Android project, just for testing, but I get lots of errors. Could anyone help me about using this java classes in my Application?

View 3 Replies View Related

Android :: Java Io Exception In Streaming Media Player

Nov 5, 2009

i have a very simple test app (see below), that simply tries to play a streamed audio file below over and over. after running for about half an hour (the file itself is only like 3.5 minutes or so), I get the following error:

11-05 12:16:07.625: DEBUG/PlayerDriver(554): buffering (15) 11-05 12:16:07.635: DEBUG/PlayerDriver(554): buffering (16) 11-05 12:16:07.644: DEBUG/PlayerDriver(554): buffering (17) 11-05 12:16:07.654: DEBUG/PlayerDriver(554): buffering (18) 11-05 12:16:07.654: DEBUG/PlayerDriver(554): buffering (19) 11-05 12:16:07.724: ERROR/PlayerDriver(554): Command PLAYER_PREPARE completed with an error or info PVMFErrResource 11-05 12:16:07.724: ERROR/MediaPlayer(897): error (1, -17) 11-05 12:16:07.734: WARN/System.err(897): java.io.IOException: Prepare failed.: status=0x1 11-05 12:16:07.744: WARN/PlayerDriver(554): PVMFInfoErrorHandlingComplete 11-05 12:16:07.744: WARN/System.err(897): at android.media.MediaPlayer.prepare(Native Method) 11-05 12:16:07.744: WARN/System.err(897):at com.test.TestPlayer.onCompletion(TestPlayer.java:61) 11-05 12:16:07.754: WARN/System.err(897):.......

View 2 Replies View Related

Android :: Java Socket IO Exception - Permission Denied

Nov 2, 2010

i am trying to connect to a server on my network running a tcp listener using the following java code. I am getting am IOException - Permission Denied. It is from an android 2.2 emulator.Does anyone know why?Socket socket = new Socket("1.1.1.1", 1111);PrintWriter out = new PrintWriter( socket.getOutputStream(), true);Out.println("test");socket.close();

View 2 Replies View Related

Game :: Android Java.net.Unknown Host Exception

Jul 20, 2010

I have android code that uses a background process to routinely (e.g. hourly) connect to a content source on the web to check for updated content. As new users download the app and run it for the first time, it seems (and this is just a "seems at the moment) that in this first-run situation, because the DNS for our servers are not cached already on the device, those first series of connections fail with dreaded UnknownHostException: Host is unresolved. And of course, the application tries again later and (again, "it seems like") it is all working -- perhaps because the OS has had time to actually resolve the address. So, my question(s) are: (1) Do other Android developers see this behavior with their deployed applications as well? First time, a series of "host unresolved" issues that work themselves out later. (2) Does anyone have a better strategy for "warming up the DNS" so-to-speak so that the first real connections work? or perhaps do you just re-try with some back-off looping when you encounter this exception? I was contemplating having a separate thread that tries to fetch a small text file from our server and have it just loop until it gets it and maybe (not sure about this part) block the other outgoing network connections until it succeeds.

View 1 Replies View Related

Android :: Could Not Parse Java.lang.NumberFormat Exception

Jul 31, 2010

CODE:............

And i got the following Exception

CODE:......................

View 2 Replies View Related

Android :: Conflicting Resource Id Of Two Different Project's R.java

Oct 18, 2010

I have two different project A & B. Inside the project A I link the source from project B so activity from project A can start the activity from project B. I'm using Eclipse Galileo.The problem is, when I want to edit the value of a view in activity B, the resource id from both projects have some conflicts in it. So when I call findViewById() in activity B I got a view from the activity A instead.I've declared the activity B inside the AndroidManifest in project A. I've even tried to start the activity B as the entry point of the application but it didn't show anything at all. It's like the findViewById tried to search the view of project A only although I've specified the package name correctly.

View 1 Replies View Related

Android :: How To Generate A Java Doc For Phone Project?

Sep 24, 2010

Does someone know how to generate a javadoc for an android project? I found searching the net this info http://www.androidjavadoc.com/?p=63 , but i don't understand where can i find the file "droiddoc.mk": "All javadoc stuff is concentrated in the ROOT/build/core/droiddoc.mk".

View 3 Replies View Related

Android :: No Generated R Java File In Project

Nov 3, 2010

I am doing the Notepad tutorial, exercise 2. I started by creating a new Android project and chose Create from source to import the downloaded source files for the excercise. But now I get many errors in Eclipse, and the problem is that there is no generated R.java class. How can I solve this? The folder gen / is empty. I have errors on Notepadv2.java and in res/layout/note_edit.xml and both seems to be related to the fact that the generated R.java is missing. Here is my import statements in Notepadv2.java:

import android.R;
import android.app.ListActivity;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ListView;
import android.widget.SimpleCursorAdapter;

They are created by the Eclipse command Ctrl+Shift+O.

View 9 Replies View Related

Android :: R.java Disappears After Project Clean

Oct 9, 2010

After I added some .png files into my Project Workspace drawable folder I refreshed my drawable folders in Eclipse and the newly added files showed up. But when I tried to access those resources using R.drawable.xyzimage, xyzimage although in the folder could not be resolved. So I did a Project Clean and guess what after this clean R.java is totally gone and all my classes accessing resources using R.java is showing all sorts of error and Eclipse won't let me run the code anymore. I have backup of my source code but I want to explore if R.java can be regenerated and how?

View 6 Replies View Related

Android :: Java OpenGL ES 2.0 Bindings Project

Mar 12, 2010

i started a small project over at google code that provides you with bindings for OpenGL ES 2.0 in Java. I started just a couple of hours ago so it's not finished yet. The project includes the original GLSurfaceView plus all the helper classes from the latest Eclair build as well as a modified version of GLJNIView from the NDK samples which is now a fully functional GLSurfaceView subclass called GLSurfaceView20.

OpenGL ES 1.x and 2.0 are exclusive so you have to first check wheter GL ES 2.0 is supported. You can check this via the following method:

private boolean checkGL20Support( Context context ) { EGL10 egl = (EGL10) EGLContext.getEGL(); EGLDisplay display = egl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);

int[] version = new int[2]; egl.eglInitialize(display, version);...................

View 6 Replies View Related

Android :: HttpPost Not Works In Java Project

Nov 19, 2010

I've written some code for my Android device to login to a web site over https and parse some data out of the resulting pages. An HttpGet happens first to get some info needed for login, then an HttpPost to do the actual login process. The code below works great in a Java project within Eclipse which has the following Jar files on the build path: httpcore-4.1-beta2.jar, httpclient-4.1-alpha2.jar, httpmime-4.1-alpha2.jar, commons-logging-1.1.1.jar.

public static MyBean gatherData(String username, String password) {
MyBean myBean = new MyBean();
try {
HttpResponse response = doHttpGet(URL_PAGE_LOGIN, null, null);
System.out.println("Got login page");
String content = EntityUtils.toString(response.getEntity());
String token = ContentParser.getToken(content);
String cookie = getCookie(response);.......................

View 2 Replies View Related

Android :: How To Handle Throws Clause In Java Exception Handling

Sep 4, 2010

I have class A in which I have a method openfileConnec().

It was written like the below:

CODE:...............

Now I come to class B where I will call this method like the below:

CODE:.............

I was asked a question in an interview as follows:

Why does the method have a throws Exception in its declaration? Is it that on of the methods called in the implementation throws the base class exception? Also If we get a exception during calling the method (fileConnect( )) control goes to catch block. After executing catch where should the control go, what should be sent to base case?

View 2 Replies View Related

Android :: Including Prebuilt Java Classes Into Project

May 3, 2010

i'm trying to include a maven java project into my android project. the maven project is the greader-unofficial project which allows developers access to google reader accounts, and handles all of the http transactions and URI/URL building, making grabbing feeds and items from google reader transparent to the developer. the project is available here:

the code is originally written for the standard jdk and uses classes from java.net that are not a part of the standard Android SDK. i actually tried to manually resolve all dependencies and ran into a problem when i got as far as including com.sun.syndication pieces required by the class be.lechtitseb.google.reader.api.util.AtomUtil.java... some of the classes in java.net that are in the standard jdk (i'm using 1.6) are not in the Android SDK. in addition, resolving all of these dependencies manually is just ridiculous when i'm compiling a maven project that should be pretty simple.

however, i can use maven to compile the sources with no issue. how can i include this maven project, which is dependent on the complete jdk, into my android project in such a way that it will compile so that i can access the GoogleReader class from my android project? and for the record, i don't have the expertise to rewrite this entire api to work with the standard Android SDK.

View 2 Replies View Related

Android :: Amazon Web Services Java SDK Jar In Project In Eclipse

Sep 28, 2010

I'm trying to use the Amazon Web Services Java SDK jar in an Android project in Eclipse, but it has references to org.apache.commons.httpclient. All I seem to have in my Android SDK (2.2) is org.apache.commons.http.client, which is a different namespace and obviously causes the build to fail.

I'm new to Java, Eclipse, and Android dev... is there a way to "map" one name space to the other or create some sort of symbolic link? If not, does that mean I have to import a "standard" org.apache.commons library?

View 1 Replies View Related

Android :: Java Rare And Impossible Exception Causing Force Close

Apr 19, 2010

I have an interesting problem being reported to me from an android application I have published. I have a two-dimensional array that I am iterating through using two for loops like so:

for (int i = 0; i < arr.length; ++i)
{
for (int j = 0; j < arr[i].length; ++j)
{
if (arr[i][j] != 0)
// does stuff
}
}

The problem is, somehow arr[i][j] != 0 is throwing an ArrayIndexOutOfBoundsException. But very rarely. I have thousands of people use the app on a daily basis and get maybe twenty force close reports. Is this something I can't avoid, maybe a problem with the phones memory, etc. or is there something I can do that I haven't thought of yet?

View 1 Replies View Related

Android : Development Java Null Pointer Exception When Trying To Get String Extra()

Nov 6, 2010

In my main activity, I have the following code that calls my FileBrowser activity: What's wrong? Can I not use putExtra with startActivityForResult? Can putExtra only be used with startActivity? Code...

View 1 Replies View Related

Android :: Develop Using Libraries In Simple Java Project - Without Using Dalvik And Such

Oct 9, 2010

As I am very pissed off of using the emulator to develop any Java class, I thought of setting up a project in Eclipse and instead of the usual JRE I linked to the Android.jar (version 2.1) that usually the Android projects link to. I don't mean to use this to develop Layouts or other specific platform things, I was just trying to create a class that uses HttpClient.

It miserably crashes like this.

CODE:.............

I mean I'd like to develop libraries (and test them) so that when I go to the emulator I don't have to deal with them. Is there a good way to do this? This seems not to work for some reason.

View 1 Replies View Related

Android :: Eclipse Deletes Java Files On Build Of Project

Sep 21, 2010

I have an interesting problem. I pull down an android project from cvs, which works fine. Once Eclipse builds the project, my .java files are removed. XML files, pngs, everything else is fine. I seem to be left with just the package tree, but no source files. Any thoughts?

View 1 Replies View Related

Android :: Error Loading Java.awt.font In Eclipse Project?

Sep 16, 2010

I've seen a few places where this was asked but I haven't seen where it's been resolved. I've just installed the tools needed to develop Android applications. This includes, of course, Eclipse. When I try to open the res/main.xml file, I get the error 'could not initialize class java.awt.font'.I'm running the newest version of Eclipse and all the software required for Android development. I'm running on Ubuntu 10.04 32bit. Sun JDK and JRE are installed.

View 1 Replies View Related

Android :: Way To Include Other Java Source Projects In Droid Project?

Sep 18, 2009

Is it possible to include other Java source projects in Eclipse into an Android project? Normally for a regular Java project you do this by adding the other project to the build path and including it in the Project References. This same approach lets the code compile, but when the app is deployed to the emulator, it throws a VerifyError when I try and instantiate classes from my other project. Is this possible with the Android SDK? Do you have to build them to jars and include them inside your Android project like this? I know this works, but just involves more steps to do this.

View 3 Replies View Related

Android :: Get Hold Of Context For Junit Test From Java Project?

Jul 3, 2010

I need to access and Android context for a JUnit Test. I have tried using MockContext and extending the AndroidTestCase but each time I get an error saying (stub!)

View 2 Replies View Related

Android :: Davlik Bug - UNEXPECTED TOP-LEVEL EXCEPTION: Java.lang.IllegalArgumentExcep­tion

May 10, 2009

I am attempting to integrate some previous libraries that we have within my new android project.

I have made several attempts including:

Importing the code as sub-projects (that are built using the android.jar)

Importing the code as jar files (from the built code)

Adding the files directly as part of my project

Reordering the dependencies

However for each one of these scenarios I keep getting the following exception thrown by the davlik compiler.

It is always picking the first class in the package (ie if I remove that class, it picks the next and so on).

It would appear to me that this is a compiler bug - somehow it's getting it's dependencies in a twist.

Anyone else experienced this? And/or have any ideas on how to get around this one?

UNEXPECTED TOP-LEVEL EXCEPTION:

CODE:................................

View 3 Replies View Related

Android :: Android - Unhandled Event Loop Exception - Java.lang.StackOverflowError

Feb 23, 2010

This work flow is causing Eclipse to give me:

Unhandled event loop exception java.lang.StackOverflowError

Looking at the eclipse log it gives just a bit more information:

Unhandled event loop exception java.lang.StackOverflowError org.eclipse.ui

I am running: ....

View 3 Replies View Related

Android :: Exception With Web Service ( Java.net.SocketException Permission Denied) In Android

Nov 23, 2010

When I call a Web Service, it returns me this exception: java.net.SocketException Permission denied. I dont know waht is the actual problem. I don't know how to solve this? home.java page:............

View 2 Replies View Related

Android :: Converting Android Project To Regular Java Inside Eclipse?

Apr 2, 2010

Ive inherited some code which started out as an Android project but really is just an API to be used by other applications. Hence, the 'build' process usually just produces a JAR file. The problem I am having is that I get errors from the Android build tools in my console which seem to fire everytime I make a change to some files.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved