Cannot create android application using eclipse - java

NOTE: I have already fixed this problem. I used the methods described in a previous question/answer discussion. Thank you for whoever tagged this as previously answered!
It an be found here: ADT 22.2 New App Wizard: Unsupported template dependency: Upgrade your Android Eclipse plugin
Today I just downloaded and installed Eclipse via the developer.android.com tutorials. I had almost initiated my first Android Application when I came across this error:
I don't understand the error. It does not specify a required version, and my version is the most up to date version. Neither the [Install/Upgrade] nor the [Check Again] buttons appear to function. I have also tried to delete and reinstall the Android Support Library via the SDK Manager multiple times.
Can any one help me? Thanks in advance!
Note - I do in fact have both the Android Support Library and Android 4.3 installed:
*Edited to add picture and note*

How did you create your project? Steps: New -> Android Application Project? If you've done this, you should check whether you have installed "Android 4.3" and "Extras->Android Support Library" in Android SDK Manager.

Go to the Android SDK Manager, then download the required Android version, in your case, version 18 which is Android 4.3.

Right click on the project -> properties -> Android -> select a platform like 4.0

It sounds like you don't have installed android 4.3 sdk(API level 18).
Please open eclipse->windows->android sdk manager and make sure your android 4.3(API 18) status is installed.

Download from http://dl-ssl.google.com/android/repository/tools_r22-windows.zip, unzip it and replace the /tools folder with this one to downgrade the sdk tools. There's a bug in version 22.

Sorry, but someone found that this is a duplicate. I replaced my sdk/tools/templates/activities folder with a more up-to-date one, which resulted in success. The steps and files can be found here:
(ADT 22.2 New App Wizard: Unsupported template dependency: Upgrade your Android Eclipse plugin)
Thank you for all who took time to try and answer my questions. It is much appreciated!

Related

Unable to load class 'com.google.gson.JsonObject'

I am trying to include firebase SDK in my Android Studio Project. But it giving me an error. I am using latest JDK version (1.7.0_71) and it is asking for upgrading higher version to (1.7.0_67).
I need help for basic firebase setup SDK on android. I tried to setup it by the reference of following link: https://firebase.google.com/docs/android/setup#add_the_sdk.
I am getting following error: Please check attached screenshot
I had the same problem trying to GCM to an old android project.
The solution for me was to also add
classpath 'com.android.tools.build:gradle:2.1.2'
to the top-level build file dependencies, just before classpath 'com.google.gms:google-services:3.0.0'. For the old android project, this dependency only existed in the module-level build file.
Make sure you are using Android Studio 1.5 or above. Just saw a guy who had the same issue and he was using android studio 1.0.1
Updating the Android Studio will fix it for you. Also check other pre-requisites.
Prerequisites from official documentation are as follows:
A device running Android 2.3 (Gingerbread) or newer, and Google Play services 9.2.1 or newer
The Google Play services SDK from the Android SDK Manager
Android Studio 1.5 or higher
An Android Studio project and its package name
First of all complete all the steps mentioned in a link you had followed for Firebase
And note that it requires active internet connection so please check internet connection and add both project and app level dependencies as per suggested in link of Firebase you had used in question
Also it is best to use JDK version 1.8 and above because oracle officialy ended support for those versions. If you are working with Firebase Api which is quiet new so i would highly recommend as it is also recommended by most professionals including developers at Google.Or if you want to go with JDK 1.7 then update it to latest Jdk 7u80 or 7u79 at least because it has least issues comparing to older versions.
The best solution is use JDK version 1.8 and follow all the steps in link https://firebase.google.com/docs/android/setup#add_the_sdk
Ensure that you have the google-services.json file, with the client id: <effective package name>, in the app directory. This you download from the Firebase console when you add an app.

Can't find Android SDK for Eclipse with ADT plugin

I really need to setup Android development with eclipse (ADT plugin) just after format my laptop...
I know everywhere suggest to migrate to Android Studio but really NOT want to do it until next release may be next month.
It always brings to THIS PAGE and forcing to install android studio which is NOT what I am looking for at the moment.
Also I find this LINK that provides ADT plugin installation guide but after successfully install ADT plugin it's not downloading and install SDK as earlier....
Would be grateful if anyone can guide me just to set up eclipse for Android development until migrate to Android Studio in a convenient time. Thanks
I don't have first-hand experience with this, but if your ADT plugin cannot install Android SDK anymore, you can try a workaround: install AndroidStudio, let it install the SDK, and let ADT look at the same directory. I did this a number of times in the opposite direction (starting with working Eclipse/ADT, and reusing same SDK from AS).
I did the same as you, I downloaded a "stand alone" version of ADT and dowloaded every Android version that I wanted to work with.
I downloaded Eclipse Mars, opened it, then I went in the Market Place (in Tools if I remember correctly) and looked for "Android". I then downloaded the ADT (Android Developer Tool) which you can also find on this page : http://marketplace.eclipse.org/content/android-development-tools-eclipse
to clarify, the problem is ADT doesnt install the sdk folder anymore, and also, doesnt support any of the sdk manager above their last version... you can try to look up a sdk manager version that suits ADT, but good look with that. The only way to use eclipse with android sdk is to copy another eclipse well configured with de sdk manager folder, from another pc

Eclipse ADT not generating MainActivity

I am having an immensely frustrating issue with Eclipse and the ADT after updating all the SDK's, API's and Support Libraries for Android this week.
Ever since updating everything I am unable to properly create an Android Project in Eclipse. It does not generate the MainActivity.java or the main_layout.xml files at all. I have read through most of the other posts regarding this and the fixes they suggest don't seem to work. I have tried looking for the updated software by going to:
Help --> Check for updates (Everything is up-to-date).
I have also tried the manual way by going to:
Help --> Install New Software and inputting https://dl-ssl.google.com/android/eclipse/
It still says I have the latest version of the ADT.
I have also tried reinstalling the ADT plugin as well, but to not avail.
Trying to create an Activity after project creation also does not work.
Versions of software that I am running:
Android SDK Tools 24.0.1
Android API 1.5 up to and including API 5.0.1
Eclipse: Luna Service Release 1(4.4.1)
ADT Plugin Not sure
Thank you for taking the time to read this.
The ADT and SDK Tools must be compatible. The latest ADT version is "ADT 23.0.4". And the corresponding SDK Tools version is 23.0.5. You have updated your SDK Tools version to 24.0.1, but there are no ADT version can support. So you should roolback to the SDK Tool version 23.0.5.
Here is the link:
https://dl-ssl.google.com/android/repository/tools_r23.0.5-windows.zip
Add an Empty Activity, instead of Blank Activity. This will generate MainActivity.java
What is your Java version? You didn't mention about it. Please check it, it should be Java 7 for Android 5.0. If you have Java 7 then check eclipse.ini file. If it refers to Java 6 then change here also to Java 7.
Google fixed this issue and below link may help you.
https://code.google.com/p/android/issues/detail?id=82393

Updating ADT in Eclipse causes many errors

Recently I updated Android SDK Tools, Android SDK Platform-tools, Android SDK Build-tools, and downloaded new APIs Android 4.4W and Android L (both API 20).
After restarting eclipse, it required me to also update the ADT from 22.x that I had to 23.x.
I went to Install New Software in eclipse and updated the ADT to 23.0.4.
After restarting, I figured out nothing in Eclipse is working properly:
All the projects contains errors of several types:
Unable to resolve target 'android-19' until the SDK is loaded.
The type java.lang.Object cannot be resolved.
The project was not build since its build path is incomplete.
The Android SDK Manager won't open.
When I write click on a project -> properties -> Android, there're no libraries and I can't add any.
Never seen something like that. I read that more people had problems after updating the ADT but none of the solutions worked. Thanks
Some hypotheses:
Broken Android SDK + tools installation. -- Can you open the Android SDK Manager and the emulator outside Eclipse? Consider reinstalling the SDK from scratch.
Eclipse can't find the Android SDK + tools installation. -- Check the ADT preferences in Windows > Preferences > Android. See this screen shot.
Broken ADT plug-in or its state. -- Try uninstalling ADT then reinstalling it.
Broken Eclipse installation. -- Consider reinstalling it from scratch. This could be a good time to update to the latest Eclipse (Luna).
Actually, this is a good time to try Android Studio. Right now your relative cost of switching is particularly low. Android Studio will take getting used to but it's slicker, does more work for you, and is the focus of Google's Android tool development. Android Studio is in beta testing but it's stable and usable.
Do watch the video What's new in Android development tools from Google I/O 2014.
See Google's notes on Troubleshooting ADT Installation.
There are more tips for fixing the ADT installation, e.g. Eclipse Indigo Android ADT - install OK, no "Android" option in Preferences and New Project but you can rule out most of those ideas since it used to work for you.
Maybe the fix on this Ubuntu forum post is relevant. There, an Ubuntu upgrade broke ADT because of the needed GEF plugin.
To everyone which gets this problems in the future:
Do not try to struggle with it for hours, with frustrating solutions from the internet.
Simply re-installed eclipse, ADT and android SDK in about 30 mins and everything works perfect, finally.
I am using adt-bundle-windows-x86-20140321, problem occured since updating java.
But now problem already fixed after re-Extracting adt-bundle-windows-x86-20140321.

Android .R not generating - checked all common causes

After getting a new computer and setting up eclipse again, no projects are generating the .R file. The SDK is on revision 22 which I noticed some people had issues with, but setting the Private Libraries checkbox did not resolve this.
The .R isn't generating for existing projects nor brand new empty android projects. The SDK levels between the build configurations and the manifest match.
An entire uninstall of the SDK, and redownloading the Android version of eclipse and SDK didn't work as well. Could it be something with the versions of Java installed on the machine? Or is there some other common cause of the R not generating I missed after searching?
I got the same error as yours.
note:
The SDK directory architecture of 22.0.1 version is different from before.
there is not platform-tools directory and some command file move to other directory.
but,eclipse and ADT plugin does not update according with SDK
so, linking related bin to platform-tools directory will work.
above meet my error.
Update your SDK Tools from the SDK manager and ADT in eclipse, this was fixed in the latest update (22.0.1)
Also, after you update your SDK, close and reopen the SDK and check for updates again (in case you don't see 22.0.1)
Take a look here for some similar issues Class not found error after updating ADT and Android sdk tools to latest ver 22

Categories