Incorrectly installed ADT plugin on eclipse - java

I recently installed ADT plugin on eclipse juno with jre7. After restarting eclipse, I never saw the expected "Welcome to Android Development" window. In eclipse installed software tab, I see Android DDMS, Android Development Tools, Android Heirarchy Viewer, Android Traceview, Tracer for OpenGL ES all with version 22.2.1.v201209180102-833290. However, in my Configuration error log, I see
!ENTRY org.eclipse.ui 2 2 2013-10-12 07:23:56.828
!MESSAGE Invalid preference category path: com.android.ide.eclipse.preferences.main (bundle: com.android.ide.eclipse.base, page:
com.android.ide.eclipse.common.preferences.UsagePreferencePage)
and I can't find the Android plugin configuration view in Preferences. I have tried starting eclipse with the -clean option and running eclipse as administrator but the problem remains.
Can anyone help?

Assuming you as a beginner, please download ADT bundle for windows from:
http://developer.android.com/sdk/index.html#win-bundle
As the documentation here says:
With a single download, the ADT Bundle includes everything you need to begin developing apps:
Eclipse + ADT plugin
Android SDK Tools
Android Platform-tools
The latest Android platform
The latest Android system image for the emulator

Related

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.

I have a issue when trying to build Android version in Unity3d

I have tried building my app in Unity3d in both Gradle and Internal but both times I get errors at the end of building processes. I also have some plugins in my app so I tried changing SDK and made sure all the plugins are imported into my assets but that didn't help.
Error when build system is Gradle:
CommandInvokationFailure: Gradle build failed.
C:/Program Files/Java/jdk1.8.0_181\bin\java.exe -classpath
"C:\ProgramFiles\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\
gradle\li
b\gradle-launcher-4.2.1.jar" org.gradle.launcher.GradleMain "-
Dorg.gradle.jvmargs=-Xmx2048m" "assembleRelease"
stderr[
Note: C:\Users\Hendrik\Desktop\POOWA-
master\Temp\gradleOut\src\main\java\com\google\unity\ads\Banner.java uses or
overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':transformDexWithDexForRelease'.
> com.android.build.api.transform.TransformException:
com.android.ide.common.process.ProcessException:
java.util.concurrent.ExecutionException:
com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]:
65536
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --
debug option to get more log output.
* Get more help at https://help.gradle.org
Error when build system is Internal:
CommandInvokationFailure: Failed to re-package resources.
E:\sdkandroid\build-tools\27.0.3\aapt.exe package --auto-add-overlay -v -f -
m -J "gen" -M "AndroidManifest.xml" -S "res" -I
"E:/sdkandroid\platforms\android-28\android.jar" -F bin/resources.ap_ --
extra-packages
These are not complete errors, but I think these still should show what's wrong. I could also provide more if needed.
Have you tried this?
Android environment setup
Whether you’re building an Android application in Unity or programming it from scratch, you must set up the Android Software Development Kit (SDK) before you can build
and run any code on your Android device.
Install the Java Development Kit
Download and install the Java Development Kit (JDK). Unity requires the 64-bit version JDK 8 (1.8).
Download the Android SDK
You can install the Android SDK using command line tools orthrough Android Studio. Android Studio provides an easy to use GUI based tool, but installs additional software on your computer. Using the command line tools is a smaller download and does not install additional software, but it can be more challenging to use.
2a. Install the Android SDK using the command line tools
Install or unpack the Android SDK. After installing, open the Android SDK Manager and add: at least one Android SDK Platform, the Platform Tools, the Build Tools, and the USB drivers if you’re using Windows.
To install an Android platform SDK and the associated tools:
Download the Android Software command line tool.
Unzip the tools folder to a location on your hard drive.
Open a command-prompt window.
Navigate to the bin folder in the location where you unzipped the tools folder: “install folder” > tools > bin
Use the sdkmanager command line tool to retrieve the list of packages that you can install. The installable packages include the Platform SDKs, Build Tools, Platform tools, and other tools.
sdkmanager –list
Select a version of the Platform SDK to install. Platform SDKs take the following form in the list: platforms;android-xx. The xx indicates the SDK level. The larger the number, the newer the package. Typically, you can install the latest available version. But, there might be cases in which Google has released a new version of the SDK that causes errors when you build your Unity Project. In that case you must uninstall the SDK and install an earlier version. The general format of the command for package installation is sdkmanager . You can install the corresponding Platform Tools and Build Tools at the same time.
Example: sdkmanager “platform-tools” “platforms;android–27” “build-tools;27.0.3”
If you are running on Windows, install the USB device drivers.
sdkmanager “extras;google;usb_driver”
This installs the SDK in a directory named “platforms” in the directory in which you unzipped the tools folder. Example: c:\\platforms
2b. Install the SDK using Android Studio
Install Android studio from the Android developer portal. The Android developer portal provides detailed installation instructions.
When installing the Android platform SDK and other tools, you can typically install the latest available version. There might be cases in which Google has released a new version of the SDK that causes errors when you build your Unity Project. In that case you must uninstall the SDK and install an earlier version.
Install the associated Platform and Build tools at the same time. If you are running on Windows, install the USB device drivers.
Enable USB debugging on your device
To enable USB debugging, you must enable Developer options on your device. To do this, find the build number in your device’s Settings menu. The location of the build number varies between devices. The stock Android setting can be found by navigating to Settings > About phone > Build number. For specific information on your device and Android version, refer to your hardware manufacturer.
Build number as displayed in Android 5.0 (Lollipop) on a Samsung Galaxy Note 3
Build number as displayed in Android 5.0 (Lollipop) on a Samsung Galaxy Note 3
Note: On Android versions prior to 4.2 (Jelly Bean), the Developer options aren’t hidden. Go to Settings > Developer options, then enable USB debugging.
After you navigate to the build number using the instructions above, tap on the build number seven times. A pop-up notification saying “You are now X steps away from being a developer” appears, with “X” being a number that counts down with every additional tap. On the seventh tap, Developer options are unlocked.
Connect your device to your computer using a USB cable. If you are developing on a Windows computer, you might need to install the a device specific USB driver. See the manufacture web site for your device for additional information.
The setup process differs for Windows and macOS, and is explained in detail on the Android developer website. For more information on connecting your Android device to the SDK, refer to the Running Your App section of the Android Developer documentation.
Go to Settings > Developer options, and check the USB debugging checkbox to enable debug mode when the device is connected to a computer via USB.
Developer options as displayed in Android 5.0 (Lollipop) - Samsung Galaxy Note 3
Developer options as displayed in Android 5.0 (Lollipop) - Samsung Galaxy Note 3
4. Configure the Android SDK path in Unity
The first time you create a Project for Android (or if Unity later fails to locate the SDK), Unity asks you to locate the folder in which you installed the Android SDK.
If you installed the SDK using the sdkmanager, you can find the folder in \platforms\.
Example:
c:\\platforms\android–27
If you installed the SDK when you installed Android Studio, you can find the location in the Android Studio SDK Manager. To open the SDK Manager from Android Studio, click Tools > Android > SDK Manager or click SDK Manager in the toolbar.
SDK Manager toolbar button
SDK Manager toolbar button
To change the location of the Android SDK, in the menu bar go to Unity > Preferences > External Tools.
Download and set up the Android NDK
If you are using the IL2CPP
scripting backend
for Android, you need the Android Native Development Kit (NDK). It contains the toolchains (such as compiler and linker) needed to build the necessary libraries, and finally produce the output package (APK). If you are not targeting the IL2CPP back end, you can skip this step.
Download Android NDK version r13b (64-bit) from the NDK Downloads web page. Extract the android-ndk folder to a directory on your computer and note the location.
The first time you build a Project for Android using IL2CPP, you are asked to locate the folder in which you installed the Android NDK. Select the root folder of your NDK installation. To change the location of the Android NDK, in the Unity Editor, navigate to the menu: Unity > Preferences to display the Unity Preferences dialog box. Here, click External Tools.

Eclipse - Java - Parsing Data for android-23 failed

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.

Error when installing Android ADT on Eclipse

I am trying to install the android ADT for Eclipse from http://developer.android.com/sdk/installing/installing-adt.html
And get the following error:
If it helps, I am running windows 8.1 and using the latest version of Eclipse. Thank you.
from the Icon of your Dialog I see that you are running Eclipse 4.4. Unfortunately, Android ADT doesn't seem to be supported by that version. Check out this thread as well: Google adt/gwt support for eclipse 4.4 (Luna)

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