How to fix Android Studio installation and Gradle errors?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







3















I have installed Android Studio with the idea of developing applications with Cordova and Phonegap thanks to the help of my partner @karel who showed me this question:
How to install Android Studio on Ubuntu?
I followed the instructions exactly, but even so I have several errors.
When you start Android Studio with the following command, sudo -E /opt/google/android-studio/bin/studio.sh this shows the first error:



Gtk-Message: 09:07:14.283: Failed to load module "canberra-gtk-module"

(java:13968): IBUS-WARNING **: 09:07:14.566:
The owner of /home/miguel/.config/ibus/bus is not root!


I installed the SDK, (I think I installed the necessary ones) and when I returned to a Cordova project, and I ran cordova requirements to see if everything was OK, the result was the following:



Android Studio project detected

Requirements check results for android:
Java JDK: installed 11.0.2
Android SDK: installed true
Android target: not installed
avdmanager: Command failed with exit code 1 Error output:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.AvdManagerCli.run(AvdManagerCli.java:213)
at com.android.sdklib.tool.AvdManagerCli.main(AvdManagerCli.java:200)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 5 more
Gradle: not installed
Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle
in your path, or install Android Studio
Some of requirements check failed
miguel@miguel:~/todo-codigos/proyectos-2019/cordova/zombies$


What did I do wrong? What can I do to correct this and be able to run my applications on Cordova and Phonegap?










share|improve this question




















  • 1





    Android Studio is installed with permissions that allow a normal user to use the application without being root including installing plugins. Android Studio requires JDK 8 by default, however you can install JDK 8 (openjdk-8-jdk) and JDK 11 alongside each other, and Android Studio will select JDK 8 as the default JDK if it is installed. When I installed Android Studio I did not have any Java installed, and the Android Studio installer installed whatever JDK 8, Gradle and Android SDK it required as part of the installation of Android Studio.

    – karel
    Feb 19 at 15:41








  • 1





    I accepted all the defaults when installing Android Studio and let it install whatever software it needed. After you install Android Studio and open it as normal user for the first time, the first step is to locate the Configure link on the Android Studio splash screen and select Create Desktop Entry which creates an Android Studio icon in the Dash, which is the way to launch Android Studio by clicking on its icon from then on.

    – karel
    Feb 19 at 15:47








  • 1





    When I installed Android Studio I installed it on a fresh instance of Ubuntu because I was feeling adventurous and wanted to customize it. I disagreed with a few things in the Ask Ubuntu answer that I read, and I wanted to try installing it my way. This turned Android Studio into a beast, and I had to delete everything halfway through the installation process and start over from scratch by accepting all the defaults and following the steps in the Ask Ubuntu answer that I was using to the letter without changing anything.

    – karel
    Feb 19 at 15:52













  • Thank you for your support @karel, I do not understand very well what you want to say. I have followed the steps of the installation and nevertheless I have the errors that I show and I can not work with cordova. What do you suggest I do? I have not created any cone on the board, in fact, if I put: Android Studio in Ubuntu Software, I get Andriod Studio to install it, as if I had not installed it.

    – Miguel Espeso
    Feb 19 at 16:09






  • 1





    In a nutshell my fairly recent version of Android Studio is using JDK 8, not JDK 11, and your Android Studio is using JDK Java 11. As far as I know Android Studio requires JDK 8.

    – karel
    Feb 19 at 16:11




















3















I have installed Android Studio with the idea of developing applications with Cordova and Phonegap thanks to the help of my partner @karel who showed me this question:
How to install Android Studio on Ubuntu?
I followed the instructions exactly, but even so I have several errors.
When you start Android Studio with the following command, sudo -E /opt/google/android-studio/bin/studio.sh this shows the first error:



Gtk-Message: 09:07:14.283: Failed to load module "canberra-gtk-module"

(java:13968): IBUS-WARNING **: 09:07:14.566:
The owner of /home/miguel/.config/ibus/bus is not root!


I installed the SDK, (I think I installed the necessary ones) and when I returned to a Cordova project, and I ran cordova requirements to see if everything was OK, the result was the following:



Android Studio project detected

Requirements check results for android:
Java JDK: installed 11.0.2
Android SDK: installed true
Android target: not installed
avdmanager: Command failed with exit code 1 Error output:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.AvdManagerCli.run(AvdManagerCli.java:213)
at com.android.sdklib.tool.AvdManagerCli.main(AvdManagerCli.java:200)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 5 more
Gradle: not installed
Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle
in your path, or install Android Studio
Some of requirements check failed
miguel@miguel:~/todo-codigos/proyectos-2019/cordova/zombies$


What did I do wrong? What can I do to correct this and be able to run my applications on Cordova and Phonegap?










share|improve this question




















  • 1





    Android Studio is installed with permissions that allow a normal user to use the application without being root including installing plugins. Android Studio requires JDK 8 by default, however you can install JDK 8 (openjdk-8-jdk) and JDK 11 alongside each other, and Android Studio will select JDK 8 as the default JDK if it is installed. When I installed Android Studio I did not have any Java installed, and the Android Studio installer installed whatever JDK 8, Gradle and Android SDK it required as part of the installation of Android Studio.

    – karel
    Feb 19 at 15:41








  • 1





    I accepted all the defaults when installing Android Studio and let it install whatever software it needed. After you install Android Studio and open it as normal user for the first time, the first step is to locate the Configure link on the Android Studio splash screen and select Create Desktop Entry which creates an Android Studio icon in the Dash, which is the way to launch Android Studio by clicking on its icon from then on.

    – karel
    Feb 19 at 15:47








  • 1





    When I installed Android Studio I installed it on a fresh instance of Ubuntu because I was feeling adventurous and wanted to customize it. I disagreed with a few things in the Ask Ubuntu answer that I read, and I wanted to try installing it my way. This turned Android Studio into a beast, and I had to delete everything halfway through the installation process and start over from scratch by accepting all the defaults and following the steps in the Ask Ubuntu answer that I was using to the letter without changing anything.

    – karel
    Feb 19 at 15:52













  • Thank you for your support @karel, I do not understand very well what you want to say. I have followed the steps of the installation and nevertheless I have the errors that I show and I can not work with cordova. What do you suggest I do? I have not created any cone on the board, in fact, if I put: Android Studio in Ubuntu Software, I get Andriod Studio to install it, as if I had not installed it.

    – Miguel Espeso
    Feb 19 at 16:09






  • 1





    In a nutshell my fairly recent version of Android Studio is using JDK 8, not JDK 11, and your Android Studio is using JDK Java 11. As far as I know Android Studio requires JDK 8.

    – karel
    Feb 19 at 16:11
















3












3








3


2






I have installed Android Studio with the idea of developing applications with Cordova and Phonegap thanks to the help of my partner @karel who showed me this question:
How to install Android Studio on Ubuntu?
I followed the instructions exactly, but even so I have several errors.
When you start Android Studio with the following command, sudo -E /opt/google/android-studio/bin/studio.sh this shows the first error:



Gtk-Message: 09:07:14.283: Failed to load module "canberra-gtk-module"

(java:13968): IBUS-WARNING **: 09:07:14.566:
The owner of /home/miguel/.config/ibus/bus is not root!


I installed the SDK, (I think I installed the necessary ones) and when I returned to a Cordova project, and I ran cordova requirements to see if everything was OK, the result was the following:



Android Studio project detected

Requirements check results for android:
Java JDK: installed 11.0.2
Android SDK: installed true
Android target: not installed
avdmanager: Command failed with exit code 1 Error output:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.AvdManagerCli.run(AvdManagerCli.java:213)
at com.android.sdklib.tool.AvdManagerCli.main(AvdManagerCli.java:200)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 5 more
Gradle: not installed
Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle
in your path, or install Android Studio
Some of requirements check failed
miguel@miguel:~/todo-codigos/proyectos-2019/cordova/zombies$


What did I do wrong? What can I do to correct this and be able to run my applications on Cordova and Phonegap?










share|improve this question
















I have installed Android Studio with the idea of developing applications with Cordova and Phonegap thanks to the help of my partner @karel who showed me this question:
How to install Android Studio on Ubuntu?
I followed the instructions exactly, but even so I have several errors.
When you start Android Studio with the following command, sudo -E /opt/google/android-studio/bin/studio.sh this shows the first error:



Gtk-Message: 09:07:14.283: Failed to load module "canberra-gtk-module"

(java:13968): IBUS-WARNING **: 09:07:14.566:
The owner of /home/miguel/.config/ibus/bus is not root!


I installed the SDK, (I think I installed the necessary ones) and when I returned to a Cordova project, and I ran cordova requirements to see if everything was OK, the result was the following:



Android Studio project detected

Requirements check results for android:
Java JDK: installed 11.0.2
Android SDK: installed true
Android target: not installed
avdmanager: Command failed with exit code 1 Error output:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.AvdManagerCli.run(AvdManagerCli.java:213)
at com.android.sdklib.tool.AvdManagerCli.main(AvdManagerCli.java:200)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 5 more
Gradle: not installed
Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle
in your path, or install Android Studio
Some of requirements check failed
miguel@miguel:~/todo-codigos/proyectos-2019/cordova/zombies$


What did I do wrong? What can I do to correct this and be able to run my applications on Cordova and Phonegap?







application-development android-studio gradle






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 19 at 17:29









karel

61.1k13132155




61.1k13132155










asked Feb 19 at 8:32









Miguel EspesoMiguel Espeso

228318




228318








  • 1





    Android Studio is installed with permissions that allow a normal user to use the application without being root including installing plugins. Android Studio requires JDK 8 by default, however you can install JDK 8 (openjdk-8-jdk) and JDK 11 alongside each other, and Android Studio will select JDK 8 as the default JDK if it is installed. When I installed Android Studio I did not have any Java installed, and the Android Studio installer installed whatever JDK 8, Gradle and Android SDK it required as part of the installation of Android Studio.

    – karel
    Feb 19 at 15:41








  • 1





    I accepted all the defaults when installing Android Studio and let it install whatever software it needed. After you install Android Studio and open it as normal user for the first time, the first step is to locate the Configure link on the Android Studio splash screen and select Create Desktop Entry which creates an Android Studio icon in the Dash, which is the way to launch Android Studio by clicking on its icon from then on.

    – karel
    Feb 19 at 15:47








  • 1





    When I installed Android Studio I installed it on a fresh instance of Ubuntu because I was feeling adventurous and wanted to customize it. I disagreed with a few things in the Ask Ubuntu answer that I read, and I wanted to try installing it my way. This turned Android Studio into a beast, and I had to delete everything halfway through the installation process and start over from scratch by accepting all the defaults and following the steps in the Ask Ubuntu answer that I was using to the letter without changing anything.

    – karel
    Feb 19 at 15:52













  • Thank you for your support @karel, I do not understand very well what you want to say. I have followed the steps of the installation and nevertheless I have the errors that I show and I can not work with cordova. What do you suggest I do? I have not created any cone on the board, in fact, if I put: Android Studio in Ubuntu Software, I get Andriod Studio to install it, as if I had not installed it.

    – Miguel Espeso
    Feb 19 at 16:09






  • 1





    In a nutshell my fairly recent version of Android Studio is using JDK 8, not JDK 11, and your Android Studio is using JDK Java 11. As far as I know Android Studio requires JDK 8.

    – karel
    Feb 19 at 16:11
















  • 1





    Android Studio is installed with permissions that allow a normal user to use the application without being root including installing plugins. Android Studio requires JDK 8 by default, however you can install JDK 8 (openjdk-8-jdk) and JDK 11 alongside each other, and Android Studio will select JDK 8 as the default JDK if it is installed. When I installed Android Studio I did not have any Java installed, and the Android Studio installer installed whatever JDK 8, Gradle and Android SDK it required as part of the installation of Android Studio.

    – karel
    Feb 19 at 15:41








  • 1





    I accepted all the defaults when installing Android Studio and let it install whatever software it needed. After you install Android Studio and open it as normal user for the first time, the first step is to locate the Configure link on the Android Studio splash screen and select Create Desktop Entry which creates an Android Studio icon in the Dash, which is the way to launch Android Studio by clicking on its icon from then on.

    – karel
    Feb 19 at 15:47








  • 1





    When I installed Android Studio I installed it on a fresh instance of Ubuntu because I was feeling adventurous and wanted to customize it. I disagreed with a few things in the Ask Ubuntu answer that I read, and I wanted to try installing it my way. This turned Android Studio into a beast, and I had to delete everything halfway through the installation process and start over from scratch by accepting all the defaults and following the steps in the Ask Ubuntu answer that I was using to the letter without changing anything.

    – karel
    Feb 19 at 15:52













  • Thank you for your support @karel, I do not understand very well what you want to say. I have followed the steps of the installation and nevertheless I have the errors that I show and I can not work with cordova. What do you suggest I do? I have not created any cone on the board, in fact, if I put: Android Studio in Ubuntu Software, I get Andriod Studio to install it, as if I had not installed it.

    – Miguel Espeso
    Feb 19 at 16:09






  • 1





    In a nutshell my fairly recent version of Android Studio is using JDK 8, not JDK 11, and your Android Studio is using JDK Java 11. As far as I know Android Studio requires JDK 8.

    – karel
    Feb 19 at 16:11










1




1





Android Studio is installed with permissions that allow a normal user to use the application without being root including installing plugins. Android Studio requires JDK 8 by default, however you can install JDK 8 (openjdk-8-jdk) and JDK 11 alongside each other, and Android Studio will select JDK 8 as the default JDK if it is installed. When I installed Android Studio I did not have any Java installed, and the Android Studio installer installed whatever JDK 8, Gradle and Android SDK it required as part of the installation of Android Studio.

– karel
Feb 19 at 15:41







Android Studio is installed with permissions that allow a normal user to use the application without being root including installing plugins. Android Studio requires JDK 8 by default, however you can install JDK 8 (openjdk-8-jdk) and JDK 11 alongside each other, and Android Studio will select JDK 8 as the default JDK if it is installed. When I installed Android Studio I did not have any Java installed, and the Android Studio installer installed whatever JDK 8, Gradle and Android SDK it required as part of the installation of Android Studio.

– karel
Feb 19 at 15:41






1




1





I accepted all the defaults when installing Android Studio and let it install whatever software it needed. After you install Android Studio and open it as normal user for the first time, the first step is to locate the Configure link on the Android Studio splash screen and select Create Desktop Entry which creates an Android Studio icon in the Dash, which is the way to launch Android Studio by clicking on its icon from then on.

– karel
Feb 19 at 15:47







I accepted all the defaults when installing Android Studio and let it install whatever software it needed. After you install Android Studio and open it as normal user for the first time, the first step is to locate the Configure link on the Android Studio splash screen and select Create Desktop Entry which creates an Android Studio icon in the Dash, which is the way to launch Android Studio by clicking on its icon from then on.

– karel
Feb 19 at 15:47






1




1





When I installed Android Studio I installed it on a fresh instance of Ubuntu because I was feeling adventurous and wanted to customize it. I disagreed with a few things in the Ask Ubuntu answer that I read, and I wanted to try installing it my way. This turned Android Studio into a beast, and I had to delete everything halfway through the installation process and start over from scratch by accepting all the defaults and following the steps in the Ask Ubuntu answer that I was using to the letter without changing anything.

– karel
Feb 19 at 15:52







When I installed Android Studio I installed it on a fresh instance of Ubuntu because I was feeling adventurous and wanted to customize it. I disagreed with a few things in the Ask Ubuntu answer that I read, and I wanted to try installing it my way. This turned Android Studio into a beast, and I had to delete everything halfway through the installation process and start over from scratch by accepting all the defaults and following the steps in the Ask Ubuntu answer that I was using to the letter without changing anything.

– karel
Feb 19 at 15:52















Thank you for your support @karel, I do not understand very well what you want to say. I have followed the steps of the installation and nevertheless I have the errors that I show and I can not work with cordova. What do you suggest I do? I have not created any cone on the board, in fact, if I put: Android Studio in Ubuntu Software, I get Andriod Studio to install it, as if I had not installed it.

– Miguel Espeso
Feb 19 at 16:09





Thank you for your support @karel, I do not understand very well what you want to say. I have followed the steps of the installation and nevertheless I have the errors that I show and I can not work with cordova. What do you suggest I do? I have not created any cone on the board, in fact, if I put: Android Studio in Ubuntu Software, I get Andriod Studio to install it, as if I had not installed it.

– Miguel Espeso
Feb 19 at 16:09




1




1





In a nutshell my fairly recent version of Android Studio is using JDK 8, not JDK 11, and your Android Studio is using JDK Java 11. As far as I know Android Studio requires JDK 8.

– karel
Feb 19 at 16:11







In a nutshell my fairly recent version of Android Studio is using JDK 8, not JDK 11, and your Android Studio is using JDK Java 11. As far as I know Android Studio requires JDK 8.

– karel
Feb 19 at 16:11












0






active

oldest

votes












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1119448%2fhow-to-fix-android-studio-installation-and-gradle-errors%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1119448%2fhow-to-fix-android-studio-installation-and-gradle-errors%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to change which sound is reproduced for terminal bell?

Can I use Tabulator js library in my java Spring + Thymeleaf project?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents