"Gradle sync failed: process finished with non-zero exit 2" - android-studio

I have found nothing to help me solve this problem, even though similar issue have been described in Stackoverflow, none which solve my problem. So here we go again.
I installed Android Studio in Ubuntu 14.04 (switching over from Windows 10). Followed the instructions as posted on Ubuntu site. Started a blank project and immediately got the following Gradle error:
Gradle sync started
8:54:11 PM Gradle sync failed: Process 'command '/opt/android-studio/jre/bin>/java'' finished with non-zero exit value 2
This is an empty project. All default settings. I'm at a loss. Maybe the ease with which I managed to get projects going in a Windows environment has led me towards unreasonable expectations with this Linux version... dunno.

I had this problem 2 days ago and changing the JDK path worked for me..
I downloaded Oracle jdk..
I hope that helps you
and Happy coding.

I have just solved the problem ,I think there is a problem in the default jre that comes with the android-studio (..../android-studio/jre) you can change it and see if it works for you.
find the java installed directory readlink -f $(which java) will reveal the path, in my case /usr/lib/jvm/java-8-oracle/jre/bin/java
right click on project > open module settings then go to sdk location in the left panel set your jdk location.
if you don't have oracle jdk installed then you can try with openjdk .If it shows the same kind of error ,remove open jdk and install oracle jdk.
Hope it helps.

Related

Virtual machine "pc1" Netkit error?

Introduction
I've just installed a networking simulator Called Netkit. On Debian stretch stable. Using the official installation guide here.
Installation
After setting the correct paths and installing. I then run the check_configuration.sh script.
Everything is checked OK, and it has found the terminal emulator xterm which is needed for netkit. And recieve the complete message.
[ READY ] Congratulations! Your Netkit setup is now complete!
Enjoy Netkit!
The Problem
Running netkit using the command:
vstart pc1
The xterm netkit-kernel emulator starts running. However I'm getting an infinite loop of the same error message:
ubda: can't open "home/foo/netkit/pc1.disk" failed, errno= 13
So im guessing it's because the file is missing? if so how do i obtain it? and if not, what is causing this error. I've followed the install guide completely.
I'm assuming your system is not a 32bit system. Netkit is only supported on the 32-bit architecture(unless the compatibility libraries are installed). Hence I would suggest you download a 32-bit VM(instead of installing the libraries) and run Netkit on the same(worked fine for me).
Check position of your lab-folder..

How Do I Get j2objc To Run With Doppl?

When I follow the instructions to get Doppl going, and I run the dopplBuild Gradle task, I get an error message about j2objc returning error code 127. What is going on?
One cause of this is not having a JDK available for command-line use on your development machine. While Android Studio can use its own JDK copy, that does not make javac and related tools available from the command line. The j2objc tool in the Doppl toolchain needs these tools available from the command line.
The simplest solution is to download and install a JDK, following whatever the normal practice is for doing so on your development machine's OS, such as downloading JDK 8 from Oracle's site and installing it. If javac runs successfully from the command line, then try running dopplBuild again and see if you get past the "error code 127" result.

I stopped the installation of package abruptly in sdk manager in Linux. Thereafter the window does not open

I am using Android Studio in Ubuntu 14.4 lts. While installing certain packages through Sdk Manager, i stopped them, as i realized i didn't need them. After which i could not open the sdk manager altogether.
I tried running it from Android-Studio,
I tried running it from the terminal by entering the installed android folder then Sdk/tools and executing ./android as well as ./android sdk
I tried separately downloading stand-alone sdk tools and tried running it , but that didn't help too
I found such problems already dealt but in Windows, there the path is edited or the java_exe is set.
But i dint find any useful suggestion in case of Linux.
I am finding things really helpless by now. Please help!

Datastax Devcenter 1.1 fail to start

I'm using 64 bit Windows 8. It was fine yesterday, and it just failed to start. It shows the loading screen, but it just stop right there.
Anyone has the same problem? Any fix? It has happened to me twice with my old pc, which were using 32 bit Windows 7.
While I haven't heard of this issue before, here's something that will hopefully fix the issue:
find a directory called .devcenter in your user directory (that should be \Users\<youruser>)
move this directory to a different location
start DevCenter
If this doesn't work:
in the same \Users\<youruser>\.devcenter\logging folder find the log.txt file; you might be able to see the root error
there is a newer version available (1.1.1)
Some time this can be due to Java version. For me it was failing because I was using Java 9. It worked fine after downgrading to Java8. Confirm compatibility of your devcenter and java

cant't get NetBeans to compile Java ME

I've been trying for the past 5 hours to make my java ME application to compile without any luck.
System:
W7 64X
NetBeans 7.0
Java JDK 32X
Error Message:
Execution failed with error code 1.
I've done the following things trying to fix it.
Added runMidlet to DEP.
turned off my anti-virus/firewall.
reinstalled and rebooted 5 times prolly.
and something I found on google.
Please edit <javamesdk_installdir>\toolkit-lib\modules\bootstrap\conf\system.properties and reconfigure the device-manager.object-registry.host=localhost to: device-manager.object-registry.host=127.0.0.1
And one other thing that can be the causes for this issue is the Port 1299 might be taken
Please edit <javamesdk_installdir>\toolkit-lib\modules\bootstrap\conf\system.properties and change
device-manager.object-registry.port=1299 to: device-manager.object-registry.port=1999
the only thing that has changed since I started is that now I get the error after 10 sec and before it was after 24sec.
Any kind of help is appreciated!
mine solved by installing standalone Java ME SDK http://www.oracle.com/technetwork/java/javame/javamobile/download/sdk/index.html then in the netbeans go to Tools > Java Platform then remove default J2ME Platform, next click Add Platforms and locate your new Java ME SDK.
if that still failed try uninstall Java ME Plugin in Tools > Plugins > Installed then install Mobility in Available Plugins Tab
I do not know how you added JME SDK 3, but check bellow my setup

Resources