Oxidizer doesn't seem to import correctly

Hmm, i just logged in with your account and this is what i see on the beta page:

ar ely sure you are looking at the BETA downloads page, and not the release versions?

I guess not, your link worked for me. Everwood still didn’t report the beta availability. Odd.

So I tried recompiling with the new beta and go 12 errors. But they are different errors than before, so I’m going to see if I can sort them out a bit.

Everwood will only report the update for a beta off you’re already on a beta. Otherwise, everyone using the shipping versions would get notifications very week :wink:

Interesting. I was on the beta, and Everwood would tell about new beta releases. Maybe a regular release go involved in there somehow and reset me back to non-beta? I don’t know.

Anyway, I’ve gotten rid of the errors, and I’m now trying to sort out some warnings.

Thanks.

OK, got rid of the warnings, but now I’m getting:

() com.android.sdklib.build.DuplicateFileException: Duplicate files at the same path inside the APK com.[redacted] C:\Program Files (x86)\MSBuild\RemObjects Software\Elements\RemObjects.Elements.Cooper.Android.targets 164

Not sure I’ve seen that before. Any suggestions?

Yes, you need to have a beta installed right now, to get notified about betas. If you upgrade to an RTM. you stop getting notifications (Everwood just goes by ā€œis the currently installed build a betaā€, not ā€œwas there ever a beta installedā€. I suppose we could make its separate flag, instead… i’ll this about that.

hmm, i think i had the same. try turning off Predex to see ion that works around the issue. If that fixe it, it’s a bug, for sure.

marc

If I knew how to turn of Predex, I’d be happy to do that. (A quick google-fu shed no light on that for me…)

If this helps, thinking I could maybe make progress on other fronts, I tried importing this class from a .java file:

package com.accordancebible.framework;

import android.graphics.Color;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffColorFilter;
import android.os.Build;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.internal.view.menu.ActionMenuItemView;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.widget.ImageView;

import java.util.ArrayList;

public class ColorizeTheToolBar
{
    static public void colorizeToolBarItem(AppCompatActivity myActivity, final String description, boolean bIsBlue)
    {   int theColor;
        if (bIsBlue)
            theColor = myActivity.getResources().getColor(R.color.colorAccent);
        else
            theColor = myActivity.getResources().getColor(R.color.colorGreyToolbarIcons);
        final ViewGroup decorView = (ViewGroup) myActivity.getWindow().getDecorView();
        final ViewTreeObserver viewTreeObserver = decorView.getViewTreeObserver();
        final String myOverflowDescription = myActivity.getString(R.string.overflow_image);
        final PorterDuffColorFilter colorFilter = new PorterDuffColorFilter(theColor, PorterDuff.Mode.SRC_ATOP);
        viewTreeObserver.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener()
        {   @Override
            public void onGlobalLayout()
            {   final ArrayList<View> outViews = new ArrayList<>();
                decorView.findViewsWithText(outViews, description, View.FIND_VIEWS_WITH_CONTENT_DESCRIPTION);
                if (outViews.isEmpty())
                    return;
                if (description == myOverflowDescription)
                {   ImageView overflow = (ImageView) outViews.get(0);
                    overflow.setColorFilter(colorFilter);
                }
                else
                {   ActionMenuItemView overflow = (ActionMenuItemView) outViews.get(0);
                    overflow.getCompoundDrawables()[0].setColorFilter(colorFilter);
                }
                removeOnGlobalLayoutListener(decorView, this);
            }
        });
    }

    private static void removeOnGlobalLayoutListener(View myView, ViewTreeObserver.OnGlobalLayoutListener myListener)
    {   if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN)
            myView.getViewTreeObserver().removeGlobalOnLayoutListener(myListener);
        else
            myView.getViewTreeObserver().removeOnGlobalLayoutListener(myListener);
    }

}

which gave me an error or two, which I worked around. Then I started getting 210 errors. So I started commenting out the converted code. Still 210. So I removed that converted class from the project. Now, even after cleaning, I get these:

5 times: (E46) Unknown identifier "R"	
2 times: (E46) Unknown identifier "com.accordancebible.accordance.R"	
1 time: (E43) No static member "main" on type "android.R.layout"	
1 time: (E43) No static member "fragment_canvas_drawing" on type "android.R.layout"
2 times: (E43) No static member "fragmentContainer" on type "android.R.id"
1 time: (E43) No static member "activity_fragment" on type "android.R.layout"

and I assume all of these descend from the same sort of problem.

I chose that class above to import, because it does not itself have an associated layout. It is used to colorize toolbar items at runtime. Behaves well in java land.

So if that helps…

could you send me the full project that shows these errors?

Yes. I have a meeting shortly, but after that, I’ll pull it together and message you with a Dropbox link to a zip of the project.

1 Like

Message sent.

There was a rogue style.xml file in the res folder (on disk, but not isn the project). the caused the resource processing to fail with

                                  Found 23 custom asset files in /Users/mh/Downloads/Scott_Musser/Test/AccordanceAndroid/com.accordancebible.Accordance/assets
/Library/Frameworks/Mono.framework/External/xbuild/RemObjects Software/Elements/RemObjects.Elements.Cooper.Android.targets: error : invalid resource directory name: /Users/mh/Downloads/Scott_Musser/Test/AccordanceAndroid/com.accordancebible.Accordance/obj/Debug/Android/res styles.xml

: error GR6: Error while converting R.java file

after i deleted it, the project compiles further, and fails on one (probably legitimate) error:

        /Users/mh/Downloads/Scott_Musser/Test/AccordanceAndroid/com.accordancebible.Accordance/TheCommonCode/p105SingleVerse.pas(1848,42): error E131: "case" item "'?'" overlaps with "'?'"

Curiously, your source files have CR line breaks, which makes the source files rather hard to look at, at least in Fire, because CR is not a valid line break style we handle (only LF and CR+LF are).

hope this helps.
marc

Actually, that case error looks like a compiler bug:

            '[', ']', '{', '}', '>', '<', '²', '³':   { strip all brackets, braces, angle and double brackets } // E131 "case" item "'?'" overlaps with "'?'"
                                                                                                                // N1 Previous declaration was here

logged as 75356.

(Also updated Fire to handle CR line breaks in the future).

I think I found and removed that extra styles, but I’m still getting a bunch of R related errors. (I can’t even get you your p105 case issue.

I’m essentially working on the TestAfterClassRemoval.zip project. And I’m still getting as above:

5 times: (E46) Unknown identifier "R"	
2 times: (E46) Unknown identifier "com.accordancebible.accordance.R"	
1 time: (E43) No static member "main" on type "android.R.layout"	
1 time: (E43) No static member "fragment_canvas_drawing" on type "android.R.layout"
2 times: (E43) No static member "fragmentContainer" on type "android.R.id"
1 time: (E43) No static member "activity_fragment" on type "android.R.layout"

Did you not get these errors off that project?

Nope, in fact the project builds without any errors for me now, after fixing the case…

I have two sets of this (what I sent was actually cut down to save size) and I’m getting two sets of that list of errors on both projects.

Can you import the ColorizeTheToolbar class (there is an import bug in there), and then remove it and compile without error?

Is there something in my environment outside the project that could be creating this?

How do you mean, import?

On the UX_New folder, right click, Add…, Import Java as Oxygene. Pick the ColorizeTheToolBar.java. You should get a conversion error. Fixing that got me some more errors, so I tried removing the converted class, so now I have those remaining errors.

Ah, ok. it’ll have a look at that later today, if i find the time, else Wednesday (i’ll be out of office tomorrow)