Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
clarkeismine
Old
(Last edited by clarkeismine; 14th June 2009 at 08:58 PM.) Reason: Used an @ instead of & in title
#1  
Junior Member - OP
Thanks Meter 0
Posts: 16
Join Date: Jun 2009
Default Android Source & Eclipse, Unresolved imports and undefined Variables

I used the search function for forums and Google to try and find an answer first, so this is either a somewhat unique issue... or I am very bad at searching.

I followed the instruction on the Android source site, using git to acquire the source, etc...

However I am having many, many issues when I load the source for Launcher into eclipse as a new project from existing source. Immediately upon load, I have 100 errors, the majority of which are as follows:

Code:
Description	Resource	Path	Location	Type
com.android.internal.R cannot be resolved	Launcher.java	Launcher/src/com/android/launcher	line 865	Java Problem
ISearchManager cannot be resolved	Search.java	Launcher/src/com/android/launcher	line 364	Java Problem
IWallpaperService cannot be resolved	Launcher.java	Launcher/src/com/android/launcher	line 292	Java Problem
mBottom cannot be resolved	BubbleTextView.java	Launcher/src/com/android/launcher	line 80	Java Problem
mContext cannot be resolved	LiveFolderAdapter.java	Launcher/src/com/android/launcher	line 144	Java Problem
mCursor cannot be resolved	Search.java	Launcher/src/com/android/launcher	line 719	Java Problem
mLeft cannot be resolved	BubbleTextView.java	Launcher/src/com/android/launcher	line 80	Java Problem
mParent cannot be resolved	LauncherAppWidgetHostView.java	Launcher/src/com/android/launcher	line 78	Java Problem
mRight cannot be resolved	BubbleTextView.java	Launcher/src/com/android/launcher	line 80	Java Problem
mScrollX cannot be resolved	BubbleTextView.java	Launcher/src/com/android/launcher	line 104	Java Problem
mScrollY cannot be resolved	BubbleTextView.java	Launcher/src/com/android/launcher	line 105	Java Problem
mTop cannot be resolved	BubbleTextView.java	Launcher/src/com/android/launcher	line 80	Java Problem
SearchableInfo cannot be resolved to a type	Search.java	Launcher/src/com/android/launcher	line 72	Java Problem
SearchManager.SOURCE cannot be resolved	Launcher.java	Launcher/src/com/android/launcher	line 845	Java Problem
ServiceManager cannot be resolved	Launcher.java	Launcher/src/com/android/launcher	line 291	Java Problem
STATUS_BAR_SERVICE cannot be resolved	Launcher.java	Launcher/src/com/android/launcher	line 1119	Java Problem
StatusBarManager cannot be resolved to a type	Launcher.java	Launcher/src/com/android/launcher	line 1119	Java Problem
The constructor Vibrator() is not visible	DragLayer.java	Launcher/src/com/android/launcher	line 94	Java Problem
The import android.app.ISearchManager cannot be resolved	Search.java	Launcher/src/com/android/launcher	line 19	Java Problem
The import android.app.IWallpaperService cannot be resolved	Launcher.java	Launcher/src/com/android/launcher	line 78	Java Problem
The import android.app.StatusBarManager cannot be resolved	Launcher.java	Launcher/src/com/android/launcher	line 24	Java Problem
The import android.os.ServiceManager cannot be resolved	Launcher.java	Launcher/src/com/android/launcher	line 54	Java Problem
The import android.os.ServiceManager cannot be resolved	Search.java	Launcher/src/com/android/launcher	line 34	Java Problem
The import android.server cannot be resolved	Search.java	Launcher/src/com/android/launcher	line 35	Java Problem
The import com.android.internal.util.XmlUtils cannot be resolved	LauncherProvider.java	Launcher/src/com/android/launcher	line 49	Java Problem
The method peekInstance() is undefined for the type InputMethodManager	SearchAutoCompleteTextView.java	Launcher/src/com/android/launcher	line 44	Java Problem
I am using the cupcake branch in git, and have tried to have the project use both the 1.5 SDK or the Google SDK (1.5 with Google APIs)

If anyone has any ideas as to why this is occuring, I would very much appreciate it.

Also, I can write any original android programs I want using this eclipse setup, so I am sure I must have an issue related just with the Android Source.
 
jashsu
Old
#2  
jashsu's Avatar
Senior Member
Thanks Meter 4
Posts: 1,845
Join Date: Nov 2008
Try clearing your local repo and specifying revision master or android-1.5
 
clarkeismine
Old
(Last edited by clarkeismine; 14th June 2009 at 11:17 PM.) Reason: new information
#3  
Junior Member - OP
Thanks Meter 0
Posts: 16
Join Date: Jun 2009
Well I wiped my local repo and tried it with both the master revision and android-1.5 revision. Unfortunately I am still encountering the same errors. I also redownloaded and reinstalled the current SDK, but that did not help either.

Also, it has the same errors in both my Windows 7 installation and Ubuntu installation.
 
clarkeismine
Old
#4  
Junior Member - OP
Thanks Meter 0
Posts: 16
Join Date: Jun 2009
Well I found a single related question on the google japan message board from Dianne Hackmann at Google:

Quote:
You need to change the code to use the public SDK (calling the View
functions to get/set the scroll position etc).
This was just the answer for the origional posters question of how to get the variables such as mScrollX and mScrollY to work. Why would they develop on the private SDK, but require you to change all the code to be compatible with the public SDK if you wanted to compile android from source yourself?
 
GopinathPrathapineni
Old
#5  
Junior Member
Thanks Meter 0
Posts: 1
Join Date: Oct 2010
Post How can I make my eclipse project error free for the Launcher application

This thread helped me in finding out an issue that I came across. I understand that in standard Android SDK, some classes and flags are not available where as during Android build time, they are available.

My question is, how can I build the launcher app using eclipse and not through the OS build process. I mean, how will my eclipse based Launcher project compiles without saying any error?
 
melmantheman
Old
#6  
melmantheman's Avatar
Member
Thanks Meter 3
Posts: 39
Join Date: Jan 2012
Location: Milford
I too have the same problem. R is not autogenerated based on the code given. I have heard you have to Clean the project but that does nothing. Im using the same code from google compling under the 2.1 in eclipse indigo.
 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Side-Swiping Multitasking with Kakudo

Recovering iPad users may still remember the multitasking function where you can swipe left or right to … more

Learn to Edit Graphics for your Development Work

The importance of good and appropriate graphics for your development work is undeniable. Be … more

Tasker Alternative: AutomateIt, Automates Your Device Tasks – XDA Developer TV

XDA Developer TV Producer Kevin wants to help make your … more