Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: LOG4J : Android Studio

  1. #1

    Question LOG4J : Android Studio

    Hello, this is my first time using openSuse
    I'm running Android studio (studio.sh) from konsole and i got this warning output:

    Code:
    log4j:WARN No appenders could be found for logger (io.netty.util.internal.logging.InternalLoggerFactory).
    log4j:WARN Please initialize the log4j system properly.
    log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
    
    I was looking for the solution and the only closes solution but still Unsolved are here, can anybody help me please how to solve this warning ?

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,518
    Blog Entries
    15

    Default Re: LOG4J : Android Studio

    Hi
    I just tried it here on openSUSE Leap 42.1 and it worked fine using the default openjdk and selected the gtk interface. The only thing I need to do was export JAVA_HOME to point at /etc/alternatives/java_sdk_openjdk temporarily, it started fine with just a warning about openJDK vm memory.

    I'm guessing your using oracle java and a different interface?

    Maybe you need to check if log4j is installed?
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3

    Default Re: LOG4J : Android Studio

    Quote Originally Posted by malcolmlewis View Post
    Hi
    I just tried it here on openSUSE Leap 42.1 and it worked fine using the default openjdk and selected the gtk interface. The only thing I need to do was export JAVA_HOME to point at /etc/alternatives/java_sdk_openjdk temporarily, it started fine with just a warning about openJDK vm memory.

    I'm guessing your using oracle java and a different interface?

    Maybe you need to check if log4j is installed?
    First, sorry for my very late reply

    "using oracle java and a different interface?" sorry i'm kindly not understand what is that mean, but here's i'm gonna explain what happend

    • i'm following this thread how to install jdk 8
    • After that, i do the java/javac alternatives update, check the version, and getting this output

    Code:
    java version "1.8.0_77" Java(TM) SE Runtime Environment (build 1.8.0_77-b03) Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)
    • And also same for javac -version (that 1.8.0.77)


    Running the Android Studio i'm getting
    Code:
     log4j:WARN No appenders could be found for lo.... bla bla
    . I remember that Yast has a lot of package so i'm going to yast and install the Log4j, after installing is done (just install without doing any log4j config because i didn't know how to configure that) i'm running again the Android Studio and still getting the same WARNING.

    Getting back to original openjdk (which is not the lates version of oracle jdk) by setting the java and javac, running back the Android Studio and still getting the same WARNING, by the way, Android Studio can running and compiling my android project, but althougt, i want to care about this warning, any idea ?

    Oh, almost forgot to say, i was doing your solution above:
    • export JAVA_HOME=/usr/lib64/jvm/jdk1.8.0_77/
    • echo $JAVA_HOME
      Code:
      /usr/lib64/jvm/jdk1.8.0_77/
    • Running the android studio still facing with that warning with this output

    Code:
    log4j:WARN No appenders could be found for logger (io.netty.util.internal.logging.InternalLoggerFactory).
    log4j:WARN Please initialize the log4j system properly.
    log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
    Looking in classpath from com.intellij.util.lang.UrlClassLoader@1723a349 for /com/sun/jna/linux-x86-64/libjnidispatch.so
    Found library resource at jar:file:/opt/android-studio/lib/jna.jar!/com/sun/jna/linux-x86-64/libjnidispatch.so
    Trying /home/rhony/.AndroidStudioPreview2.1/system/tmp/jna-108489860/jna5425080017547786171.tmp
    Found jnidispatch at /home/rhony/.AndroidStudioPreview2.1/system/tmp/jna-108489860/jna5425080017547786171.tmp

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,518
    Blog Entries
    15

    Default Re: LOG4J : Android Studio

    Hi
    I would guess (since it's just a warning) something in the oracle setup requiring this, may be better to ask on the Android Studio forum?

    If it's working for you, suggest you just carry on unless you need log4j.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  5. #5

    Default Re: LOG4J : Android Studio

    Quote Originally Posted by malcolmlewis View Post
    Hi
    I would guess (since it's just a warning) something in the oracle setup requiring this, may be better to ask on the Android Studio forum?

    If it's working for you, suggest you just carry on unless you need log4j.
    Thank's for your suggestion, i going to android studio to asking this question.

  6. #6
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,934
    Blog Entries
    2

    Default Re: LOG4J : Android Studio

    When you've switched from Oracle Java SE JDK to openjdk, be sure you have the package "openjdk-devel" installed to install the "jdk" elements.
    The default installed openjdk package only installs the jre.

    If you're uncertain, run the following to check for, and if necessary install the "jdk" compononts which includes the javac
    Code:
    zypper in openjdk-devel
    After that, use update-alternatives as usual, the jdk components will be automatically integrated with the openjdk selection (unlike when using update-alternatives to switch between Oracle Java which has separate entries for jre and jdk).

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  7. #7

    Default Re: LOG4J : Android Studio

    Quote Originally Posted by tsu2 View Post
    When you've switched from Oracle Java SE JDK to openjdk, be sure you have the package "openjdk-devel" installed to install the "jdk" elements.
    The default installed openjdk package only installs the jre.

    If you're uncertain, run the following to check for, and if necessary install the "jdk" compononts which includes the javac
    Code:
    zypper in openjdk-devel
    After that, use update-alternatives as usual, the jdk components will be automatically integrated with the openjdk selection (unlike when using update-alternatives to switch between Oracle Java which has separate entries for jre and jdk).

    TSU
    Hello, thanks for your help, but i already install the java 1.7 and 1.8 devel, and by the way, while i'm trying to use "zypper in openjdk-devel" there's no package found, here's the output:

    Code:
    sudo zypper in openjdk-devel
    Loading repository data...
    Reading installed packages...
    'openjdk-devel' not found in package names. Trying capabilities.
    No provider of 'openjdk-devel' found.
    Resolving package dependencies...
    
    Nothing to do.

  8. #8
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,934
    Blog Entries
    2

    Default Re: LOG4J : Android Studio

    Quote Originally Posted by RhonyAbdullah View Post
    Hello, thanks for your help, but i already install the java 1.7 and 1.8 devel, and by the way, while i'm trying to use "zypper in openjdk-devel" there's no package found, here's the output:

    Code:
    sudo zypper in openjdk-devel
    Loading repository data...
    Reading installed packages...
    'openjdk-devel' not found in package names. Trying capabilities.
    No provider of 'openjdk-devel' found.
    Resolving package dependencies...
    
    Nothing to do.
    You may need to specify an exact package name.
    To view your choices,
    Code:
    zypper se openjdk-devel
    Then install typing in the ezact packagename
    Code:
    zypper in packagename
    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  9. #9

    Default Re: LOG4J : Android Studio

    Quote Originally Posted by tsu2 View Post
    You may need to specify an exact package name.
    To view your choices,
    Code:
    zypper se openjdk-devel
    Then install typing in the ezact packagename
    Code:
    zypper in packagename
    TSU
    Hey buddy, i got this after execute your command above:

    Code:
    zypper se openjdk-devel
    Loading repository data...
    Reading installed packages...
    
    S | Name                               | Summary                                                        | Type   
    --+------------------------------------+----------------------------------------------------------------+--------
    i | java-1_7_0-openjdk-devel           | SUSE's implementation of the OpenJDK 7 Development Environment | package
      | java-1_7_0-openjdk-devel-debuginfo | Debug information for package java-1_7_0-openjdk-devel         | package
    i | java-1_8_0-openjdk-devel           | OpenJDK 8 Development Environment                              | package
    i think both the jdk devel 1.7 and 1.8 already installed, this may not the problem puzzle . As i know, this problem only occur on Opensuse, because while i'm using xubuntu about last couple of month this problem doesn't occur. CMWII

  10. #10
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,934
    Blog Entries
    2

    Default Re: LOG4J : Android Studio

    Looks to me like you should have a functional Android Studio,
    Try compiling some code and see what happens.

    The last warning you posted looks like it's only informational... saying in each case that the app looked for a library, and in each case found it. Does not mention anything not found.
    Code:
    log4j:WARN No appenders could be found for logger (io.netty.util.internal.logging.InternalLoggerFactory).
    log4j:WARN Please initialize the log4j system properly.
    log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
    Looking in classpath from com.intellij.util.lang.UrlClassLoader@1723a349 for /com/sun/jna/linux-x86-64/libjnidispatch.so
    Found library resource at jar:file:/opt/android-studio/lib/jna.jar!/com/sun/jna/linux-x86-64/libjnidispatch.so
    Trying /home/rhony/.AndroidStudioPreview2.1/system/tmp/jna-108489860/jna5425080017547786171.tmp
    Found jnidispatch at /home/rhony/.AndroidStudioPreview2.1/system/tmp/jna-108489860/jna5425080017547786171.tmp
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •