How to load com.android.music code into Eclipse and compile? - android

I did a git on the com.android.music app and then created a project in eclipse from existing code. I chose 2.1 as the sdk target but I am getting errors trying to compile.
Is the music app referencing code that is not part of the 2.1 sdk? Can someone list the steps for how to compile in eclipse?
Description Resource Path Location Type
ArrayListCursor cannot be resolved to a type PlaylistBrowserActivity.java Music/src/com/android/music line 529 Java Problem
MediaFile cannot be resolved AlbumBrowserActivity.java

Is the music app referencing code that
is not part of the 2.1 sdk?
Absolutely. Most of the built-in apps for Android were created before there was an SDK. You will not be able to build them in isolation from the rest of the firmware without substantial work. Work which, BTW, would be welcome contributions back to the Android open source project, if you were so inclined... :-)

Check the applications manifest file. It will contain an attribute stating which version of the SDK the application was built with.

Related

Editing Titanium 3.2.2GA Android SDK

I am building an application for Android and iOS using Titanium SDK 3.2.2GA which is free. I am using Titanium.Media.AudioPlayer for the development of the stuff related to audio in my application but this audio player provided by titanium is kind of incomplete for example, duration is not available in iOS and Android but the property exists.
So in order to add the functionality which is not currently present in this library, I edited the Titanium SDK for iOS from the path (Library/Application\ Support/Titanium /mobilesdk/osx/3.2.2.GA /iphone/Classes) but I am stuck when it comes to Android because the Android folder contains the precompiled classes in the form of .class files.
So, I was just wondering if anyone has a solution for it. All I want is to implement the fix mentioned in the following commit, to my existing Titanium SDK but when I goto (Library/Application\ Support/Titanium /mobilesdk/osx/3.2.2.GA /android/modules/..) all the files inside it are pre-compiled .class files.
TIA.
The 3.2.2.GA version of Titanium SDK is very old. As Shoaib mentioned above you should use a more recent version, for instance: 5.2.2.GA or the current stable 5.3.1.GA. However, if you need to use the 3.2.2.GA version for some special requirement, you must download the source code of SDK version, make the changes (apply the commit) and compile it, instructions available in: https://wiki.appcelerator.org/display/guides2/Building+the+Titanium+SDK+From+Source

Android Studio Error while importing eclipse project

I started my android development with Android Studio so I do not know much about eclipse. A client has sent me his source code for an android app that needs editing and while trying to import it I am getting the following error.
Some one please guide me to a solution, I really need it right now.
Using android studio 2.1.2 with JDK 8 installed.
This is the project.properties file
Thanks!
Ok so turns out the app was using a "pullToRefresh" library that was missing as a deliverable to me. I did not have an experience of working with external libraries yet so took me some time to identify that.
I downloaded the library and gave it the correct path in "project.properties" file. Then simply imported the project to Android studio and it is working absolutely fine

Load AOSP Application to Android Studio

I found a few questions asking how to get the source code from the AOSP running in Android Studio. However, I could not find any explanation on how to import only a single application of the AOSP.
I am trying to do it for the Dialer application which can be found here. However, I had only minor success, I was able to import the code as a project, but didn't manage to set up dependencies and required libraries and all that.
Can anybody tell me if it is possible, and if so, how this is done?
UPDATE:
It seems impossible to achieve this with the code that i found and which was part of the full android distribution of google. But google decided to distribute the Dialer application just like any other application via the playStore. So there should be a possibility to find this code, IF it is also running under the open source project.
You can only open the whole AOSP inside Android Studio.
After you finish building the source do make idegen && development/tools/idegen/idegen.sh inside your root folder and then open the new android.ipr in your root via Android Studio.
AOSP code you are looking is not Android Studio compatible, It's an Eclipse project.

android framework development

I am new in android framework development .
I try to add a service in platform/base and then I make the whole platform folder follow a post online.
Now i don't know how this change can be applied to android application. Do I need to get a new android.jar package for the application?
Thanks
update --------------------------------------------
currently I have the android source code and modified its framework by adding a testservice.java following this : Android-Adding SystemService
Then I need to write a test app to use this testservice. But I don't how to add an app to that modified android source code. I try to following this:set up the Eclipse IDE for Android platform development to add app src path to eclipse build path , I doesn't work.
before this i use eclipse and ADT to write android apps, i am wondering is there any way to write an app in the modified android source code ?
Thanks
I copied an app under [androidroot]/packages/apps/ folder and rename it and modify some code . Then it shows in application list. It works!
But the problem is the directory structure is strange , very different from the one I create from the eclipse + sdk .
So is there anyone know how to develop apps under a modified android framework.
Thanks !!!
I see a quick and dirty solution: replace the corresponding android.jar in the install SDK location (for example $ANDROID_HOME/platforms/android-8/android.jar if you deriver from Android 2.2).
Also you may try to spoof a separate platform revision in $ANDROID_HOME/platforms. Something like android-99 to avoid clashes with the actual future platforms.
Though all of these are dirty tricks this may work for quick testing of your platform code without much pain.
It is exactly the same as the project you create using eclipse. What's more all you need is to write a makefile in the directory.
Then mmm framework/res framework systemserver
bw

Opening android AOSP native applications in eclipse

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...

Categories

Resources