Oxidizer doesn't seem to import correctly

I get no import errors, but some valid code error in the imported file:

var outViews: ArrayList<View> := new ArrayList<View>(); // needs the class name inside <>

uses android.support.v7.internal.view.menu, // namespace is unknown

i alos do get R being undefined din that file b it thats because the namespace doesn’t match? If i add com.accordancebible.accordance, to the uses clause, it gets found.

i also get these errors, which i cant look into right now, but they probably are legit:

  viewTreeObserver.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener(new class (onGlobalLayout := method  begin // W0 Case for identifier "ViewTreeObserver" does not match original case "viewTreeObserver"
                                                                                                                                    // E266 Cannot access underlying field to raise event "ViewTreeObserver.OnGlobalLayoutListener"
                                                                                                                                    // E130 Type expected

I fixed that first one by

var outViews: ArrayList<View> := new ArrayList<>(View);

and changed the namespace.

I don’t get those errors, but I do get 210 errors.

I posted a .png of the screenshot with some of those errors.

That is in the same Dropbox link.

Hello?!?

I’m kinda dead in the water here. If a solution came through, I missed it.

Sorry, i have no idea. as per my last message, the project now compile here, after ding the steps you outlined and we discussed. If it doesn’t for you, we must be doing something different.

Maybe if you can send me the new project, as it is now for you, i can have another look. It might also make sense for you to retry with the upcoming next beta build, first.

I’ve just uploaded the project with the 210 errors to the Dropbox link. That project is Test210Errors.zip. The png with the screen shot is already up there.

Checking now.

I get five errors in this project, same as before:

UX_New/ColorizeTheToolBar2.pas(11,3): error E26: Unknown namespace "android.support.v7.internal.view.menu" in uses list

correct, that namespace IS invalid/unknown. drop the “internal”

UX_New/ColorizeTheToolBar2.pas(50,21): error E548: Unknown type "ActionMenuItemView", did you mean "android.support.v7.view.menu.ActionMenuItemView"?
```

thew above also fixes this.

```
TheCommonCode/p105SingleVerse.pas(1848,42): error E131: "case" item "'?'" overlaps with "'?'"
```

same issue as discussed before. this is fixed by changing the file to have a proper UTF 8 encoding, but you probably want to review the exact character literals on that line.

```
UX_New/ColorizeTheToolBar2.pas(39,50): error E266: Cannot access underlying field to raise event "ViewTreeObserver.OnGlobalLayoutListener"
UX_New/ColorizeTheToolBar2.pas(39,50): error E130: Type expected
```

no idea about this one. but then, i'm not deeply familiar with the code base, it does looks like its probably a valid error, maybe complicated  by the fact that `viewTreeObserver` the local variable hides `ViewTreeObserver` the class in scope, with Oxygene being case sensitive. renaming the var to `viewTreeObserver2` make the error a bit clearer:

```
// E63 Type mismatch
// E196 Valid method reference is expected
```

—marc

I don’t get to those errors. Did you see the png posted?

(GR6) Error while converting R.java file.
and (Android) Attribute "xxxxx" has already been defined, every one of which is in the generated attrs.xlm file.

The ‘internal’ works in the Android Studio, but I removed it.

And I fixed the ViewTreeObserver casing problem.

But with the attrs.xml file problems, it appears I don’t even get the “Case” item issue or any of the above issues.

I have uploaded the offending file to Dropbox. And when I double-click the errors, the path to the file it brings up is:

C:\Android\adt-bundle-windows-x86_64-20131030\sdk\extras\android\support\v7\appcompat\res\values

which is not project-specific. So I wonder if somehow on my machine, it is referencing that file twice (either the same file twice, or in two different locations) somehow during the build.

Does that make any sense? I can’t otherwise explain how the same project works (as much as it does) whereas I don’t get that far.

I have no idea :(. I might need to bring in someone else on this issue, on Monday. All i know is here on my end, the project compiles fine, except for that one issue with the anonymous class (which probably was just converted wrongly and needs a slight syntax tweak).

Please do retest with the upcoming .2005 beta build.

OK, I’ll retest it this weekend and post.

1 Like

I retested with the new beta. Same 210 errors.

The odd thing is that I didn’t get these 210 errors (nearly all in attrr.xml) until after I imported that class, then tried removing it.

Bump.

yeah, not sure what to tell you. the project, as i have it, builds fine here, except for the one legitimate error.

2 posts were split to a new topic: E0 error compiling android java code

bugs://i63283 was closed as fixed.

Logged as bugs://i63283.

Logged as bugs://i63300.

bugs://i63300 was closed as fixed.

Logged as bugs://i63329.

bugs://i63329 was closed as fixed.