Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How install android studio & java packages?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
pmam
Veteran
Veteran


Joined: 30 Dec 2013
Posts: 1145

PostPosted: Fri Oct 07, 2016 1:19 pm    Post subject: How install android studio & java packages? Reply with quote

I want to install android studio and do not know what packages are needed.
I tried to install dev-java/icedtea-bin and then dev-util/android-studio,
but when launched android studio I got a pop up tip said that this opensource java may cause to some issues...
and there is an error with the 'R' (it was red). So I tried to install oracle java packages but then android studio did not launch due to this error:
"'tools.jar' seems to be not in Studio classpath. Please ensure JAVA_HOME points to JDK rather than JRE."
Please let me know what are the needed packages for android studio and how to work it out?
_________________
“You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...”
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 23264
Location: here

PostPosted: Fri Oct 07, 2016 1:24 pm    Post subject: Reply with quote

Install dev-java/oracle-jdk-bin, and then set this as java-vm with eselect
Code:
# eselect java-vm list
Available Java Virtual Machines:
  [1]   icedtea-bin-7
  [2]   oracle-jdk-bin-1.8  system-vm user-vm
# eselect java-vm set user 2
# eselect java-vm set system 2

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
pmam
Veteran
Veteran


Joined: 30 Dec 2013
Posts: 1145

PostPosted: Fri Oct 07, 2016 2:10 pm    Post subject: Reply with quote

fedeliallalinea Hi,

Thanks for your helpful advise!
I have set dev-java/oracle-jdk-bin as java-vm and now android studio launch ok,
but still there is an error when I want to create new project:
Code:

Invalid Project JDK
Please choose a valid JDK directory Open JDK Settings

Please advise how to set this directory to oracle java rather than open jdk? Where the directory suppose to be?
_________________
“You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...”
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 23264
Location: here

PostPosted: Fri Oct 07, 2016 2:46 pm    Post subject: Reply with quote

pmam wrote:
Please advise how to set this directory to oracle java rather than open jdk? Where the directory suppose to be?

Not sure but under File -> Project Structure -> SDK Location set JDK Location with /usr/lib/jvm/oracle-jdk-bin-1.x (how x is your version of oracle jdk)
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
pmam
Veteran
Veteran


Joined: 30 Dec 2013
Posts: 1145

PostPosted: Fri Oct 07, 2016 5:41 pm    Post subject: Reply with quote

fedeliallalinea,

Sorry but have another issue...
I fixed oracle directory as you advised and the project is being created,
but now 'R' is red and there is an error as following - I did not to find any solution in google:
Code:

 @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

Error:Execution failed for task ':app:compileDebugAidl'.
> java.lang.IllegalStateException: aidl is missing


Thanks
_________________
“You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...”
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 23264
Location: here

PostPosted: Fri Oct 07, 2016 6:01 pm    Post subject: Reply with quote

I'am not at work until monday and I can't try to make a test, but this can help?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
pmam
Veteran
Veteran


Joined: 30 Dec 2013
Posts: 1145

PostPosted: Fri Oct 07, 2016 6:59 pm    Post subject: Reply with quote

I already have seen this post but meanwhile it does not work it out,
I will continue trying...

Thanks
_________________
“You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...”
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 1949
Location: Here and Away Again

PostPosted: Sat Oct 08, 2016 11:27 am    Post subject: ><)))°€ Reply with quote

Things seem to work OK here, with 'dev-util/android-studio-2.2.0.12.145.3276617-r1', using 'dev-java/icedtea-bin-3.1.0' (I think the first time I installed and ran Android Studio was with 'icedtea-bin:7').

Android SDK Build-Tools is at revision 24 (which is what I believe provides 'aidl').

I'm pretty sure I've not done any special configuring, as I've only really used this thing for the emulator (I did just now try building and running the default 'Hello World' project, which seems to have worked).
_________________
Kind regards,
Chiitoo.

You might remember me from Gentoo projects such as Forums, LXQt, Qt, and Wine.
Back to top
View user's profile Send private message
pmam
Veteran
Veteran


Joined: 30 Dec 2013
Posts: 1145

PostPosted: Sun Oct 09, 2016 6:45 am    Post subject: Reply with quote

Chiitoo Hi,

At the moment my set up is with: dev-util/android-studio-2.1.2.0.143.2915827 & oracle-jdk-bin-1.8.0.102
I have tried also with dev-java/icedtea-bin-7.2.6.7(7) and with Android SDK Build-Tools at revision 24 & 19
I can running default 'Hello World' project but on MainActivity screen, I get 'R' in red color and with the error as posted before.
I do not know what is wrong? May be need to try your dev-java/icedtea-bin version - However, how to install 3.1.0 ver rather than 7??

My info:
Code:
eix dev-java/icedtea-bin
[I] dev-java/icedtea-bin
     Available versions: 
     (8)    3.1.0^s
     (7)    7.2.6.7^s
       {+alsa cjk +cups doc examples +gtk headless-awt multilib nsplugin nss pulseaudio selinux source +webstart ABI_PPC="64" ABI_X86="32 64"}
     Installed versions:  7.2.6.7(7)^s(07:36:30 PM 10/07/2016)(alsa cups gtk webstart -cjk -doc -examples -headless-awt -multilib -nsplugin -nss -pulseaudio -selinux -source ABI_X86="32 64")
     Homepage:            http://icedtea.classpath.org
     Description:         A Gentoo-made binary build of the IcedTea JDK

eix android-studio
[I] dev-util/android-studio
     Available versions:  2.1.2.0.143.2915827^s ~2.1.3.0.143.3101438^s ~2.2.0.12.145.3276617-r1^s {selinux ELIBC="FreeBSD"}
     Installed versions:  2.1.2.0.143.2915827^s(07:55:41 PM 10/07/2016)(-selinux)
     Homepage:            http://developer.android.com/sdk/installing/studio.html
     Description:         A new Android development environment based on IntelliJ IDEA

eix oracle-jdk-bin
[I] dev-java/oracle-jdk-bin
     Available versions:  (1.8) ~*1.8.0.101^fs 1.8.0.102^fs
       {alsa cups derby doc examples +fontconfig headless-awt javafx jce nsplugin pax_kernel selinux source}
     Installed versions:  1.8.0.102(1.8)^fs(04:55:47 PM 10/07/2016)(alsa cups fontconfig -derby -doc -examples -headless-awt -javafx -jce -nsplugin -pax_kernel -selinux -source)
     Homepage:            http://www.oracle.com/technetwork/java/javase/
     Description:         Oracle's Java SE Development Kit


Thanks
_________________
“You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...”
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 1949
Location: Here and Away Again

PostPosted: Mon Oct 10, 2016 9:11 am    Post subject: Reply with quote

Things probably should work with 'dev-java/oracle-jdk-bin-1.8.0.102' as well, but I haven't tested it personally. If I remember things right-like at all, that's what 'dev-java/icedtea-bin-3.1.0' is based on (to install it, simply specifiy the exact version, or slot, that you want while emerging the package).

I can probably try the version of 'dev-util/android-studio' you have later on, to see if that will trick the issue out for me (I have had it installed in the past, and don't remember it happening then, but I guess something else having been updated could trigger it).

What is the 'MainActivity' screen? I can't seem to find any part named like that. :]
_________________
Kind regards,
Chiitoo.

You might remember me from Gentoo projects such as Forums, LXQt, Qt, and Wine.
Back to top
View user's profile Send private message
pmam
Veteran
Veteran


Joined: 30 Dec 2013
Posts: 1145

PostPosted: Mon Oct 10, 2016 10:24 am    Post subject: Reply with quote

Chiitoo,

Quote:
What is the 'MainActivity' screen?

Here is the default MainActivity' screen - you get it when just starting new project.
Code:
'package com.example.mg.simplearrayexample;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
}

The 'R' is red and there is an error as posted before.
I guess it depends on whole system info, installed packages rev. etc, and as you said: "updated could trigger it"...
Interesting to know results of your testing.

Thanks
_________________
“You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...”
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 1949
Location: Here and Away Again

PostPosted: Mon Oct 10, 2016 3:51 pm    Post subject: Reply with quote

Ah, thank you.

I had probably closed that file earlier, and couldn't quite find it before creating a new project. When I do that, it's opened with the 'MainActivity.java' file open, which has the content you described.

The icon in the tab for this file does have a red circle with something that looks like a 'j', but no problems are reported. If I close said tab/file, and re-open it myself, the red icon will not appear again... but that's probably not what you're seeing.

Same with version '2.1.2.0.143.2915827'.
_________________
Kind regards,
Chiitoo.

You might remember me from Gentoo projects such as Forums, LXQt, Qt, and Wine.
Back to top
View user's profile Send private message
pmam
Veteran
Veteran


Joined: 30 Dec 2013
Posts: 1145

PostPosted: Mon Oct 10, 2016 5:55 pm    Post subject: Reply with quote

Thanks for your info!
So it looks as an issue depends on specific set up...
I will keep trying
_________________
“You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...”
Back to top
View user's profile Send private message
kitus
n00b
n00b


Joined: 27 Dec 2012
Posts: 7
Location: Mexico

PostPosted: Tue Jan 10, 2017 9:26 pm    Post subject: Android Studio working in AMD FX8 - x86_64 Reply with quote

I'm running android studio, i tried downloading the sources from website, with couple off warnings, later i installed from portage with better results.

I have the following packages in my system, to get this done:

1.- Follow the guide https://wiki.gentoo.org/wiki/Java, and choose oracle package:

virtual/jdk
dev-java/oracle-jdk-bin-1.8.0.112 (in my case)

(remember run the configuration commands, to get oracle java wide system)

2.- Install KVM Guide https://wiki.gentoo.org/wiki/QEMU

app-emulation/qemu-2.7.0-r7(in my case)

3.- Activate the necesary kernel options from https://wiki.gentoo.org/wiki/Android_USB_Tethering
(reboot with ur new kernel)

4.- Install android-studio and android-tools from portage.

dev-util/android-studio-2.2.3.0.145.3537739
dev-util/android-tools-5.1.1_p13 (i don't know if neccesary, but i got less warning messages on android-studio event log)

... Finally inside android studio Download the necesary tools a lot of MB

For me is working very well, good luck xD
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum