I've pulled and compiled the latest Android tree. Now I want to make changes to the Android's Browser application.
The environment in Eclipse is already set up. I tried creating the project by selecting "Build project from existing source", but it fails to build because it uses libraries not in the SDK.
Does anyone know how to import the missing source in order to build the Browser app, or even better, how to just copy the source into a separate project and use it like I was developing a regular application?
Does anyone know how to import the missing source in order to build the Browser app
That is not possible. The "missing source" is the operating system.
how to just copy the source into a separate project and use it like I was developing a regular application?
That too is not possible.
You cannot just grab an app out of the Android open source project and build it via the SDK. Some of the apps were first written before the SDK existed. Other apps rely upon APIs that, for various reasons, have not yet been exposed in the SDK.
You are welcome to make modifications to the Browser app. However, to build them, you need to use the build process for the firmware, not treat it as a regular SDK-based project.
Related
Why don't we have a file similar to the .xcodeproj (for XCode applications) or an .xds (for Sencha Architect Projects) for our Android Studio Project?
I'm pretty sure a good number of you here have experienced the frustration of trying to import a project you see online in order to piece it apart better and learn how it works. I get that we are supposed to Import Android Projects built using Eclipse and Open Android Projects built using Android Studio.
However, why is it that we have to go through File -> Open -> then pick out the directory of the Android Studio app that we want to open? And the thing is, Android Studio doesn't seem to know it's an Android Studio project until it tries to open and build it. In the screenshot I have below, I have the sample Android Studio projects of ARToolKit, but I've only imported two of them.
As you can see, only those I've imported "can be seen as an Android Studio Project" as indicated that they have the Android Studio logo instead of a Folder.
This can be an issue for those just starting to develop in Android Studio on their own and they try and use existing projects (build from Eclipse or Android Studio) and they hit a snag with just trying to import the projects for reference. They might not know that they should import the folder and not the projectname/src subfolder. It adds to the "steep learning curve" that Android Development has if opening/importing projects aren't streamlined to a degree.
To sum up, my question is:
Why don't we have a single file that we can open that would in turn open Android Studio and import and build the project if it isn't built yet?
Android is not iOS. iOS development is only possible in xcode, hence it makes sense they added a shortcut to open it in xcode directly with a .xcodeproj file. Make life easier for iOS developers.
Android development however can be done outside of android studio as well. Eclipse is just one example, there may be other IDE's that support this. This is possible because android has standalone SDKs and tools that third party applications can use. iOS does not.
Imagine you are working on an android project in android studio. Then your boss tells you someone from 3000km away is going to help you. This guy may be using android studio, but maybe he isn't. When there are multiple options that developers can choose from individually, you do not want to pollute version control with files that you are using, but others may not care about. Each their environment.
This is merely a logical conclusion that you can come to by comparing. The "real" reason why this was done can only be answered by the people that created (adapted intellij) android studio.
This has been very frustrating to me too.
I try to give you a "beta" answer, waiting somebody to confirm it to me.
An Android project is just the composition of many parts that in some cases are concurrent to create the apk file.
It's just like what happens for the whole java projects: you have the main/src/java, the main/src/test, the maver or gradle files, the gradle or maven wrapper, the manifest, the configuration etc.
So you won't have a single project, but a series of folders that can contain many "flavours" or "versions" of the product itself.
The only help it is given to us is the Android studio icon that appears if a folder contains an android project in its subfolders.
I don't know if I have really answered to you, I just have given you my impressions and my thought.
I would like to add some features to the AOSP Email application which is not supported anymore. So I cloned the repository here (which is a Eclipse project) and migrated it to a Gradle project in Android Studio. But after that it comes to thousend Java errors, missing resources and so on...
So has Google really a not working repo there? Do I maybe need some other repos from AOSP? As it is for now I can't work with it anymore...
So I cloned the repository here (which is a Eclipse project) and migrated it to a Gradle project in Android Studio.
None of the AOSP projects are designed to be used this way. They are designed to be built as part of a firmware build.
If your objective is to contribute changes back to the AOSP, you will need to follow their instructions for using their source code.
If your objective was to create your own email app, you may be better served starting with some base that is buildable as a regular Android app (e.g., K-9 Mail). Otherwise, you are going to need to fix all of those problems, as they reference things that are not going to be available to your app project via the Android SDK.
I am working on a Java application that will run on an embedded system - a custom android build or modified AOSP. It is built on a linux server.
I would love to use an IDE like Eclipse with all its goodies like code completion, source code checking etc. but it seems very complicated. I looked at Puri's blog here
for one, the build process of our custom android uses Android.mk makefiles.
How can I (Should I?) modify the Eclipse build process to build the custom android build?
You can use either eclipse or studio to maintain a custom, pre-installed application.
In either case, you will not use the IDE to build the actual application image. That will be built as part of the make from the root of the AOSP install(1)
You can, however, create a project whose root is the directory in either /device or /package that contains your app.
Once you've done that, read the Android.mk file to find dependencies. Add them to the project as you would for any other project, for your chosen IDE.
If you go for eclipse, I suggest that you put the build directory somewhere in /out, or outside the AOSP directory altogether. If the root make file finds it, it can be a problem.
When you need to test your app on a device or an emulator, use mm to build only your app.
Better yet, if possible, do most of the development for your app as you would any stand-alone app, so that you can easily install and test it. Only put it in the AOSP directory as part of the release process.
Note, you can use either eclipse or studio to kick off that system
build. In eclipse, use External Tools. Studio provides similar
capabilities
I have ros, rosjava, and android_core on my Ubuntu machine, as well as Eclipse and the Android SDK and ADT. Now, I'm trying to create an android application using the following instructions but I'm having trouble:
http://docs.rosjava.googlecode.com/hg/android_core/html/getting_started.html#getting-started
After copying the android_tutorial_pubsub into another folder and trying to open it with Eclipse I get a bunch of unrecognized packages. Eclipse doesn't know where to find ros classes (such as RosActivity) and I'm not sure how to import them. I tried importing the android_core as per: http://ros.org/wiki/android_core#Eclipse_configuration and that creates another project called MasterChooser that I can then link to the pubsub tutorial to fix some of the referencing errors, but the projects (pubsub and MasterChooser) still don't recognize certain files that are in rosjava. For this I tried File->Import->General->File System and then manually select the rosjava packages but that still leaves some issues.
Overall I feel there must be a simpler way to make the android app (pubsub) reference both android_core and rosjava, but my lack of experience in ros and in eclipse are making this hard. In short, I really just want to be able to run the tutorial apps (like pubsub) from Eclipse into my android device.
I need to edit the original Android Apps from packages
in terms make my own distro/mod..
I want to make changes to the In Call screen, lock screen, contacts, calendar etc..
I understand that for doing this I will have to build everything from
source,
however I need to edit the source and to do so I need to open the OS provided apps as
eclipse projects,
When I did I saw that there are
missing imports which are hidden in the SDK (or missing)
hidden parameters within the classes..
I don't want to use reflection since the whole code is here and
available, but how do you build a platform development kit..
or PDK ?:)
Can any one help?
You start by reading the documentation.
EDIT:
If you are trying to download some single project from AOSP and compile it using the SDK, odds are very strong that it will not work, and that you will encounter problems like the ones you cite. You do not build Android by building individual apps; you build Android ("my own distro/mod") by building the entire firmware. Most AOSP applications are not designed to be compiled by the SDK, but need the whole firmware.
Please check Using eclipse to browse and edit AOSP. You can atleast edit your code using eclipse, but you will have to use AOSP build system to build your distro.
You might also check Debugging Android Java Framework services as that would help debug your changes.
Just open Eclipse,
then go to "window" +"preferences" +"android"
there you will get sdk location,then give the appropriate path of the android sdk for proper run...