I get this error
[2014-07-11 17:50:02 - App1] Using 1.7 requires using Android Build Tools version 19 or later; currently using 17.0.0
when i tried to use switch with strings (have to use jre version 1.7 to do this). I read on http://shuklaxyz.blogspot.com/2014/06/eclipse-error-using-17-requires-using.html that to fix this error, you have to put this line
sdk.buildtools=19.1
in your project.peoperties folder. I tried doing that but that didnt even work. I saw on the manifest that there nothing for build tools. Does anyone know a command i can use to resolve this problem?
You need to update your Android Build Tools to a later version. Unfortunately like a lot of things in the Android SDK it's not obvious how exactly you do this.
Open the Android SDK Manager
Under Tools, tick "Android SDK Build Tools 20" (or whatever the newest version is
Click Install Packages
Restart Eclipse
Related
Gradle does not work at all, even gradle -v after updating android studio (4.3.1). I'm not pretty sure Android Studio caused this issue or not.
I installed Gradle from sdkman. The Gradle version is 6.6.1. When I run any Gradle command in terminal, the process keep running but nothing display. The path is not an issue here. Computer recognize Gradle itself.
Do you know any ideas to fix the issue?
I already uninstall/install Gradle, remove .gradle folder, restart a computer, remove cache and stuff like that...
Android Studio likes to use it's bundled JDKs and SDKs by default and change the location of it's settings every few releases. It doesn't like when you try to customize settings to your preferences, even something as trivial as choosing your own default project save location.
Currently (in version 4.2.x), I could only find gradle path in global settings, which turns out that even if you set global setting for gradle path, you would still need to configure it per project level.
So for sake of sanity, forget global settings and configure it per project level.
There are some forum discussion which suggests that android studio automatically switched kotlin compiler or java compiler from your gradle settings, but there are some conflicting articles too.
If you try to discuss it on their forum, they will tell you it's bad decision to change jdk because of compatibility reasons, won't help you much. This is based on my multiple bad experiences on their forum. Choosing your own JDK, Kotlin, build-tools etc has been active sore-point with community.
PS: Kotlin compiler settings is available in Other settings.
I'm trying to get JavaFX applications to run on Android by using the Dalvik JavaFX-Android SDK (provided by the JavaFX Android porting team). So I downloaded the samples provided by the JavaFX Android porting team and have been trying to run one of them on Android without much success.
Using Eclipse with the Gradle plugin I imported the "HelloWorldFxml" sample project. Then I ran the Gradle task "./gradlew androidInstall" on the project like the README file told me. But unfortunately the task cannot execute because Gradle cannot locate my JDK:
(source: forumbilder.se)
Even though my JAVA_HOME system variable is correctly set and I havn't had a problem with it before:
(source: forumbilder.se)
Anyone that can provide some insight as to how I can fix this?
Versions: Eclipse Luna Service Release 1a (4.4.1), Gradle 2.2, dalvik-sdk-8u40-ea3, Android SDK Build-tools 21.1.2, Android SDK Tools 24.0.2
Edit: The console output when running "gradlew androidinstall" on a sample project:
Even though the error message doesn't specify it, maybe it's looking for javac in your PATH? In case it's not in there try adding ;%JAVA_HOME%\bin to the end of your PATH variable (and restart Eclipse afterwards, I've had the problem of running processes not getting changes to environment variables before).
Check the Java setting in Eclipse:
Window -> Preferences
Java -> Installed JREs
Make sure that your JDK 1.8 is listed there. If it's not, add it using the Add... button.
Once the JDK is known to Eclipse, make sure that your project's settings use that JDK as a compiler, and the Gradle plugin should be able to pick up the setting from there.
In a pinch, you should also be able to run Gradle from the command line, and it should work fine since you already set the %JAVA_HOME% variable.
Basic Note
Since the release of dalvik-sdk-8u40-ea3, and in very short time, the JavaFXPorts team has released a few new versions, all of them simplifying all the process of porting a JavaFX application to Android or iOS.
They released dalvik-sdk-8u40-ea4 and they announced the release of a new plugin, that will simplify to the minimum the steps to create a mobile application from JavaFX.
While this answer may not help the OP in his particular problem, definitely it will help him and others, since everything is really simplified.
New approach
With this plugin, there's a new way of creating the HelloWorldFxml application for Android.
The new javafxmobile-plugin allows you to generate the apk with a single 'build.gradle' file.
You can find this an other basic samples here, and download the repository here.
You won't need to edit a single line, just type this on the command line, on the root of the sample, with your device connected:
gradlew androidInstall
As for previous releases, you will need JDK8u40 and Android SDK installed. No need for dalvik-sdk though, it's retrieved by the plugin.
Notice that you can open these samples from your IDE, so you will be able to modify them, and run them locally or build again the apk for your device.
Had this problem, too.
My proberties:
-Windows 7
-Dalvik SDK (dalvik-sdk-8u60-b5)
-JDK 8 (newest Version 8_60 / IMPORTANT: JDK not JRE)
-And I tried also the HelloAndroid project provided by the Dalvik-SDK-download.
So i execute the command line: gradlew installDebug
My probelm was nearly the same.
"Fail to find JDK. Please make sure there is a JAVA_HOME or JAVA8_HOME systemvariable."
#1
Created these proberties. Just like described in this post:
How to set java_home on Windows 7?
So to make everything sure, I created both with the same path. Cause I don't know exactly which one is used by gradle.
#2
This is really the hack that helps me out. Found this also in StackOverflow.
Write in your build.gradle under the android{..} stuff this line:
retrolambda {
jdk 'C:/Program Files/Java/jdk1.8.0_60' //<--your JDK-path
}
it looks like that
Then execute the same command line again and it worked for me.
I think only the 2. steps was the solution, cause I guess gradle don't look for the variable if there is a direct path to the jdk.
Today I have update Android SDK tools & eclipse. Current SDK tools 24.0.1, Android development Tools 23.0.4.1468518, eclipse version 4.4.1. After update SDK & eclipse I create new project. In this project src folder is empty & res/layout folder also empty, activity & xml files are not creating. I have to manually create it.
I seen my answers like Link 1, Link 2 etc.
Answer like:- "
Try this
"Help" -> "Install new software" and install (this will update it) from this url: https://dl-ssl.google.com/android/eclipse/"
But I have already update it.But not solve my problem. So, How to create activity & xml automatically?
Latest
As I already said that ADT 23.0.4 and SDK 24.0.1 are not compatible to each other.
We have got another update to of Android SDK to 24.0.2 (May be their team read our this question and released an update so quickly). However this update has not been documented yet on this page but still you will be able to see it in your Eclipse's SDK Manager.
I updated my SDK to 24.0.2 and now it is working fine. You too can try to update your Android SDK to 24.0.2 and hopefully everything will work fine.
Older Answer
The ADT Plugin for Eclipse and Android SDK both should be compatible to each other for making Eclipse do such things automatically.
But it seems like ADT 23.0.4 (Released in October 2014) and SDK Tools, Revision 24.0.1 (Released in December 2014) are not compatible to each other.
We should expect an update to ADT plugin soon which will be compatible with SDK tools 24.0.1.
You can check from the documentation:
For SDK Tools, Revision 23.0.4 (October 2014) they have mentioned the following points.
Android SDK Platform-tools revision 19 or later.
If you are developing in Eclipse with ADT, note that this version of SDK Tools is designed for use with ADT 23.0.4 and later.
If you notice,
But for SDK Tools, Revision 24.0.0 & 24.0.1 (December 2014), They have only mentioned
Android SDK Platform-tools revision 19 or later.
And if you check this document then you will find for SDK 23 or earlier with each revision the compatible ADT version was mentioned but only with 24 they have not mentioned anything yet. So the compatible version is yet to come.
I had same issue but in the end had to undo my update to SDK tool to back to 23.0.4.
If you want to undo your update you can follow the following simple steps:
Download the older ADT plugin manually.
Extract the contents and copy the tools folder from there.
Go to your SDK installation directory and replace the tools folder.
Your SDK will be back to 23 version and everything will start working again.
Try running your Android SDK Manager again, install any available updates for the Tools category and after that select Help > Check for Updates from the Eclipse menu (installing any detected updates here too which should then restart Eclipse).
I was getting the same problem before and it started working again after I have Android SDK Tools version 24.0.2 installed after the above process.
Try this: when creating a new android application use "Empty Activity" instead of "Blank Activity".
This will fix the problem immediately.
Sometimes you have to reinstall eclipse after it crashes. That's why it is a good idea they made it portable. But you can try to go back from the about eclipse uninstall component. But in my experience if you blew the ini and all that maybe the fastest way is to reinstall especially when there are so many dependencies like in adt.
You can also install regular eclipse and android plugin you don't have to use only adt. And maybe eclipse is more stable like that
Another thing you need to recompile the project probably
I've tried building the CSEmptyTemplate project in eclipse for android but have run into a host of issues with it.
Looking at the documentation, it doesn't appear as if it should be this difficult.
Firstly, I've installed cygwin and installed the devel package to get make.exe and gcc compilers. I'm also using cygwin as part of the tool chain.
However, the error I keep getting is 'make: *** No rule to make target `all'. Stop.'.
Any advice on fixing these issues would be appreciated.
edit: Found the make files. I was just an idiot last night when working on this.
There shouldn't be any additional steps required to build Chilli Source for android on windows, just the simple steps listed on the website here: http://chilli-source.chilli-works.com/docs/?page_id=67
However setting up the Android Development Tools with the NDK can be a bit of a pain. Judging by the error your getting my gut feeling is that something isn't set up correctly there.
Chilli Source requires the latest versions of the SDK, NDK and ADT. Can you ensure you have:
Android API level 21.
The latest versions of the Built Tools, Platform Build Tools and Google Play Services.
NDK revision 10c.
The latest ADT is also missing a couple of things that means it can't be used out of the box.
It doesn't come with the native dev tools which can be acquired by doing the following:
Go to "Help" then "Install New Software..."
Select "Android Developer Tools Update Site - https://dl.google.com/android/eclipse". You make have to edit it to instead point to https://dl-ssl.google.com/android/eclipse
In Developer Tools select and install Android Native Development Tools.
It also doesn't come with ant. This isn't causing your issue, but it will cause issues later on, so get it following these steps:
Go to "Help" then "Install New Software..."
Select "Juno - http://download.eclipse.org/releases/juno"
In General Purpose Tools select and install Eclipse Plug-in Development Environment.
Now that you've got everything required, ensure that you've got it set up correctly:
The correct version of the SDK selected the Android tab in preferences.
The correct version of the NDK selected in the Android/NDK tab in preferences.
Android 5.0 selected in the Android tab in Project Properties.
Finally, on windows you also need Cygwin. It's been a while since I've used it (I'm not a fan of cygwin so I do my Android development in a Ubuntu virtual machine) but only the "devel" package is needed iirc, so make sure you've at least got that.
Hopefully ensuring all of that is set up correctly will fix your problem!
I have been trying to setup LibGDX on Eclipse (4.3). I followed the instructions here: https://github.com/libgdx/libgdx/wiki/Prerequisites and installed both ADT plugin for Eclipse and the Google Web toolkit successfully. Then I used the libgdx-ui.exe to create the libGDX project and on creating it, I see errors in Eclipse.
I am pretty sure I have installed the plugins properly and I have JDK 7 as well.
Any help would be greatly appreciated.
Thanks :)
It seems I have not installed the GWT plugins properly. But on trying to install it from the link, the option to install the SDK does not appear in the list.(Please check the image in the last comment I posted).
1) Android requires (before kitkat) jdk 6. It won't work with jdk 7.
2) After installing ADT plugin, you also have to open android sdk manager and download required api files.
These two should fix your android and java.lang.Object issues. It's better to test an android app on this setup (without libgdx) first.
3) Right click on all warnings regarding classpath entries, eclipse will provide you automatic quick fixes.
If the issue stays after this, the problem is with gwt sdk installation. Now you can follow The project XXX does not have any GWT SDKs on its build path. It should work smoothly as other problems won't interfere with it now.
Hope this helps.