Android :: How To Build APK From Multiple Eclipse Projects?

Nov 11, 2009

Does anyone know of suggestions/recommendations on how to structure Eclipse projects in order to build an apk from multiple projects? I would like to share classes & resources (strings, layouts, etc.) across multiple apps. How to structure Eclipse projects to do such a thing!

Android :: How to build APK from Multiple Eclipse Projects?


Android :: Referencing Projects Under Java Build Path In Eclipse

Jul 27, 2009

I'm working on two projects. One is essentially a library, and the other is an application using that library. Now from the application project, I want to use the library's classes, so I added that project to the "required projects" under java build path. It seems to compile fine, but at runtime, I get this error:

07-27 11:26:57.037: ERROR/dalvikvm(741): Could not find class 'interdroid.contextframework.ContextManager', referenced from method com.bartvanwissen.contextframeworktest.MainActivity.onCreate

Apparently, the library project's classes are not added to the apk file. How can I make sure they are included? Since I'm working on both projects at the same time, I would like to prevent having to create a jar file every time I want to test something.

View 4 Replies View Related

Android :: AIDL In Multiple Projects In Eclipse

Mar 16, 2010

I have problems with the following: I want to create to applications. One with a Android service and one with a Activity that will use functions on the Service. Before I splitted this in to applications I got everything working in one application. I can call functions (that are definned in the aidl - file) on the service without problems.

Now the problems coms. I splitted the application into two parts, a Service application and Gui application. The bindins to the service (in the gui application) works and I see that the service is getting created. Then in the onServiceConnected function of the ServiceConnection class I created the following:

mService = IMyService.Stub.asInterface(service);
And this gives me the following exception:
03-16 13:53:05.549: ERROR/AndroidRuntime(881): java.lang.NoClassDefFoundError: MyPackage.IMyService$Stub

It looks like he can't find the Stub class in IMyService. But the Stub is part of the java file generated out of the aidl-file. Why I get this exception or how I can resolve this?

View 9 Replies View Related

Android :: Multiple Dependent Android Projects In Eclipse

Jun 14, 2010

I just started to play with android dev and java+eclipse is pretty new to me. I managed to create simple project and run it on my device. Now I want to create simple game (more of them actually) and I would love to use shared code base for all of them (game loop, initialization, etc..). Problem is that I have no idea how to correctly do this. I created android project called engine with all basic stuff that I need and made it work on device. Now I tried to create another project in same workspace called mygame. Main class (activity) of mygame is MyGameApp which inherits from EngineApp (main activity of my engine project) which inherits from Activity. I added engine project into required projects in mygame build path tab in properties. Problem is that when I try to run this project it crashes on ClassNotFoundException trying to find my MyGameApp class.

View 1 Replies View Related

Android :: Build 2 Projects In On Apk

Mar 30, 2010

I seperate my application into 2 projects. one for UI,the other is for service.How can I build these 2 applications into one apk?

View 9 Replies View Related

Android :: Way To Restore Old Behavior On Other Projects In Build Path?

Apr 28, 2009

We have an application cut into 3 android projects: * Project REAL (the real android project) * Project LIB1 (an android project without any activity, just to make android reusable classes) * Project LIB2 (same as LIB1) LIB1 and LIB2 are android projects rather than J2SE ones because LIB1 and LIB2 use Android classes. Project REAL has LIB1 and LIB2 in its project build path in Eclipse. In SDK 1.0 and 1.1, no problem at all when running the project REAL from Eclipse, it mixes the code of the 3 projects and produces one big APK with everything in it. But now in SDK 1.5, it installs 3 different APKs on the emulator or on the phone (I tested both), and the project REAL immediately crashes because of a Verify Error: it does not find a class that is in LIB1. The size of the produced APK is smaller, indeed LIB1 and LIB2 classes are not in it... I tried using uses-library in the manifest like google maps library but it complains at installing, we have a "missing shared library" error. I tried adding class folders in build path, it compiles in Eclipse but we still have a Verify Error. Same thing if we use external class folders in build path. The only thing that worked for me was to add an eclipse folder, which is in fact a symbolic link, and to make it a source folder. But that solution is not convenient for us because when we share the projects in SVN, the referenced paths are different for each developer. Using eclipse path variables can do the trick but it is far from being convenient. Indeed, if we have to reinstall Eclipse or if we move the place we check out the code in our developer station we have to reconfigure all these messy path variables in Eclipse. Is there a way to restore the old behavior on other android projects in build path ?

View 16 Replies View Related

Android :: Projects In Two Different Locations And Importing In Eclipse?

Mar 10, 2010

I always face this problem in my eclipse. I would like have a copy of the apps in all the versions of SDKs/NDKs. And once I have a project in eclipse, and if I have to import the same project from a new location, I get the message saying "Can't import, project of the same name already exists". Is this how it is? We cant import the same project from its 2nd location in eclipse? Everytime I delete the project from old location and put it in new. I know, it is a very unacceptable approach).

View 2 Replies View Related

Android :: Eclipse Not Importing Jar Dependencies Between Two Projects

Jun 7, 2010

Here is the situation.
I have a java project "LicenseGenerator" in eclipse that depends on commons-codec. I have therefore added the commons-codec jar file to the build path. I have Junit tests and everything is working fine. I have made a different project in the same workspace - which happens to be an Android project - that needs to use my LicenseGenerator classes. I added LicenseGenerator to the "projects" tab in the build path - the classes were recognized and I was able to use them.

Everything compiled and ran. However, when the part of the LicenseGenerator that used the commons-codec was called from my Android project I got the following error.
Could not find method
org.apache.commons.codec.binary.Base64.encodeBase64URLSafeString,
Referenced from method
This basically tells me that the commons-codec was not packaged which the Android project, so I added the commons-codec to the android project as well but the same error appears.

View 2 Replies View Related

Android :: Including Other Eclipse Projects In Application

Jan 12, 2010

I have a library-only Android eclipse project (no main class, only library classes) that I want to include in my main Android Application project. I went to the Build Path and added the library project to the "Required projects on the build path" on the Projects tab, and checked it on the "Order and Export" tab. However, when the application is run, it emits VerifyError exception, because the class from the library project didn't happen to be packaged together in the apk.

View 1 Replies View Related

Android :: Import Package Default Projects To Eclipse?

Apr 27, 2009

how to import the Android Default projects into our Eclipse. E.g androidsourcerootpackagesappsAlarmClock. I want to import this project to my eclipse work space, I tried with import projects and open excisting Android Projects. But that two are not working.

View 5 Replies View Related

Android :: New Projects In Eclipse - Cannot Create Linked Resource

Jan 19, 2009

For some unknown reason when I now try to create a new Android project in Eclipse (Ganymede running on Windows) it fails to link to the android.jar in the SDK (1.0_r1). This has never happened before, and all my existing projects continue to resolve Android components just fine.
Error: "Cannot create linked resource '/.org.eclipse.jdt.core.external.folders/.link0'. The parent resource is not accessible."

View 2 Replies View Related

Android :: Attaching Java Source To Projects In Eclipse

Jul 6, 2010

How can I attach Java source to an Android project? I'm able to browse java source for a Java project, but not for an Android project. I modified project properties and add Java source in "Libraries" section, still not working.

View 1 Replies View Related

Android :: Error Using InstrumentationTestRunner With Multiple Projects

Oct 8, 2009

My application is seperated into three projects in eclipse. The first one is a client Android Project called "Project A". The second is a server Android Project called "ProjectB". Lastly, I have "ProjectATest" for testing that has references dependencies to "ProjectA" and "ProjectB".

When excuting InstrumentationTestRunner in "ProjectATest," I get the following error message:

CODE:.........

This is the error as pulled from LogCat:

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

View 5 Replies View Related

Android :: Share Resources Between The Different Eclipse Projects - So As To Avoid Duplication

Jul 27, 2010

I have 2 android applications that share 95% of their resources, layouts, strings etc. only a few jpg's are different.

How can I share resources between the different Eclipse Android projects, so as to avoid resource duplication ?

View 2 Replies View Related

Android :: Improve Eclipse Performance For Projects With Lots Of Resources

Sep 13, 2009

I have notices following:

If I have a project with minimum files in res folder, the project saves quickly, compiles quickly and launches quickly. But if I have a lot of resources, my project is saving, compiling and launching during relatively long period of time. This is really frustrating if you do some minor UI updates, and you have always wait Eclipse to generate R file etc.

View 1 Replies View Related

Android :: Creating New Projects In Eclipse - Java File Not Generated

Jun 14, 2009

When I make a new project the .java file is not generated. I can run the project, but it does not run in the emulator or anything. It did use to work before then it stop working. I tried deleting the folder and all project files. After that I reinstalled everything but I am still having problems.

View 3 Replies View Related

Android :: Reusing Java Source In Multiple Projects

Nov 24, 2009

I'm currently developing for Android using Eclipse. I have a lexicon viewer application (with package name "com.mycompany.myviewer") that I want to reuse multiple times, just changing specific resources such as app name and icons.For example, I have a certain publisher "Publisher1", who publishes the lexicons "Lexicon1" and "Lexicon2". I would need to two applications: App1 with certain name and icon, and App2 with another name and icon.What is the best way of doing this in Java? In visual Studio (and C++) I could create two projects based on the lexikon viewer app and use conditional resources to get the right name and icon. Is there some way of doing something similar in Java?

View 2 Replies View Related

Android :: ADT Causing CDT To Build All C Projects On Android Application Launch?

Aug 27, 2010

I doubt there are too many people who run CDT in eclipse for native apps also with ADT installed for Android, but in the off-chance that someone here knows anything about this, my problem is that any time I run any android app, my C builder kicks in for projects totally unrelated. I have no idea why and have been digging through settings on everything, unable to find out why. All I can think is that the ADT pre-launch process triggers it via a refresh or some kind of catch- all type call in eclipse API land that I'm unaware of. Does anyone know anything about this? It's very annoying to have a C builder run for a different project than the one you're working on every time you launch the app.

View 4 Replies View Related

Android :: Android Eclipse Test Projects Cannot Be Used With A Project Being Built

Mar 24, 2010

An Android Java project placed in a git repository and built in an Android tree in /packages/apps needs to have the project files located at the root of the git repository.This is problematic for creating a complementary Test project, which should ideally be included in the same git repository so commits are atomic for both code and tests. Eclipse gets very unhappy if you include the Test project as a subdirectory.Is there an appropriate approach for dealing with this other than creating a second repository?

View 2 Replies View Related

Android :: IOException When Running Android Projects In Eclipse

Jun 17, 2010

Every time I try to run an Android project from Eclipse with the Android plugin (Run -> Run), the emulator starts up just fine, but the upload fails, and the Console puts out this error message:

[2010-06-17 08:17:55 - HelloAndroid] Failed to upload HelloAndroid.apk on device 'emulator-5554'
[2010-06-17 08:17:55 - HelloAndroid] java.io.IOException: Unable to upload file: Local file doesn't exist.
[2010-06-17 08:17:55 - HelloAndroid] Launch canceled!

It seems as though the apk compilation is failing, but there are no other errors in the Console at all except for a lone warning about the project not specifying an API Level requirement:

[2010-06-17 08:17:55 - HelloAndroid] WARNING: Application does not specify an API level requirement!
[2010-06-17 08:17:55 - HelloAndroid] Device API version is 8 (Android 2.2)

View 3 Replies View Related

Android :: Running Android JUnit Tests With Multiple Included Auxiliary Projects

Nov 18, 2009

I cannot run android junit tests for classes sitting in main android project that implement interfaces that reside in other included projects. Depending on SDK version I get different errors: from "Test run failed:" on 1.5 and 1.6 and spurious process death to a more polite "NoClassDefFoundError" on SDK 2.0. This happens only on instantiation of classes that reside in the Android project and implement interfaces residing outside that android project. There is no problem instantiating classes that do not fall into this category (i.e. android only or library only classes).

Android project by itself works fine with these classes - it is just the test set-up doesn't and project inclusion/classpath seems to be ok. Test project includes all projects that main project includes. NoClassDefFoundError makes little sense here given that the classloader can see and instantiate classes sitting right next to the ones that do not work. Did anyone else run into this or found a way to set-up android based tests in a multi-project set-up? Below is more detailed set-up and test explanation: 1) Library project: FooLib public interface IFoo { ... }

View 4 Replies View Related

Android :: App Build System Differences Between Eclipse And Ant

Mar 16, 2010

The Eclipse build for my 1.6 application project is succeeding and the Ant build is failing. I'm looking for help on why they aren't behaving the same way.

We are developing on Mac OSX 10.5.8 with Eclipse 3.5 against SDK 1.6 + Google APIs. There are no setting changes in Eclipse, either at workspace or project level. Similarly, our ant is also a vanilla-flavored unmodified installation of 1.7.1. JDK is 1.5.0_22. The CLASSPATH environment variable is not set. JAVA_HOME is /Library/Java/Home

The application was initially created by a team member using the Eclipse plugins. The application references two jar files, one of which has a dependency on javax.xml.bind.annotation.XmlSeeAlso, which is not defined anywhere in our code or in android.jar. The other jar file has an explicit dependency on android.jar. I generated the Ant build file using android update.

The Eclipse project builds an apk and runs the application in the emulator. I think this is incorrect behavior.

The Android ant project fails to build. I think this is correct behavior. MyClass.java:98: cannot access javax.xml.bind.annotation.XmlSeeAlso [javac] file javax/xml/bind/annotation/XmlSeeAlso.class not found

Why the two build methods are behaving differently? I would expect them both to fail.

View 2 Replies View Related

Android :: How To Hook Into Eclipse Build Project?

Oct 7, 2010

I would like to run a custom shell script upon clicking Build Project in Eclipse. I tried modifying the "compile" section in build.xml, but my script is not getting run. Invoking ant debug on the commandline works, however.

View 3 Replies View Related

Android :: Setting Up Eclipse To Build NDK Using Sequoyah

Oct 12, 2010

I am trying to set up Eclipse so that it can build my NDK piece. I have installed Sequoyah, and added the Native Support. However, when I build the project I get the error:

**** Build of configuration Default for project HelloJni ****

(Cannot run program "bash": Launching failed)

View 2 Replies View Related

Android :: Eclipse 3.5 And ADT - Build Path Errors

Jul 9, 2010

I am using Eclipse 3.5 for Jave EE Developers. Plugins installed include: Android Development Tools, Adobe Flash Builder 4, PDT, PyDev. I have problem with running the application I built. I can start a new project, add a button, and run it on an AVD. Then I add another button, try to run it on AVD, and Eclipse says 1) gen folder is missing, 2) there are errors with build path.

I can get ride of the first error by simply refreshing the project in the left pane, but the second error always sticks around. I searched online and on StackOverflow here and here, although several people have the same problem, there is no definite solution I can find.

View 1 Replies View Related

Android :: Project Broken In Eclipse After Ant Build

Sep 21, 2010

I had a project working in Eclipse completely, but after compiling it with ant in order to use Proguard to obfuscate the code the entire project fell apart. The project consists of a single package containing two main activities and 4 helper classes to handle databases and such. After using ant the activities work fine but Eclipse cannot find the helper classes and won't build. Even if I explicitly import the classes the error I get is
The import com.ts.routeTracking.DataHelper cannot be resolved while further mentions of the class get the error DataHelper cannot be resolved to a type. How can I get Eclipse and ant to work together?

View 1 Replies View Related

Android :: Build Aphone Error With Eclipse

Feb 25, 2009

build android error with eclipse, can u help me? Code...

View 2 Replies View Related

Android : Include External Jar In Build Without Eclipse

Oct 14, 2010

I'm working with Android at the moment, trying to avoid using Eclipse (for which I have an irrational hatred).

I need to include an external .jar file (used in my Activity)and have no idea how to link it for ant debug...

I've read up on build.xml files but adding <path id="compiler.classpath">...</...> or <classpath> nodes to the XML doesn't help fix it.

View 1 Replies View Related

Trying To Run Eclipse But Getting Ant Build?

Sep 18, 2011

When I hit run on eclipse I get a pop up window it says select what to run and gives me two options "Ant build" and "Ant Build..." and i can not run my program nothing happens when i click on these either.

View 1 Replies View Related

Android :: Eclipse Is Trying To Build Files In .svn Directories - How To Stop

Jul 18, 2009

I'm storing my Android project in a Subversion repository. After recently shuffling a bunch of stuff around I started getting tons of errors like: syntax error entries/project_name/src/.svnline 1Android AIDL Problem syntax error don't know what to do with "" entries/project_name/src/.svnline 28Android AIDL Problem etc.

It seems as if Eclipse is trying to build the files in the .svn directories now. This setup used to work fine.

View 7 Replies View Related







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