How can I revert back to 10.1.1 for a single project?

2229
3
Jump to solution
11-01-2013 12:56 PM
JasonKnisley
Occasional Contributor
I'm sure this is a simple question, but I don't work much with Eclipse unless I'm doing something on Android, and so I'm not familiar with a lot of the options. Recently I upgraded the ArcGIS Android SDK to 10.2.0, and it has caused a lot of problems in one of the apps I'm working on. What do I need to do to roll back to 10.1.1 for just that app?
0 Kudos
1 Solution

Accepted Solutions
DanO_Neill
Occasional Contributor III
The simplist approach would be to uninstall Android SDK v10.2 and reinstall Android SDK v10.1.1.  This will automatically set the classpath container (jars) back to v10.1.1 on all your projects.  Then right click your project and run, ArcGIS Tools > Fix Project Properties.  This will revert the native libraries back to v10.1.1 as well for each project you run it against.

But, if you want to keep Android v10.2 Eclipse plugin installed but only want this project at v10.1.1 you will need to remove your classpath container and add the 10.1.1 jars as a individual libraries or as a Classpath Variable.
 
Remove 10.2 Classpath Container

  • Right click project and select Properties

  • Choose Java Build Path from left and Libraries tab in the Java Build Path dialog

  • Select the ArcGIS for Android 10.2 classpath container and click Remove

Remove 10.2 Native Libraries

  • Select all the folders under your projects Libs folder and delete

Extract ArcGIS Runtime SDK for Android libraries

  • Get the 10.1.1 download

  • Extract the contents of the ArcGIS SDK for Android download into the new directory using a Zip utility.

  • Open a terminal or command prompt and change directory (cd) into the plugins directory where you extracted the SDK.  E.g. /home/user/arcgis-android-v10.1.1/plugins.

  • The API libraries are bundled in a jar file inside the plugins directory.  You can use a Zip utility or the Java JDK Jar tool to extract the libraries from com.esri.arcgis.android.core_10.1.1.201306271100.jar file.  I offer a jar command which extracts the contents of the lib and libs folders.  These folders hold the jar files and native libraries for developing with the API.

jar xvf com.esri.arcgis.android.core_10.1.1.201306271100.jar lib libs


Two new directories are added to your plugins folder which hold the required jars and native libraries to work with ArcGIS Android v10.1.1 API.

Add the 10.1.1 native libraries back to your project
These native libraries are located in the libs folder you extracted from the ArcGIS Runtime SDK for Android download. The libs folder matches the libs folder created in all Android projects.  Copy the contents of the extracted libs folder to your Eclipse Android project libs folder.

Add the 10.1.1 jars back to your project

  • Right click your project and select Properties

  • Select Java Build Path from the left and Libraries tab from the right

  • Click Add External Jars and navigate to the lib folder you extracted

  • Select all the jar files and click Open

  • Click the Order and Export tab

  • Check all the jars you just added to Order and Export tab

There are many ways you can add the jars in, just be sure they are added to your build path.

View solution in original post

0 Kudos
3 Replies
ErwinSoekianto
Esri Regular Contributor
- Right click on the project -> properties
- Choose "Java Build Path" on the left tab
- Choose "Library" on the top tab
- You would see "ArcGIS for Android 10.2", either delete this add the same jars from 10.1 zip file.
0 Kudos
DanO_Neill
Occasional Contributor III
The simplist approach would be to uninstall Android SDK v10.2 and reinstall Android SDK v10.1.1.  This will automatically set the classpath container (jars) back to v10.1.1 on all your projects.  Then right click your project and run, ArcGIS Tools > Fix Project Properties.  This will revert the native libraries back to v10.1.1 as well for each project you run it against.

But, if you want to keep Android v10.2 Eclipse plugin installed but only want this project at v10.1.1 you will need to remove your classpath container and add the 10.1.1 jars as a individual libraries or as a Classpath Variable.
 
Remove 10.2 Classpath Container

  • Right click project and select Properties

  • Choose Java Build Path from left and Libraries tab in the Java Build Path dialog

  • Select the ArcGIS for Android 10.2 classpath container and click Remove

Remove 10.2 Native Libraries

  • Select all the folders under your projects Libs folder and delete

Extract ArcGIS Runtime SDK for Android libraries

  • Get the 10.1.1 download

  • Extract the contents of the ArcGIS SDK for Android download into the new directory using a Zip utility.

  • Open a terminal or command prompt and change directory (cd) into the plugins directory where you extracted the SDK.  E.g. /home/user/arcgis-android-v10.1.1/plugins.

  • The API libraries are bundled in a jar file inside the plugins directory.  You can use a Zip utility or the Java JDK Jar tool to extract the libraries from com.esri.arcgis.android.core_10.1.1.201306271100.jar file.  I offer a jar command which extracts the contents of the lib and libs folders.  These folders hold the jar files and native libraries for developing with the API.

jar xvf com.esri.arcgis.android.core_10.1.1.201306271100.jar lib libs


Two new directories are added to your plugins folder which hold the required jars and native libraries to work with ArcGIS Android v10.1.1 API.

Add the 10.1.1 native libraries back to your project
These native libraries are located in the libs folder you extracted from the ArcGIS Runtime SDK for Android download. The libs folder matches the libs folder created in all Android projects.  Copy the contents of the extracted libs folder to your Eclipse Android project libs folder.

Add the 10.1.1 jars back to your project

  • Right click your project and select Properties

  • Select Java Build Path from the left and Libraries tab from the right

  • Click Add External Jars and navigate to the lib folder you extracted

  • Select all the jar files and click Open

  • Click the Order and Export tab

  • Check all the jars you just added to Order and Export tab

There are many ways you can add the jars in, just be sure they are added to your build path.
0 Kudos
DanO_Neill
Occasional Contributor III
Keep in mind, you can have multiple versions of Eclipse on your system.  That way you can have a version with 10.1.1-u1 and a version with 10.2 and avoid extracting 10.1.1-u1 plugin.
0 Kudos