Android studio gradle error in Java - android

I am new to android programming (I have some knowledge about programming in Java, though). I downloaded Android Studio 1.3.2. I also installed Java 8 (jdk1.8.0_60). Then I installed Android Studio. I was following the tutorial in developer.android.com. I created a new project. But then the Gradle showed me an error.
"Error: Gradle 2.4 requires Java 6 or later to run. Your build is currently configured to use Java 5."
How do I fix this?

File->Other Settings->Default Project Structure
set JDK Location to Java 6 or later there.

Updating the project structure did not work for me. I had to upgrade by Android Studio from 2.0 to 2.2 to get it working. Also, to be safe I did not import settings from my previous version during my initial Studio set-up.

Related

Android Studio 3.6.1, Could not create an instance of type org.gradle.internal.locking.DefaultDependencyLockingProvider

I'm facing problem with the latest version of Android Studio which is 3.6.1. I have a project which was develop using Android Studio 2.1.2 and now I decide to switch to use the latest version. After I update my project file to latest version follow the instruction of the Android Studio, I cannot sync my gradle. Here is the error I'm facing
Try 'import' rather than 'open' old projects when using any latest version of Android Studio. If it still fails, perhaps create a new project and port the existing codes over. The versions are too far apart from 2.1.2 to now 3.6.1.
Change the jdk Version to 9.0.4
This worked for me.

Android Studio 3.1 Canary 3 - Gradle project sync failed

Using Android Studio 3.1 Canary 3 for Android application development using Kotlin, whenever the studio is opened, I get the following error
Gradle project sync failed. Basic functionality(e.g editing debugging) will not work properly
It is not the issue relevant to the built-in kotlin in Android studio version3.0 and above but the Kotlin plugin's
This is a common issue that occurs when you import all the settings from your old version of Android Studio (where you would have already installed Kotlin in plugins) to Android Studio 3 and 3.1
So, to rectify the issue go to
Preferences -> Plugins -> Search for Kotlin and Uninstall
since we have built-in Kotlin support in the latest Android Studios, we may not need this Kotlin plugin anymore
Hope this helps!

Not able to create a Module using Android Studio 2.1.1

Anyone have any ideas why this is happening? In Windows, when I right-click on the root of my project, I go to New -> Module. This is what I am shown
It used to be a lot more simpler and actually auto-generate a proper Android Module, complete with directories.
I have the latest version of Android Studio installed. Here is the version I have.
I was expecting to see something along the lines of the following:
Problem cannot be reproduced in the latest Android Studio 2.2.1 Canary that was announced today at Google I/O.

Migrating to Android Studio including libpd

With the release of Android Studio 1.0 (AS) i want to migrate from Eclipse. Generally I need no other library then libpd (PureData) for Audio synthesis. The Problem is, that libpd for android is geared to the needs of Eclipse. So in Eclipse everything is working as expected.
The only information I could found was that: Using libpd in Android Studio So I know libpd and Android Studio could work together but here are maybe some other problems.
I started to generate a new simple project (MinSDK 10 - CompileSDK 21 - BuildTools 21.1.2) just with a blank activity. I can deploy this simple app to my Nexus and everything is fine.
Then I import :PDCore and :AndroidMidi as Module into my AS project and I get the Gradle build-error: Error:The SDK Build Tools revision (17.0.0) is too low for project ':PdCore'. Minimum required is 19.1.0
I installed API 19 and Build Tools version 19.1 via the SDK Manager but that's not solving my problem.
I changed the buildToolsVersion of the apps build.gradle file to "19.1.0" but that's not solving my problem.
Any advices to get Gradle working probably?
Maybe anyone got a sample Android Studio project with libpd to share?
Thanks in advance!
FYI: I wrote some posts regarding migrating to Android Studio using libpd. Take a look here:
http://www.journal.deviantdev.com/using-libpd-with-android-studio/
http://www.journal.deviantdev.com/update-using-libpd-with-android-studio/
http://www.journal.deviantdev.com/sample-libpd-android-studio/
You have to change the build.gradle of the :PDCore and :AndroidMidi modules. At the moment they are using 17, update the BuildTools to the newest version (21.1.2). This should solve your problem.
I created a fork of the libpd-for-android and migrated it to Android Studio. You can clone it and open it in Android Studio as a 'Non Android Studio Project'. This worked very nicely for me and you can also now created an .aar file and use it in your Android App ( instead of copying the whole code or using git submodules):
https://github.com/tkirshboim/pd-for-android

Plugin cannot be resolved to a type issue - after 3.1 to 3.3 Cordova upgrade

I am having issue similar to here.
I upgraded from cordova 3.1 to 3.3 because I wanted to use the remote debugging offered in 3.3 and androind 4.4 but now all the JAVA packages are broken for an unknown reason.
having just very basic skill in java I have no idea what is going on.
In cordova 3.3 the cordova api is no more in a jar but in a separate project.
If not already done, do cordova platform android
Then in eclipse re-do "import existing android project into workspace" and you should a second project named CordovaLib.
If cordova-3.1.jar is still in the libs folder, remove it.

Categories

Resources