Esri / arcgis-runtime-samples-android

ArcGIS Runtime SDK for Android Samples
https://developers.arcgis.com/android/
Apache License 2.0
665 stars 1.19k forks source link

com.esri.arcgisruntime.sample.displaydevicelocation.R unable to locate please share. Tks #387

Closed Sansun closed 7 years ago

Sansun commented 7 years ago

ArcGIS Android Issue Template

GitHub is ONLY used for issues pertaining to ArcGIS Runtime SDK Samples. Use GeoNet for any general ArcGIS Runtime Android SDK questions.

Is this something you can contribute? Send a pull request! New Samples, bug fixes and documentation fixes are welcome.

Neither of the above? Submit an issue:

Feature or Bug?

Behavior

Steps to Reproduce

1. 2. 3. 4.

Sansun commented 7 years ago

The import com.esri.arcgisruntime.sample.displaydevicelocation.R is not to be found and so issues some variables getting resolved.

Appreciate that the com.esri.arcgisruntime.sample.displaydevicelocation.R file be shared to resolve the issue.

Thank you

TADraeseke commented 7 years ago

Hi Sansun,

Often issues with R not being resolved can be fixed by cleaning/rebuilding the project or are problems to do with the Manifest.

The way the samples are setup, they should run without any alteration to the code and I've just tested display-device-location and it seems to be running fine for me.

If re-cloning and cleaning the project don't help, could you explain how to reproduce your problem?

Kind regards, Trevor

Sansun commented 7 years ago

Hey Trevor, Thank you so much for the reply. I am new to eSri ArgGis Runtime Android. And I started with the API version 100.1.0; I followed the instructions and able to build my first display-map app on Android with no issue and I can run the app on my Samsung Galaxy Tab 2 7" device using the USB debug fine, no issue.

This is my second example based on the display-device-location. I only have this 3 files `com.esri.arcgisruntime.sample.displaydevicelocation.MainActivity.java com.esri.arcgisruntime.sample.spinner.ItemData.java com.esri.arcgisruntime.sample.spinner.SpinnerAdapter.java

The MainActivity.java has these line of code which is not getting resolved: // Populate the list for the Location display options for the spinner's Adapter ArrayList list = new ArrayList<>(); list.add(new ItemData("Stop", R.drawable.locationdisplaydisabled)); list.add(new ItemData("On", R.drawable.locationdisplayon)); list.add(new ItemData("Re-Center", R.drawable.locationdisplayrecenter)); list.add(new ItemData("Navigation", R.drawable.locationdisplaynavigation)); list.add(new ItemData("Compass", R.drawable.locationdisplayheading)); ` I used the build.gradle script to download the resources from maven{ url: 'https://esri.bintray.com/arcgis' } as in the instructions. Not sure it get all the required files to build the project.

Appreciate any help.

Thank you

Sansun commented 7 years ago

Update: Thank you Trevor, your comments helped me and I followed the complete installation of the eSri ArcGis Runtime SDK for Android Samples (Instructions here: https://github.com/Esri/arcgis-runtime-samples-android/wiki/dev-instructions) and its perfect now. No issues.

Thank you again!

TADraeseke commented 7 years ago

Brilliant! Enjoy the ArcGIS Runtime SDK :)