I have an android project in Eclipse I started developing in android version 2.2.? (i think). I want to update the project to run on my 2.3.3 device. Is there a way to upgrade the project or do I need to create a new one?
So based on your question... I just want to say that an Android 2.2 application will run on your 2.3.3 device without changes. (i.e., applications are forward compatible)
If you still want to change your platform version, read on.
Right click your project in the Project Explorer pane and select "Properties." The window that comes up will look like the following and you can select a different platform target.
If your project then reports some property related errors in the Problems pane, you can fix those by right-clicking your project again and selecting the Android Tools --> Fix Project Properties menu item:
There's a uses-sdk element in your AndroidManifest.xml file, the minSdkVersion attribute should always be set to something, especially if you're going to put your application in the Android Market. The corresponding API levels for Android are well documented.
I did this myself recently in the Eclipse IDE.
If you right click the project and view properties. There is a tag where you can select the target framework (2.2.?, 2.3.3, etc.) Unselect 2.2 and select 2.3.3.
At this point, if you were to save and reopen the project, it would tell you that some properties are messed up. If you right click the project again, and one of the last few menu buttons will have text along the lines of "Fix Project Properties". Click that option and afterwards everything should work correctly.
I can't add comments yet (apparently), but wanted to add to the above answer.
Yes, as noted above, you can edit project properties to bind to a new target android framework version. Under Properties, the heading on the left you want to pick is "Android". And you don't "unselect and select", you simply check the target framework you want (you can only have one active, they are really radio buttons, not checkboxes!).
Related
I have been using Android Studio, that worked like a charm. Then I reinstalled my computer and switched to IntelliJ, but I kept the SDK on SD card so I don't have to re/downloading it.
It works, I can build an app, but layout editor is not working. I cant select rendering target.
Here is what I see.
When I open the dropdown menu to select rendering target it says just: <null>.
Any ideas?
First download proper SDKs in the SDK manager, and then you need to select the device on which you want to preview. To do so, click on the icon of the two little phones left of the AppTheme above the editor.
You need to have properly configured the IntelliJ project with the Android SDK.
Check your Project Settings at Ctrl+Shift+Alt+S.
Also check your Gradle settings to see if your SDK version has been defined there.
I have recently update my ADT to rev. 20, but now I find that newly created project always included the android support library. I don't want to use the FragmentActivity class, which is defined in the support library, I just want to use the pure Fragment class.
I tried to delete the support library via the SDK manager tool, but now I cannot create any projects since the ADT is reporting
This template depends on the Android Support library, which is either
not installed, ......
Is there any method to by pass this except for create a project by shell command?
Go the SDK_Folder/extra/android and rename the folder compatibility to support. After that, restart the Eclipse.
Well, it's not ideal but until they fix ADT there at least appears to be a manual way to get there.
Create the Android project with a min SDK of ICS. Skip adding an Activity when the wizard prompts to add one. Yes, annoyingly, it still adds the Support Library.
After the project is created, open the project properties and go to Java Build Path.
On the Libraries tab select Android Dependencies, click the Remove button, and click OK.
In package explorer expand the "libs" folder and delete the support library jar.
I believe this gets you an ICS project without the unnecessary support library.
Since you deleted the support library from within the SDK Manager, click the "Install/Update" button on the screen that you're describing. This time it will let you move forward.
EDIT Clarification. The projects you're creating require the Support Library because you have created the project using a Application Templates. Read on for my answer Space Cowboy.
ADT R.20 now has Application Templates which creates a bit of the boilerplate for you. If you don't need a template, all you need to do is uncheck "Create Activity" when you get to the Create Activity screen of the New Android Project wizard.
I have noticed that there is a bit of a bug in the wizard. If you click next in the wizard at Create Activity and then click back to come back to this screen, the Finish button will be disabled. Even if you check/uncheck Create Activity the button will still be disabled, so you won't be able to create an empty project at this point. At this point you can simply cancel the wizard and start again.
Don't just rename the compatibility directory to support. This is addressed in http://code.google.com/p/android/issues/detail?id=33859 items 31 and 34. Use the SDK manager to remove the support library then use it to add it back in. Otherwise you may have other problems down the road.
Make a new folder name compatibility copy items from support and pate it in compatibility folder will resolve the issue
In old version of Eclipse and Android SDK when I wanted develop an android app I used to open "New" and then "Android Project."
Now in the new version it changed to Android Application Project and this makes me confused. There are so many opened packages and folders. I would like to only create an android project, not android application project.
I am new and I would like it as simple as possible, something like this:
Not this (newer version of "New Android Project" menu:
The new project wizard in ADT version 20 can indeed be a bit confusing. Suggestions:
In the first screen it is mostly the same other than a change to dropdown lists for the version selection.
If you don't want to see the second screen picking a launcher icon, uncheck "create custom launcher icon" on the first screen.
On the last screen, if you want to make a project that works on older versions without the compatibility libraries (ie, make an old style project) then uncheck "create activity".
If you do File - New - Project - Android you can get at the options for creating from a sample or existing code. If you pick an older target you can pick an older version of the samples.
Ok, found a solution here:
http://droiddudes.com/2012/07/12/unable-to-create-android-project-in-eclipse-with-adt-20/
Delete Android Support Tools (version 9) from ADK.
Run App wizard again -- it will complete that it requires Version 8 -- confirm you wish to install. Version 9 gets (re)installed. Dialog completes.
Next time you run it there are no errors, and if you look in ADT manager it is in there (again.)
Update: Worked for "test" project then failed for my new real project which has SPACE in the name -- changed the PROJECT NAME (not the app name) to remove the space and the wizard completed correctly.
How to change the version of android application. i did entire code in Android 2.2 version, if i want to install the apk in 2.1 version, it getting parse error. How to change the versions of application. I dont know how to solve this issue. pls guide me to solve this problem.
if you are using eclipse it's very easy
go in eclipse project explorer
then right click on properties
select android from tree view
select your appropriate version.
and then in
in menifest file change
minsdk to 2.1
If you are using eclipse change value in manifest and build target in project configuration (Right click on project->Properties->Android-> Select that one which you need.
You have to also know that there can be some problems because of different version.
Check also this one Android Developer
I started writing my first Android app, and chose SDK 2.0.1, before I had an android phone.
I wantto test the app on a phone that is Android 1.6. The app itself uses pretty simple stuff, so I'm sure its 1.6 compatible, but I want to change the SDK level from Eclipse.
The "default.properties" file in my project tree and naively tried to change from Android 6, but it isn't changeable, but if I try to change it it tells me to change the build.properties of the project. I don't know what that means. I'm not used to eclipse and am still fumbling around it.
I went to the project properties and clicked on "Java Build Path", but from there I don't know how to add,remove or edit the libraries.
Basically, I'm asking how to downgrade my project from inside eclipse, so I can export it to a compatible phone.
You can actually keep the project's targetSDK at the same level, and just use a minSDK value.
What this means is that your application will target to build against a certain API, but it will let phones with lesser versions of Android than that API to also run the app. The catch is that you have to make sure you don't make any API calls that don't exist in the older versions of Android.
To change this, go to your AndroidManifest.xml and add the following inside of the xml node:
<uses-sdk android:minSdkVersion="3" />
This would set your minsdk to Android 1.5. Change it 4 for Android 1.6 and so on.
But if you really want to change the TargetSDK, right click on your project --> properties. Then click the Android tab on the left. Then check the box of the target API you want to build against.
Some more versioning info can be found here.
You can change your the Build Target for your project at any time: Right-click the project in the Package Explorer, select Properties, select Android and then check the desired Project Target.
PS : I'm on Eclipse Helios
http://developer.android.com/guide/developing/eclipse-adt.html