Hello, this is my first time using openSuse
I’m running Android studio (studio.sh) from konsole and i got this warning output:
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 ?
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?
After that, i do the java/javac alternatives update, check the version, and getting this output
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
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 WARN****ING.
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
/usr/lib64/jvm/jdk1.8.0_77/
Running the android studio still facing with that warning
with this output
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
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
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).
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:
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.
Hey buddy, i got this after execute your command above:
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
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
There’s no problem while i’m launch Android Studio and Compiling project, i’m just cust curiuos about that **log4j: WARN **because i was try to googling there’s no one thread wich solving this problem. If this unnecessary warning, i’m gonna leave this problem :sarcastic:
Yes,
It looks like your logging may not be working but that is all.
Hazarding a wild guess, I’d also guess that it’s going to affect only your application’s overall logging and any coding or compiling problems won’t be affected during your current session but might be affected if you shut down Android Studio and later re-open it… The failed output from your previous compiling fail probably won’t be available (all my guessing).
Without
sudo : I’m just create ANDROID_HOME path from .bashrc, then exec without sudo “source ~/.bashrc” 1. Then exec “kdesu studio.sh”
Now, those all warning disapper.
The problem is, i must run the android studio with sudo from “kdesu studio.sh” command althought on kde i can check the remember option while password dialog showing (hope you know what i mean)
Do you have a solution for this, looks like this is nearly close to fix this warning issue lol!
When you set environmental parameters like your ANDROID_HOME path in a console as you’ve described, it will only be effective during your current User session and will not survive a reboot.
To make your environmental variable permanent and survive reboots, there are methods that apply either to the individual User (write to .bashrc) or system wide regardless of User (my preference).
The two methods for making your setting permanent and apply to every User who logs in to your machine Method 1
Write to /etc/profile. Actually, that’s not entirely correct because if you open the existing file, it will warn you that any edits to this file will be lost when upgrading. Instead, create a new “/etc/profile.local” file and insert a line exporting your environmental variable. Save and source “/etc/profile” to activate.
Method 2
You can create a new “.sh” file in /etc/profile.d/ which contains your export command. Reboot to activate.
As for your launching Android Studio using “kdesu” – You may want to create a KDE menu entry which automatically invokes the command.
Or, create a script on your Desktop containing this single command for easy access so you can launch with simply a double-click.
Hey, thanks for your suggestion, but how if wanna run the android studio.sh without sudo with log4j still can be accessed ? Because i don’t want to run “kdesu studio.sh” which taking me as a root user. Sorry my english not enough good.
If your application requires at least sudo permissions, you can’t avoid it.
And it’s very common for Dev apps to require elevated permissions and is a major reason why Dev machines should be closely monitored and not necessarily used for everyday activity.
If you’re working on a single machine, then one options is to use virtualization to run your Dev completely separately from your ordinary activity.