Select to view content in your preferred language

Hello World / New Install

6671
14
12-29-2011 11:26 AM
JayKappy
Frequent Contributor
I am trying to install and get a hello world app going...
I wen tthrough the Install instructions which were very confusing, install this before this but after this, but not untill you install this....I have no idea if I installed things right...anyways...

I open Eclipse and go:
File>New>Project
Choose ArcGIS project for Andoid
Give it a project name
Give it a package name (dont really understand this one) I called it "com.esri.andoid.sample"

I keep getting this error in the Console

[2011-12-29 15:11:02 - HelloWorldMap] Unable to resolve target 'android-8'

In the Package Explorer HelloWorldMap, src, com.esri.android.sample, HelloWorldMapActivity.java all have a little red square box next to them with a white X

There are 4 errors in the Problems tab

1. The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project
2. The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files
3. Unable to resolve target 'android-8' HelloWorldMap
4. Unable to resolve target 'android-8' until the SDK is loaded.

Any thoughts? Please help...very confused here....

THanks
0 Kudos
14 Replies
JayKappy
Frequent Contributor
see image attached...these is what I am seeing..please help if you can...

Is there something that i did not install?
Paths missing?
other plugins???

This is the install steps I took

1. Java Development Platfrom JDK
2. Eclipse IDE 3.5+. ADT 16 requires Eclipse 3.6+ (Helios)
......... I installed "Eclipse IDE for Java Developers", 128 MB
3. Google Android SDK 2.2 (API 😎 or above
4. Google ADT plugin for Eclipse
5. ArcGIS Runtime SDK for Android Eclipse Plugin
0 Kudos
AdrianJaimes
New Contributor
I have the same problem, in my case I guess is because the Android SDK 2.2 is not installed and I can't update via SDK manager. Any ideas for this problem?
0 Kudos
JayKappy
Frequent Contributor
I have no idea whats going on...the directions are so vague, go to this site and do this, but not before you go to this site and get this download and install but after you do this....ugggggg...

THis is what I have in my SDK manager...am I missing something, ANYONE OUT THERE help resolve this issue?
0 Kudos
JayKappy
Frequent Contributor
I have no idea what I did..
I added a new folder in the java build path
I then deleted the folder because it now had errors all over it as well
then I realized that 2 of the 3 errors were gone...
Also noticing that there was now an excluded in the HelloWorldMap/src??????

Why did it do this and how did it resolve most fo the errors....why?????

Whats going on here...this is supposed to be the most simple exampel and that dosent work...I followed verbatum from teh instructions...

ALTHOUGH I STILL HAVE ONE ERROR:
Unable to resolve target 'android-8'

ANYONE know what this error is and how to resolve it??????
0 Kudos
JayKappy
Frequent Contributor
Is this telling me that it cannot find the folder containing the Android-sdks? 
What is the error pertaining to?  I have no idea...

my workspace that was set up is at the same level as the android-sdks...is this why?

C:\Users\jsmith\android-sdks
C:\Users\jsmith\workspace
0 Kudos
JayKappy
Frequent Contributor
I got so frustrated that i removed everything I could from my computer and reinstalled Eclipse
Went into Help and "Install New Software"
reintalled the ADT plugin, and set the source
Reinstalled the ArcGIS Android SDK

I then did the following below...

Think I fixed my problems...

1. I think I missed configuring the ADT Plugin

Configuring the ADT Plugin
After you've successfully downloaded the ADT as described above, the next step is to modify your ADT preferences in Eclipse to point to the Android SDK directory:
1.Select Window > Preferences... to open the Preferences panel (Mac OS X: Eclipse > Preferences).
2.Select Android from the left panel.
You may see a dialog asking whether you want to send usage statistics to Google. If so, make your choice and click Proceed. You cannot continue with this procedure until you click Proceed.
3.For the SDK Location in the main panel, click Browse... and locate your downloaded SDK directory.
4.Click Apply, then OK.

2. Right Click project and hit properties. In the android option on the left I had to select the Android 4.0.3 as the project Build Target

3. In the Package Explorer I opened the project.properties and changed the target to target=android-15 instead of target=android-8
a. If you click Help>Preferences adn then the Android tab you will see the API Level...this is where I got the 15 to change in the project.properties file in teh Package Explorer TOC

These have seems to rid the errors....now just need my datacable to test the hello world
0 Kudos
DanO_Neill
Deactivated User
It was difficult to tell if you successfully installed the appropriate Android SDK platforms, e.g. 2.2, from your screenshot but I suspect it was not installed when you were experiencing the issues. The fact that you had to select Android 4.0.3 as your project build target and change the target to API level 15 to resolve the issue also implies that you don't have the appropriate Android SDK platforms installed.

You reference that the install instructions were very confusing, which install instructions are you referring to? Are you referring to the ArcGIS instructions or our prerequisite for installing the Android SDK docs which we link to? We really want to ensure the install steps as simple as possible. Currently we do not step you through the Android SDK or ADT install instructions and presume you have this set up before installing the ArcGIS SDK. We have created a blog post which steps readers through the entire process. Please let us know if this helps or if you are continuing to have issues.

You also referenced not understanding the package name. The ArcGIS Runtime for SDK for Android includes a Java API so all source is written in Java. A Java package is a way to organize Java classes into namespaces. This feature make types easier to find and use types and avoids class naming conflicts. Please refer to the Java Package tutorial for reference.
0 Kudos
JayKappy
Frequent Contributor
I think I am alright on the ArcGIS SKD install but now trying to run it on my Phone.
I have an Android Incredible�?�.I run it from Eclipse and it installs an icon in the apps folder but when clicked it does a FORCE Close and wont open �?�I get a bunch of errors in Eclipse�?�

Anyone have any thoughts?  Wrong Android Version?  Am i missing something?  IS THERE SOMETHING I HAVE INSTALL ON MY PHONE?

See attached image...

Please help...THanks

In the CONSOLE in eclipse I get this
[2012-01-03 08:55:53 - HellWorldMap] Android Launch!
[2012-01-03 08:55:53 - HellWorldMap] adb is running normally.
[2012-01-03 08:55:53 - HellWorldMap] Performing com.esri.android.sample.HellWorldMapActivity activity launch
[2012-01-03 08:55:53 - HellWorldMap] Automatic Target Mode: Unable to detect device compatibility. Please select a target device.
[2012-01-03 08:55:57 - HellWorldMap] Application already deployed. No need to reinstall.
[2012-01-03 08:55:57 - HellWorldMap] Starting activity com.esri.android.sample.HellWorldMapActivity on device HT08THJ14759
[2012-01-03 08:55:57 - HellWorldMap] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.esri.android.sample/.HellWorldMapActivity }

BUT ON THE PHONE I GET:


The application has stopped unexpectently FORCE CLOSE
0 Kudos
SwatiGadey
Emerging Contributor
Did you add the HelloWorldMapActivity in the project's AndroidManifest.xml file?
0 Kudos