Eclipse - Java - Parsing Data for android-23 failed - java

I have an Android project based on Cordova (Phonegap), which, for security reasons, had to be updated to Cordova 6.0.0 and Android platform 5.1.1.
After performing the Android platform update, I noticed that the API for both - the Android project and CordovaLib had been changed to API 23 (Android 6.0) automatically. I installed all the other files of Android 6.0 via SDK Manager.
I can't seem to build the project any more because the CordovaLib project doesn't have the .jar file hence, the it never gets build to begin with.
Here are some additional information about my environment -
JAVA-HOME = jdk1.7.0_79
Eclipse->Widows->Preferences->Java->Compiler = 1.7
Eclipse->Widows->Preferences->Java->Installed JREs = jdk1.7.0_79
Running Eclipse Kepler Java EE IDE for Web Developers
I restarted Eclipse and got this error -
Parsing Data for android-23 failed
Unsupported major.minor version 51.0
Thanks.

So apparently, anything > API 21 is not supported by Eclipse ADT anymore. Google moved to their own IDE, Android Studio. Installed SDK for API 23 and used Android Studio and everything worked fine.

Related

Cannot determine path to 'tools.jar' library for Android API 21 Platform (/home/user/Android/Sdk)

I am a newbie to Android development.
I installed the Android studio at Ubuntu 20.04.
I have installed Java (I know that the installation was ok since I used it also at Tizen development)
I try to build a project, but an error occurs:
Cannot determine path to 'tools.jar' library for Android API 21 Platform (/home/user/Android/Sdk)
I manually copied the tools.jar file into the sdk directory but nothing changed.
Any ideas?

Android SDK license issue prevents build of LibGDX project in IntelliJ

After reinstalling Windows 10, I am desperately trying to get my LibGDX project to run in IntelliJ again. It will not build because of an Android SDK license issue.
I reinstalled Android Studio and the Android SDK 27, which I had been using in my project before, but I got the following error message:
A problem occurred configuring project ':android'.
Failed to install the following Android SDK packages as some licences have not been accepted.
platform-tools Android SDK Platform-Tools
patcher;v4 SDK Patch Applier v4
platforms;android-27 Android SDK Platform 27
build-tools;27.0.3 Android SDK Build-Tools 27.0.3
emulator Android Emulator
tools Android SDK Tools
I found the following thread with lots of suggested fixes:
"Failed to install the following Android SDK packages as some licences have not been accepted" error
So I learned that I have to run
%ANDROID_HOME%/tools/bin/sdkmanager --licenses
It did not work at first because the file /users/MYUSERNAME/.android/repositories.cfg was missing. I created an empty file at that path, ran sdkmanager again and accepted all licenses. However, I still get the same error when building my LibGDX project in IntelliJ.
Here is what I have tried to resolve this issue:
Ran sdkmanager --licenses with administrator priviledges
Ran sdkmanager --update instead of --licenses
Installed the Android command line tools and used that sdkmanager batch file instead
Made sure that the %ANDROID_HOME%\licenses folder exists and contains license files
Made sure that there is not another Android SDK installed on my machine that I am not aware of - both ANDROID_HOME and ANDROID_SDK_ROOT (I read that the former is outdated) environment variables point to the same folder that is also configured as Android SDK location in the Android Studio SDK Manager and as an Android SDK home path in my IntelliJ project settings
Selected the JRE that comes with Android Studio as the standard Java runtime environment on my machine (by setting JAVA_HOME to C:\Program Files\Android\Android Studio\jre)
Uninstalled the API 30 SDK that was automatically installed with Android Studio, so I would only have API 27 left
Tried using the API 30 SDK instead of API 27 by configuring it in the android\build.gradle file of my LibGDX project
Uninstalled Android Studio, removed the SDK folder and reinstalled everything
Added yes | sdkmanager --licenses to my gradlew.bat
None of these seemed to help. When I run sdkmanager --licenses again, the response is
All SDK package licenses accepted.
but IntelliJ keeps saying the opposite.
I am out of ideas how to resolve this. Any help would be highly appreciated.
The issue was most likely due to an incompatibility of the outdated Gradle version with some other dependency, possibly the Android SDK. I resolved it by migrating my project to the newest LibGDX version (1.9.11).
My game would not run with the Gradle wrapper configured in gradle/wrapper/gradle-wrapper.properties (version 5.4.1) because I got another error message ("Could not open cp_init remapped class cache"), so I switched to the latest Gradle version, which is locally installed (6.5.1): Settings -> Build, Execution, Deployment -> Build Tools -> Gradle -> Use Gradle from: Specified location
I also downloaded the Android API from 30 to 29, as that is the version recommended for use with LibGDX 1.9.11. However, I did not have to use the command line tool to accept the licenses anymore.

NativeScript: Cannot find a compatible Android SDK for compilation. To be able to build for Android, install Android SDK 22 or later [duplicate]

I've installed NativeScript and I try to do tns platform add android but it doesn't work. ANDROID_HOME path is correct and I have installed SDK (API 22 and the newest one) and tools (25.0.2). When I run tns doctor it says:
WARNING: The Android SDK is not installed or is not configured properly.
Cannot find a compatible Android SDK for compilation. To be able to build for Android, install Android SDK 22 or later.
You need to have the Android SDK Build-tools installed on your system. You can install any version in the following range: '>=25.0.2'.
You need to have Android SDK 22 or later and the latest Android Support Repository installed on your system.
The current version of NativeScript 2.5.2 requires certain tools to be in the Android home directory so that it can detect them. The newest version of Android SDK (Mar 2017) actually removed the primary android support file and moved several binary files into other directories to clean things up.
Unfortunately this causes NativeScript to not be able to detect that you have the SDK. This version of the SDK came out AFTER the current version of NativeScript.
The simplest way to fix this that I can think of is to start from the command line; sdkmanager then choose to download the older 25.2.3 tools.
To manually do this; you would need to delete everything in your sdk/tools folder and download:
https://dl.google.com/android/repository/tools_r25.2.3-windows.zip (Windows)
https://dl.google.com/android/repository/tools_r25.2.3-macosx.zip (Macintosh)
https://dl.google.com/android/repository/tools_r25.2.3-linux.zip (Linux)
Then extract these into that sdk/tools directory.
I solved this using the SDK manager in Android Studio, having already installed it previously, install all the requirements, namely
tools,platform-tools,android-25,build-tools-25.0.2,extra-android-m2repository,extra-google-m2repository,extra-android-support
Once installed change your ANDROID_HOME environment variable to point to this SDK manager. Typically, it will be at (/Users//Library/Android/sdk)
export ANDROID_HOME=/Users/<user_name>/Library/Android/sdk
Confirm that NativeScript detects your changes by running
tns doctor

IntelliJ IDEA 12 - Incompatible Android version error

I'm starting out Android development with IntelliJ IDEA 12.0.
I have installed and configured JDK and Android SDK. I wanted to target Android SDK 2.3.3 so the SDK is configured as in the screenshot.
When I try and run the project though, I'm getting the following error:
android-validator: [untitled] Incompatible version of Android SDK Platform-tools package. Min version is 11. Please, update it though SDK manager
Followed by
android-validator: [untitled] Incompatible version of Android SDK Tools package. Min version is 19. Please, update it though SDK manager
I wasn't able to find any information on this and not sure what this means. Any pointers is appreciated.
--New project config--
--Install Android Packages--
android-validator: [untitled] Incompatible version of Android SDK
Platform-tools package. Min version is 11. Please, update it though
SDK manager
Because you have revision 10 and the IntelliJ IDEA tool needs revision 11
android-validator: [untitled] Incompatible version of Android SDK
Tools package. Min version is 19. Please, update it though SDK manager
Because you have revision 16 and the IntelliJ IDEA tool needs revision 19
The mentioned minimal revisions are requirements for IntelliJ IDEA to provide Android tools and to compile your applications. You should definitly launch again the Android SDK Manager and check the Tools folder, as on your screenshot, and click on "Install 2 packages".
I had the same issue. I updated "Android SDK Platform-tools" but it didn't work.
After that I realized that in the past I set c:\Android\android-sdk as the SDK folder. But the SDK manager was updating the folder named c:\Documents and Settings\my.user\Local Settings\Application Data\Android\android-sdk So IntelliJ was checking the old folder.
Problem solved after changing to right folder. So be sure that you set new folder if you have such issue. Check help documentation for setting the SDK folders: http://www.jetbrains.com/idea/webhelp/configuring-global-project-and-module-sdks.html

unable to get ADT plugin for Eclipse Helios: Conflicting Dependencies

I have Eclipse Helios 3.6 and it was working fine for my Java based web-apps.
But now i thought of developing android app for the same I finished downloading Android SDK and was on the verge of installing the ADT in Eclipse for Windows 7 from this site->
https://dl-ssl.google.com/android/eclipse but it didn't worked.
After putting above address in Install a new software under eclipse it shows both Developer tools and NDK plugins and then on clicking NEXT it is showing :
Android DDMS 21.0.1.v201212060256-543035
Android Development Tools 21.0.1.v201212060256-543035
Android Hierarchy Viewer 21.0.1.v201212060256-543035
Android Native Development Tools 21.0.1.v201212060256-543035
Android Traceview 21.0.1.v201212060256-543035
Tracer for OpenGL ES 21.0.1.v201212060256-543035
all selected but in with error :
"Cannot complete the install because of a conflicting dependency.
Software being installed: Android Hierarchy Viewer 21.0.1.v201212060256-543035"
so unable to proceed.
I tried all possible solutions like trying updating Eclipse but that too started showing error.
I advice you to use the latest version of eclipse here and the latest version of SDK and ADT

Categories