Failed linking file resources - android-resources

This is the java file that is giving the error
package com.example.daksh.timetable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
public class MainActivity extends AppCompatActivity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final Button mon_but,tue_but,wed_but,thur_but,fri_but;
mon_but = (Button)findViewById(R.id.mon);
tue_but = (Button)findViewById(R.id.tue);
wed_but = (Button)findViewById(R.id.wed);
thur_but = (Button)findViewById(R.id.thur);
fri_but = (Button)findViewById(R.id.fri);
final ImageView main_Image = (ImageView) findViewById(R.id.day);
final int[] dayarray = {R.drawable.monday,R.drawable.tuesday,R.drawable.wednesday,R.drawable.thursday, R.drawable.friday};
mon_but.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View view) {
main_Image.setImageResource(dayarray[0]);
}
});
tue_but.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View view) {
main_Image.setImageResource(dayarray[1]);
}
});
wed_but.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View view) {
main_Image.setImageResource(dayarray[2]);
}
});
thur_but.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View view) {
main_Image.setImageResource(dayarray[3]);
}
});
fri_but.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View view) {
main_Image.setImageResource(dayarray[4]);
}
});
}
}
The errors that I am getting are as follows
Information:Gradle tasks [clean, :app:assembleDebug]
C:\Projects\TimeTable\app\src\main\res\layout\activity_main.xml
Error:error: resource android:attr/colorSwitchThumbNormal is private.
Error:resource android:attr/colorSwitchThumbNormal is private.
C:\Projects\TimeTable\app\src\main\res\layout-land\activity_main.xml
Error:error: resource android:attr/colorSwitchThumbNormal is private.
Error:resource android:attr/colorSwitchThumbNormal is private.
Error:failed linking file resources.
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Execution failed for task ':app:processDebugResources'.
Failed to execute aapt
Information:BUILD FAILED in 9s
Information:9 errors
Information:0 warnings
Information:See complete output in console
This is the Activity_main.xml file
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/background"
android:paddingBottom="16dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingTop="16dp"
tools:context=".MainActivity">
<ImageView
android:id="#+id/day"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:contentDescription="TODO"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="#+id/guideline_dayselection"
app:layout_constraintHorizontal_bias="0.519"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="#+id/guideline2"
app:layout_constraintVertical_bias="0.472"
app:srcCompat="#drawable/monday" />
<TextView
android:id="#+id/textView"
style="#style/Widget.AppCompat.TextView.SpinnerItem"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:fontFamily="serif"
android:text="#string/message"
android:textColor="?android:attr/colorSwitchThumbNormal"
android:textSize="18sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="#+id/mon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:layout_marginStart="16dp"
android:layout_marginTop="50dp"
android:text="#string/monday"
app:layout_constraintBottom_toTopOf="#+id/tue"
app:layout_constraintStart_toStartOf="#+id/guideline_dayselection"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="#+id/tue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:layout_marginStart="16dp"
android:text="#string/tuesday"
app:layout_constraintBottom_toTopOf="#+id/wed"
app:layout_constraintStart_toStartOf="#+id/guideline_dayselection"
app:layout_constraintTop_toBottomOf="#id/mon" />
<Button
android:id="#+id/wed"
android:layout_width="88dp"
android:layout_height="48dp"
android:layout_marginBottom="16dp"
android:layout_marginStart="16dp"
android:text="#string/wednesday"
app:layout_constraintBottom_toTopOf="#+id/thur"
app:layout_constraintStart_toStartOf="#+id/guideline_dayselection"
app:layout_constraintTop_toBottomOf="#id/tue" />
<Button
android:id="#+id/thur"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:layout_marginStart="16dp"
android:text="#string/thursday"
app:layout_constraintBottom_toTopOf="#+id/fri"
app:layout_constraintStart_toStartOf="#+id/guideline_dayselection"
app:layout_constraintTop_toBottomOf="#id/wed" />
<Button
android:id="#+id/fri"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginStart="16dp"
android:text="#string/friday"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="#+id/guideline_dayselection"
app:layout_constraintTop_toBottomOf="#id/thur" />
<android.support.constraint.Guideline
android:id="#+id/guideline_dayselection"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_end="196dp" />
<android.support.constraint.Guideline
android:id="#+id/guideline2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.15339233" />
</android.support.constraint.ConstraintLayout>

You maybe having this error on your java files because there is one or more XML file with error.
Go through all your XML files and resolve errors, then clean or rebuild project from build menu
Start with your most recent edited XML file

If anyone reading this has the same problem, this happened to me recently, and it was due to having the xml header written twice by mistake:
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?> <!-- Remove this one -->
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#color/mug_blue"/>
<corners android:radius="#dimen/featured_radius" />
</shape>
The error I was getting was completely unrelated to this file so it was a tough one to find. Just make sure all your new xml files don't have some kind of mistake like this (as it doesn't show up as an error). EDIT It seems like it shows up as an error now, make sure to check your error logs.

One possible solution I already mentioned in a comment:
I had an issue in XML file that IDE did not highlight. Had to ask my
colleague to compile for me and it shown in his IDE. Buggy Android
Studio.
But I found a way around that.
If you go to Gradle panel on the right. Select your desired module, eg. app, then under build select assembleDebug it will show you all errors in stdout.

Look at the error you are getting:
C:\Projects\TimeTable\app\src\main\res\layout-land\activity_main.xml Error:error: resource android:attr/colorSwitchThumbNormal is private.
It means that in your activity_main.xml you are referencing the color "android:colorSwitchThumbNormal", but inside the 'android' namespace that resource is private. What you probably meant to do is try to reference that color from the support version of this attribute, so without the "android:" prefix.
<item name="android:colorSwitchThumbNormal">#color/myColor</item>
Replace with:
<item name="colorSwitchThumbNormal">#color/second</item>

Run ./gradlew build -stacktrace in Android Studio terminal. It helps you to find a file that causes this error.

It's Obvious that if you have a big project, it will be a nightmare to check each and every xml file.
Run the following command in android studio terminal and it will give you the filename with the issue
gradlew build --stacktrace

This message means there is a syntax error in your XML file.
If Logcat cannot pinpoint the error with a friendly log message with the xml file name, try cleaning the project and rebuilding the project. It worked for me.
In the Build tab, you will get a node named Android Issues.
The error message explaining the error with the XML file is under it.

To be more generic about the answer provided by #P Fuster. There can be error in your xml files.
I encountered the same error and was having error in the drawable where end tag was missing.

Error is associated with some issue with .xml file. Manually open each xml format file to check for error. I had same issue. Had to manually open each file. There was an error in #string call.

Check your XML files for resolving the Errors.Most of the time the changes made to your XMLfiles get Affected.so try to check the last changes you made.
Try to Clean your Project....It Works
Happy Coding:)

I know this question has been answered already, however, I still would like to add to what a lot has posted here for others having a similar but not specific problem.
This error sometimes also comes as “Android resource linking failed”. It is sometimes vague. The solution sometimes could be quite boring and painful but, this error is absolutely nothing serious.
In this case, the error is not Vague because Android Studio pointed to the problem file.
General Cause
The error shows up when Gradle encounters an error (Usually a syntax or typo error) in one or more of your XML files.
Most of the XML files are located in the res folder, however, you might still find some outside the res folder. For example, the AndroidManifest.xml located in “/src/main/AndroidManifest.xml”. Here is an example of a layout file that would give the “Error: failed linking file resources” error.
Solution
To solve this problem, all you have to do is go through each of your XML files to figure out where the error might be. This could sometimes be time-consuming but be rest assured that the error will disappear as soon as you find and fix the problem XML.
You might be lucky and Android Studio will point you in the exact direction just like the one asked in the question......
Other times like when you are using an older version of Android Studio, the error would not be this specific.
Here are some Tips to finding the problem XML quickly
If you have a lot of XML files and it would be just too difficult to go through them one after the other, you could use the following tips to make the process easier:
Undo: Most times, you are already halfway through a project before you experience this issue. Meaning that it was a recent change to one of your XML files that caused the issue. If that is the case, you can try to undo your recent change to the XML files. To undo, simply use the key combination: Ctrl+Z.
Open every XML file: The second method involves simply opening every single XML file in your project (Without scanning). The reason for this is that sometimes, after opening the problem XML file, Android Studio then detects the error and underlines the exact line.

It is a xml error for some reason may be because of deleting a view or string in another view or may be for missing " or /> ..... etc
But here I am using a good technique to figure out where is the problem exactly :-
Go to every single xml file and minimize the root element if you find something like this
so you got where is the error, fix it then repeat the process for all files.
If the file has an error you will see three dots with red color
Fix the error here I removed this line because this array is not in the string file any more.
Now you can see there is no error in this file any more if you still got the main error so you have to repeat this process again to all xml files until you solve the error
I know it is not the solution of the main problem but it will make you find where is the error quickly and save you time.
Update
There is another way you can find out easily, as Bennik2000 write in comment, you can look at the right scrollbar for red lines, they also indicate errors.
Update
I found a very simple way to get where is the error exactly if it is in resource file or even java file.
1- Go to Project Window.
2- Open the file that has the error.
3- Click F2 to go to the nearest error appears (it will go to the correct line)

I was having the same issue. It was due to a typo in an attribute in one of my XML file. Anyways, Android Studio did not specify the source of the error in the first run. But when I did a
Build -> Clean Project
and then ran the app again it showed me the exact line in the XML code where the typo was.

I have this problem.The main problem was i added an attribute to an BottomAppBar in the xml file.I found error message in android bottom build section explained that error i replaced the attribute and every thing was ok. For others who have the same error but my solution not ok with them you have to read the error message it will guide you to the pain point.

In my case, I made a custom background which was not recognised.
I removed the <?xml version="1.0" encoding="utf-8"?> tag from the top of those two XML resources file.
This worked for me, after trying many solutions from the community. #P Fuster's answer made me try this.

This might be useful for someone who is looking for a different answer. Go to the Gradle Panel and select your module -> Task -> Verification -> Check.
This will check the project for errors and will print the log where the error occurs. Most of the time this Kind of error must be a typo present in your XML file of your project

It can also occur if you leave an element with a null or empty attribute in your XML layout file else if your java file's path of objects creation such as specifying improper ID for the object
here frombottom= AnimationUtils.loadAnimation(this,R.anim); in which anim. the id or filename is left blank can lead to such problem.

I was doing Temperatur Converter App.I was facing same error while running the app as:
Android Studio linking failed.
In String.xml a line was missed, I included the line. It went fine without any errors.
Before Correction
<resources>
<color name="myColor">#FFE4E1</color>
<string name="Celsius">To Celsius</string>
<string name="fahrenheit">To Fahrenheit</string>
<string name="calc">Calculate</string>
</resources>
After editing:
<resources>
<string name="app_name">Temp Converter</string>
<color name="myColor">#FFE4E1</color>
<string name="Celsius">To Celsius</string>
<string name="fahrenheit">To Fahrenheit</string>
<string name="calc">Calculate</string>
</resources>

Sometimes it happen what you copy paste code from another project fro example you copy
<android.support.design.widget.NavigationView
android:id="#+id/nav_view"
android:layout_width="256dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="#android:color/white"
android:fitsSystemWindows="true"
app:headerLayout="#layout/nav_header_main"
app:itemTextColor="#color/colorDrawerItems"
app:menu="#menu/activity_main_drawer" />
Unfortunately Android studio not always show dependency error, but what happen is that class NavigationView is missing because implementation 'com.android.support:design not added to the project

This similar error may also show if you have deleted an Activity java file previously and have not deleted the corresponding xml layout file.
Delete the xml file for the deleted Activity java file and Clean or Rebuild the project.
The reason behind it may be because of the mismatch of context in the xml. (This might occur if you are copy-pasting an xml layout code)
Match the tools:context to the java file of the activity.

This sometimes happens when you have a random XML file doing nothing. Removing the file resolves the issue.

-May be the problem is that you have deleted .java files doing this doesn't delete the .XML files so go to res-> layout and delete those .XML files that you had delete before.
-the another problem may be you haven't delete the files that is present in manifests under syntax that you deleted recently...
So delete and run the code

I had the same problem but it occured in all my projects, I tried Invalidate Cache / Restart but even it doesn´t solved the problem.
At the end I realized that in my Gradle Settings, Offline Work was enabled.
Go to Build, Execution, Deployment > Gradle in Gradle Settings unchecked Offline Work.
It solved the the problem downloading some configuration files for my Android Studio.

My error was in a xml drawable file. I had the first liner duplicate. Changing it to this worked for me:
<?xml version="1.0" encoding="utf-8"?>

Add agian your deleted drawable image .jpg/png etc formate. and
Then run your project to fine working on android studio 3.6.1

I got this error due to 2 lines with the same content but different capitalization:
app:layout_constraintHorizontal_bias="0.5"
...
app:layout_constrainthorizontal_bias="0.5"
Android Studio 2020.3.1 does not mark this as an error in the xml file, but will throw the resource linking error when trying to build

Related

No show anymore message of publisher Java Web Start

I have developed an application via Java Web Start more or less according to this: How do I fix "missing Codebase, Permissions, and Application-Name manifest attribute" in my JNLP app? I have packed the jar with manifest.txt, etc..but in this way I have resolved missing attributes problem, and now I have other problem this message is always showed!! I checked "No show again" and each time I press button to execute and always is showed!! I
Adicionally this is my manifest file:
Manifest-Version: 1.0
Class-Path: .
Main-Class: com.zkteco.biometric.AccesoBiometrioAS2
Permissions: all-permissions
Codebase: http://192.168.111.25:8180/pos-web/
Application-Name: Biometrico
And my Jnlp File this:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://192.168.111.25:8180/pos-web/">
<information> <title>CajaPos</title> <vendor>xxx</vendor>
</information>
<security><all-permissions/>
</security>
<resources>
<j2se version="1.2+"/>
<jar href="xx.jar"
main="true" />
</resources
<application-desc main-class="ec.com.xx.pos" type="JavaFX">
<argument>XY</argument>
</application-desc>
</jnlp>
In this page after check the dialog is not showed again and works fine.
https://docs.oracle.com/javase/tutorial/deployment/webstart/deploying.html
Where XY change for each request because I generate jnlp-xml in a dynamically way with a servlet.
This is due to your Java settings. It is a security prompt. There’s nothing you can change in your application to prevent this dialog, it is up to the end-user to change their security settings to show/hide these dialog windows.
Edit: I also recommend migrating your app to a different delivery platform because Java Web Start is being violently turned off by Oracle.

Metadata file does not contain valid metadata - Unity

I don't know what's going on here. I was able to create an APK for Android. So, it should be easy to make it a Facebook/WebGL game too, right? Apparently not. And, worse: even if I try to make a stand alone or Android build, I get the same error now.
error CS0009: Metadata file `C:\...\Library/FacebookSDK/CanvasJSSDKBindings.jslib' does not contain valid metadata
I don't know what to do with this. I tried deleting it and letting it rebuild. I tried deleting everything in the project (except assets) and let all of that rebuild. I'm using Facebook SDK version 7.12.2. I'm using Unity 2017.3.1f1. Anyone know how to fix this?
This answer was taken verbatim from the Unity forums.
Deleting folder [game path]\Library\FacebookSDK works for me.
You need to verify there is not a file named CanvasJSSDKBindings.jslib in this location.
You must have the following files inside the folder:
Facebook.Unity.dll
Facebook.Unity.Gameroom.dll
Facebook.Unity.Settings.dll
FacebookNamedPipeClient.dll
ivy.xml
version.txt
The contents of ivy.xml must be:
`<?xml version="1.0" encoding="utf-8"?>
<ivy-module version="2.0" xmlns:e="http://ant.apache.org/ivy/extra">
<info organisation="Facebook" module="FacebookSDK" e:packageType="UnityExtension">
<description>Facebook SDK</description>
</info>
<publications>
<artifact name="Facebook.Unity" type="dll" ext="dll" e:guid="2403d1f95ea54028853403e595bc9274" />
<artifact name="Facebook.Unity.Gameroom" type="dll" ext="dll" e:guid="063ad293d9fe40e18bde10bbc71df334" />
<artifact name="Facebook.Unity.Settings" type="dll" ext="dll" e:guid="18b4dbf8a0b54ea4adf46fb7f4d71dd0" />
<artifact name="FacebookNamedPipeClient" type="dll" ext="dll" e:guid="51288a4fc4384861a5b1f9dd49b3da26" />
</publications>
</ivy-module>`
I'm using Unity 2018.1.6f1 and Facebook SDK 7.13.0.

Joomla 3.1.4 ,JInstaller: :Install: Cannot find Joomla XML setup file,error

I have setup already joomla 3.1.4 and I tried to install a plugin,But Im getting this error:
JInstaller: :Install: Cannot find Joomla XML setup file
This is my xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE install PUBLIC "-//Joomla! 1.5//DTD template 1.0//EN" "http://www.joomla.org/xml/dtd/1.5/template-install.dtd">
<extension version="3.1" type="plugin" group="content" client="myjoomlasite">
<name>plg_content_helloworld</name>
<author>Tahsin Çetin</author>
<creationDate>July 27th,2013</creationDate>
<copyright>Tahsin Çetin</copyright>
<licence>GNU General Public License</licence>
<authorEmail>tcetin#yandex.com</authorEmail>
<authorUrl>http://tahsincetin.com</authorUrl>
<version>1.1.0</version>
<description>Simple Hello World plugin</description>
<files>
<filename plugin="helloworld">helloworld.php</filename>
<filename>index.html</filename>
<filename>helloworld.xml</filename>
</files>
</extension>
You do not need to specify "helloworld.xml" in your xml file.Remove file and install again.This will be your final xml file-
<?xml version="1.0" encoding="UTF-8"?>
<extension version="3.1" type="plugin" group="content" client="myjoomlasite">
<name>plg_content_helloworld</name>
<author>Tahsin Çetin</author>
<creationDate>July 27th,2013</creationDate>
<copyright>Tahsin Çetin</copyright>
<licence>GNU General Public License</licence>
<authorEmail>tcetin#yandex.com</authorEmail>
<authorUrl>http://tahsincetin.com</authorUrl>
<version>1.1.0</version>
<description>Simple Hello World plugin</description>
<files>
<filename plugin="helloworld">helloworld.php</filename>
<filename>index.html</filename>
</files>
</extension>
Hope this will help.
The "Cannot find Joomla XML setup file" usually means you are trying to install an extension that wasn't designed for the version of Joomla you are installing to.
Read more here
In your opening <extension> tag, you do not need to specify a client attribute.
Where is the XML file in relation to your ZIP package? If it isn't at the top level of the ZIP, it won't be found.
Generally when this happens something is wrong with the XML file. If you have made any changes, try to think where those changes were and find a problem with the XML file.
Problems could be:
No opening or closing tag. Closing tags are easy to miss. Count them, make sure there's an opening and a closing tag.
Duplicated tags. It's easy to add two labels or showons for example, especially if you are copying and pasting.
Space before the opening XML tag
No closing fieldset tag
No closing extension or config tag. Easily deleted if you are replacing the file
You can easily use a tool like this:
https://www.w3schools.com/xml/xml_validator.asp
Which will help you to find issues such as missing opening and closing tags.

Log4j2.xml file not being seen when using NetBeans

I'm having a problem with my logj2.xml being seen on my Windows7/64 box running Java 1.7.0_13/64. I'm trying to run the application using the NetBeans/64 7.2.1 IDE via the debugger.
log4j2.xml is sitting in my r:\ directory. The (user)classpath is ".;r:\". It is apparently not being seen, because when I look at the 'config.config.name' of the Logger in my debugger, it gives me the value of 'Default'. Also, I can't find the file specified in the log4j2.xml file anywhere, on any drive, of my machine. I've also looked for any new files containing the word 'default' on my machine, and can find none that are current.
So I suspect I'm doing 1 of 2 things wrong:
1) Setting my classpath incorrectly.
2) Putting my log4j2.xml file together incorrectly.
Any help would be appreciated. My keys are getting sticky from banging them with my forehead.
Here's the config file:
<?xml version="1.0" encoding="UTF-8"?>
<configuration status="debug" name="xxx" packages="" >
<appenders>
<RollingFile name="log" fileName="qqq.log"
immediateFlush="true" filePattern="qqq-%d{yyyy-MM-dd}.log">
<PatternLayout>
<pattern>"%d{YYYY-MM-dd HH:mm:ss} [%t] %-5level %logger{36} - %n%msg%n%n%n"</pattern>
</PatternLayout>
<Policies>
<TimeBasedTriggeringPolicy />
<SizeBasedTriggeringPolicy />
</Policies>
<DefaultRolloverStrategy max="92"/>
</RollingFile>
</appenders>
<loggers>
<root level="trace">
<appender-ref ref="log"/>
</root>
</loggers>
</configuration>
Ok, got it. I've renamed this question to include NetBeans, because that was the gist of my problem.
As a review, it is required that the log4j2.xml file needs to go on the classpath. While I could affect the classpath in netbeans by adding jar files to the project, I didn't initially think about finding a config file on the classpath. Anyway, once I realized that, I played around a bit in project properties, and finally figured out that just adding the folder to the 'Compile-time libraries' dialog ( in this case "r:\" ) puts the config file on the classpath, and my logging works just like it should.
Whew!
Hope this helps someone.
Thanks joe7pak, your posts were the last piece of the puzzle to solve my log4j properties problem in NetBeans. My problem required a couple extra steps that may help round this solution out.
First, I created a log4j.xml file in the src directory using the default xml from http://wiki.apache.org/logging-log4j/Log4jXmlFormat.
I then set the NetBeans VM options in Properties\Run to: -Dlog4j.debug. I noticed that a jar's (httpbuilder) log4j.xml file was being loaded by default instead of mine.
So I added the src folder to the compile time libraries in Properties\Libraries using your recommendation. However, it was still loading the log4j.xml file from the jar.
The final touch was to move the src folder to the top of the compile time libraries.
Thanks for your post and for answering yourself.

Why is this simple ant file being marked as an error in Eclipse?

I have a very, very simple any build script:
<project name="quiz_jar" default="all">
<target name="all">
<jar destfile="/home/mike/export/quiz_all.jar" duplicate="preserve">
<archives>
<zips>
<files includes="/home/mike/export/quiz.jar" />
<files includes="/home/mike/download/jeuclid-3.1.9/repo/*.jar" />
</zips>
</archives>
<manifest>
<attribute name="Main-Class" value="com.antlersoft.quiz.ui.QuizFrame"/>
</manifest>
</jar>
</target>
</project>
It works fine when I run it as an Ant task in Eclipse (or from the command line)
However, in the Problems tab, it is marked with the following error:
Default target all does not exist in this
project
I found that if I change any character in the file (like in a path), the error flag goes away. I added a comment to make the error go away. Would still like to know what the problem was.
The closing tag </project> is missing. After adding it I get no errors or warnings in eclipse.
One problem is that you are not closing with a </project> tag, so Eclipse might not be seeing the <target>.
When I ran this from the command line I got a more informative message:
XML document structures must start and end within the same entity.
I was able to resolve this issue for myself by updating Maven. Right click on the project->Maven->Update Project.