Could not determine Java version 9.0.4 - android

I am a new developer and have recently installed Android studio 3.0 on my Windows 10 device with Java JDK version 9.0.4 installed but after installing, the app shows a problem:
could not determine java version 9.0.4
and shows a Gradle sync problem.

This issue was in gradle version lower than 4.3, so update your gradle.properties to 4.3 or above:
distributionUrl=https://services.gradle.org/distributions/gradle-4.4-all.zip
Why this error occur?: Because of you have different JDK on your system than your android-studio JDK version.
Therefore your JDK should be compatible with each other, and by following this way you can manage that:
File -> Other settings -> Default project structure
You can use embedded JDK or use your own.

Related

How to get gradl sync going again on Android Studio 3.1

After having this issue on Mac OSX, I reinstalled everything for Android Studio. (Studio itself, SDK's), ... Gradle Sync just does not work anymore. Anybody experiences this also? JAVA SDK Installed is 1.8.0_161.
"Uninitialized object exists on backward branch 70" on gradl sync (see screenshot)
error
android studio version
Bintray was experiencing an outage this morning. This is where a lot of Gradle's Android dependencies are hosted, so it was most likely affecting your Gradle Sync Process. Keep an eye on the status page here, and try again if it turns green. http://status.bintray.com/
This is a bug of JDK old versions. Go to the project structure and change your project to latest JDK version like 1.80_72 or later
After upgrading my Android Studio (on Ubuntu 14.04) to version 3.1.4 I also experienced a build problem:
Gradle sync failed: Uninitialized object exists on backward branch 70
Exception details: error in bytecode
Found out it was due to an old JDK version I have installed locally.
Instead of updating my local JDK I changed the project settings to use the embedded JDK, which, by the way, Android Studio says is the recommended option, and that solved the problem.

Error when building android APK

I have Android-studio 2.3.2 (which is android-studio-ide-162.3934792-linux.zip) installed, which is the latest stable version. I am using fedora 24. I am using meteor 1.4.4.2
When I build an APK using "meteor build" I get this error:
While building Cordova app for
platform Android: Could not find gradle wrapper within Android SDK.
Might need to update your Android SDK. Looked here: ~/Android/Sdk/tools/templates/gradle/wrapper
It seems to me the path to gradle wrapper has changed on the latest version of Android-studio. I don't have a previous version of Android-studio to prove this though. I've searched for previous versions of Android-studio and could not find them. I have searched for a solution but there is no one out there who seems to be solving this issue.
You will find a solution in this other thread and some explanation in this answer
The explanation is that the linux version of cordova does not search for gradle in the Android studio install folders like for Windows (and even for windows it does not find it if android studion is not installed in c:\program files\android\android studio) or Mac .
On Linux (and maybe for Mac&Windows in future versions of Cordova), you have to install a version of gradle and add it to your path (way to install gradle depends on the version of Linux you're using)
The behaviour was different in the past because android sdk was not inside Android studio like it is now. You could find gradle in the ANDROID_HOME/tools folder.
With recent upgrades, Android SDK structure has changed and it is now part of android studio.
Installing android-sdk_r24.4.1-linux.tgz which installs version 25 or higher version by default solved the problem for me. Because I could not find a way to uninstall Android Studio I had to uninstall and re-install my linux.
See https://gist.github.com/rolandboon/0a5abe1d9c6c515c59ec for downloading and installing the sdk

Object reference not set to an instance of an object When I create new Android App (Visual Studio)

In a Visual Studio 2015, Xamarin, Android SDK, jdk 1.7, and emulator are installed and Xamarin has all green checked items in tools>options>Xamarin. But When I try to create Blank App (Android) VS shows an error:
Object reference not set to an instance of an object
Then new project fail to create and solution explorer will be empty.
How could I solve it?
I solved it with updated Android SDK setup (API Level 19 and 21) [3rd party] to Android SDK setup (API Level 22) [3rd party] in Visual Studio setup.
I had the same problem and when I installed Android 4.4.2(API 19) from
Android SDK Manager the issue got resolved. You can open Android SDK Manager in
VS2015 with Update 2 by navigating to Tools-> Android->Android SDK Manager
I figured out this...
Depending on the emulators you want to use with the new project, subject to what is installed using Android AVD, you will need to download the necessary API Level.
Example.
I looked up my emulators.
Then I simply opened Android SDK Manager and downloaded the corresponding API Level 19
And everything worked out well
I also encounter this problem on Visual Studio 2015 Update 2 with Xamarin.VisualStudio_4.0.3.214, but I solved it by installing level 19, 21, 22, 23 through Android SDK Manager.
I struggle with this same problem for a whole day but I got it resolved after several iterations.
Make sure Android Studio is not installed on your computer. If it is, uninstall it and run the VS2015 installer again until all Android SDK errors go away.
Make sure VS2015 is closed and install the most recent stable version of Xamarin for Visual Studio 2015. I found it here: https://store.xamarin.com/account/my/subscription/downloads. (Trying to install it through VS2015 didn't work for me under Tools -> Android -> Settings -> Xamarin for Visual Studio Updates.)
Make sure you have Java SDK version 7 installed on your machine (do not use 8 even though its the latest). You also must use the 32-bit version even if you have a 64-bit machine. This was key!
Install the Android SDK. Standalone version, not Android Studio + Android SDK.
Install the Android NDK.
Restart your computer and open VS2015. Go to Tools -> Android -> Settings and set the correct paths to Android SDK, NDK and Java SDK.
You should be good to go with creating a new project. You are all welcome!!!

android studio - set gradlew/gradle jdk

OS: OSX 10.9.2
build tool: gradle
platform: android
I've recently installed jdk 8 which i use for some side projects. i have 1.6, 1.7 and 1.8 installed at the same time.
The issue that i'm having is when building android projects, in android studio using gradlew its using jdk 8, instead of using the jdk that i've set for the project. This causes issues as one of the gradle plugins i'm using (new relic agent) does not yet support java 8.
I dont know how android studio decides what jdk to use for gradle, but it should use the same as the jdk you set for you project, otherwise what is the point in asking me to set one?
So my question is this. How can i set what jdk to use for gradlew in android studio, or in intellij in general as i'm sure this will affect other projects too

ADT Plugin disappeared in Eclipse

..I was trying to install the Google Cloud Messaging for Android Library, from the Extra in Android SDK Manager.
Since it did not appear, I updateded the Android SDK Tools and the Android SDK Platform-Tools to the last release (as shown here: How Google Cloud Messaging Service in Android Works?).
Once updated both, I still could not find any Extras--> Google Cloud Messaging for Android Library (just "Intel Hardware Accelerated Execution Manager"). So I updated Eclipse (version 3.6) too (Help->Check for Updates), but nothing happened except for the fact that the ADT plugin was not there anymore: no Android menu under Preferences, no possibilty to create Android projects and so on.
I uninstelled the plugin, removed the files from the plugin directory, installed another version of Eclipse (3.8) with the addition of the plugin but nothing changed.
Any ideas?
I'm working on a Mac OS X Leopard.
The problem was that the new ADT Plugin (v20) requires Java 1.6.
So, first of all, I had to change the Java Preferences, bringing up the 1.6 Java version.
Then, since my Eclipse was set for Java 1.5 32 bit, I had to download the 64 bit Eclipse release (because my 1.6 Java version was 64 bit).
And everything worked again.
Hope this can help.
Beginning with ADT 17 "Java 1.6 or higher is required for ADT 17.0.0."
http://developer.android.com/tools/sdk/eclipse-adt.html

Categories

Resources