How to create an API specific environment for Android SDK/Eclipse? - android

I am trying (unsuccessfully, and getting extremely frustrated), to create an API specific environment for Eclipse.
I want to create an environment that supports API 17 ONLY. No other APIs installed. I successfully did this a couple months ago, but apparently, some update now (after 5.0 Lollipop was released), any attempt to install ANYTHING via the SDK manager installs API 21. I don't want it - it isn't checked, but it constantly installs.
And, in the process, screws up my environment. If I attempt to remove it, I get errors:
Parsing Data for android-21 failed
Unsupported major.minor version 51.0
I have NO idea where the major.minor version referenced is - it doesn't show up in the project properties at all.
If I leave API 21 installed (as it keeps insisting to do), then I can't access my layout properly, i.e. /res/layout/activity_??_settings.xml. The graphical layout shows nothing, there is nothing in the palette, and I get the messages:
The rendering target (Android 5.0) is still loading.
The layout will refresh automatically once the process is finished.
These two messages NEVER go away. I've tried cleaning the project (I only have one), repeatedly, and nothing seems to work.
HELP! What do I do to get an API 17 only environment? I need to get something set up for a specific project for a class, that follows my textbook, but simply can't get around these issues.

Ok - I may have found the solution.
I understand the answer that Eclipse is no longer supported - but that isn't an answer to my specific issue. I must follow a textbook, and it's examples, and, and, and. That doesn't give me any flexibility. Sorry - have had this class "placed" on me last minute, and I haven't used Eclipse/Android for quite a while. I don't have time to rewrite the textbook to accommodate the new stuff (which needs to be done, but I've got 5 days left, and I can't rewrite the textbook to change all references to Eclipse menu/rtclick options to whatever else in 5 days, much less avoid potential copyright issues).
My solution (on an OSX 10.10.1 platform, which seems to work so far):
Use Eclipse Juno M20130204-1200
First thing - make sure the latest Android SDK Manager is installed, 24.0.2 - and install it ONLY (or if anything else is installed, remove all of it, then install the SDK Manager 24.0.2)
Second - install the specific API desired. What I have installed for API 17:
Tools
Android SDK Tools 24.0.2
Android SDK Platform-tools 21
Android SDK Build-tools 17
Android 4.2.2 (API 17)
SDK Platform 17 3
Samples for SDK 17 1
ARM EABI V7a System Image 17 2
Google APIs 17 3
Sources for Android SDK 17 1
Android 2.2 (API 8)
SDK Platform 8 3
Extras
Android Support Library 21.0.3
The Samples and Google APIs probably aren't necessary for the class, and I may remove them.
After that's done, when on the layout view screen in Eclipse, click the button "Android version to use when rendering layouts in Eclipse" to the correct API (in my case - 17). This then seems to work. For whatever reason, this always defaults to the latest API - installed or not.
I'll proceed, hoping these items will at least get me through the section of the class dealing with Android.

Related

In eclipse I a getting the API level 20 .I want ot use lower versions of API

How to change API level. when selecting this API level it shows no CPU/ABi available and also I am not able to add text fields it throws an exception.
Image 1Image 2
In Eclipse go to manifest.xml
<uses-sdk android:minSdkVersion="int" />
In android studio: go to your app Gradle there you can find the minSdkVersion. Lower it to the version you needed.
android {
....
defaultConfig {
....
minSdkVersion 17
....
}
}
Quick Fix: Uncheck installed checkbox to see other downloads and try to refresh android sdk manager, restart it or restart the computer. API 19 worked fine for me before I moved to android studio.
I'm not sure if API 20 is supported in eclipse, I recommend Android Studio for android development. Anyway, if you have an old PC that does not meet android studio minimum requirement, download IntelliJ IDEA https://www.jetbrains.com/idea/, it's a bit lighter and free and require 1 GB of RAM (But 1 GB is very bad, you need at least 2 GB without running android emulator). However, if you still want to work with eclipse I think you need API 19 you have to download it manually from the web and move it to android SDK location. Or you can install android studio to download SDK without using it.
Newer APIs are way better, they have more libraries that supports both old and new android versions. It's really worth upgrading to Android Studio.
For the CPU/ABi error check this post Android 4.3 Virtual Device CPU/ABI - No system images installed (eclipse)

Building Android game in Unity 4.3.4 does not succeed

The build does not work.
During build I have messages:
Android SDK is outdated. SDK Platform tool version 0<16. Android SDK
is missing required platform api. Minimuim platform required is
Android 4.0 (API level 14).
This happens though:
1) I have in Android SDK manager the following installed (as seen in Android Studio):
Tools - all 12 items,
Android L (API 20, L preview) - all 7 itmes,
Android 4.4W (API 20) - all 5 items.
In particular, I have everything with API 20 installed
2) I have a correct path to main folder of Android SDK location in Unity Preferneces -> External Tools
I'll appreciate any help or hints.
Press continue the next time you get it. Keep pressing it everytime that update message pops up. It's just Unity asking you to have the latest SDK package to build with the latest improvements in Android SDK, which is not necessarily mandatory. If Android updates would come 3-4 times a week,you can't be bothered with updating so often.
And when you finally decide it's time to update, or feel like it just some time later,
open up the SDK Manager (inside android-sdk folder), and update (don't check the sources, docs, and android emulator images; you don't need them. Just check core packages and necessary google APIs.).

Android Error: This template requires a build target API version of at least 14, and the current version is 7

I installed the SDK and I like work with API 7 but when I want to create a new Activity Main I have this problem and I can't create a new Activity, thanks.
This template requires a build target API version of at least 14, and the current version is 7
In the log, I can read this:
Not targeting the latest versions of Android; compatibility modes apply. Consider testing
and updating this version. Consult the android.os.Build.VERSION_CODES javadoc for details.
I recently faced the same problem when creating the activity or while setting the new android application project and able to solve this problem in this manner.
I checked the system image folder which is in sdk/system-images,build tools folder-sdk/build-tools and found that these folder does not have the API's that i am using at Minimum required sdk,target sdk,compile with. In each of these you need to provide the API no. or Android version.
So check that the API's that you are using for(Minimum required sdk,target sdk,compile with) are installed and also check the system-images and build-tools folder should have these API's
if you have done this your problem must be solved.
You probably set Build SDK to API 7. Normally, you should set Build SDK to the highest possible API level and set the other SDK, it's called Run SDK or don't rememeber how to the minimum API version you want your application to run on.
I ran into this same issue even though I had set in my AndroidManifest.xml minSdkVerion to 13 and targetSdkVersion to 19. What fixed it for me was in Eclipse going to Project > Properties > Android then checking the highest API level in Project Build Target box (API 19 for me).

How to get more target platform options for Eclipse AVD?

Using Eclipse, trying to create a new virtual device to test app on older Android versions, but when I go to create a new Android Virtual Device I only get one option - 4.4.2 API Level 19. How do I get other versions to show here? Last night I was a bit tired and tried to if using the SDK Manager to grab 4.0.3 SDK and Google API would work to test on older version, but it seemed to mess up Eclipse as I got an ADT needs update error (which would find no updates). So starting back from scratch and figured I'd ask instead of trial and error. Thanks!
Open the Android SD Manager, check Show: Updates/New
Select SDK Platform and ARM EABI v7a System Image (also Google APIs if you are unsing them) for all Versions you want to test and download them. You need the source of the Android-Version to create an AVD for it.
Updating your Android SDK build-tools and Android SDK Platform-tools is always recommanded because newer Android versions need a newer build tool setup.

Android -- selecting API from SDK Manager

I have downloaded the Android SDK(which i think has no version, it is standard). After installing Android SDK, Android SDK Manager comes which by default selects 3 things to be downloaded (1)Android SDK tools(2)Android 4.0.3 (API 15) and the things under it like documentation, samples etc (3)Google USB driver But at present i am having book on Android 3, so should i deselect the second option i.e. Android 4.0.3 (API 15) and select all things under Android 3.0 (API 11) or keeping Android 4.0.3 will be OK for Android 3.I know there are tutorials for Android 4.0.3 on Web so why should i go for Android 3 because i find it easy through books and i got Android 3 here in my place and still no Android 4. So what should i do?
You can install everything. I would recommend to install the API level you want to develop for. But it doesn't hurt (but wastes disk space) to install everything.
Sidenote: Android 3.0 is for tablets, 2.x for older and 4.x for the latest Android Smartphone devices.
You should select the API level that you will target. For example, I am writing an application for API level 7 (Android 2.1.x), so I've got that version installed on my machine. Of course, you can have more than one API level installed, so it is safe to install any combination (for example 3.0.x and 4.0.4 simultaneously - see last paragraph for the reason).
Once you've got a few API levels installed, Eclipse will allow you to change the target API for your project to any of the versions you have installed. The same applies for the command-line project creation.
There is actually one good use-case for installing a version newer than the one you are targeting in addition to the one you use: testing. You can create an emulation environment for a newer version of the API to ensure that your application does not crash and burn when the API levels do not match. If we were to extend my above example, a sensible set of levels to install is 3.0.x, 3.2, and 4.0.4. You can target the initial release of Honeycomb (unless you need anything from the later versions), and test with both the latest Honeycomb and Ice Cream Sandwitch.

Categories

Resources