Skip to content

Android dex2oatd error #1192

@gszo123

Description

@gszo123

JTS version: 1.20.0

There is an Android dex2oatd compiler error as follows:

dex2oatd F 04-17 06:43:05 90246 90246 
method_verifier.cc:5126] Verification error in void org.locationtech.jts.operation.relateng.RelatePointLocator.init(org.locationtech.jts.geom.Geometry)
dex2oatd F 04-17 06:43:05 90246 90246 method_verifier.cc:5126] void org.locationtech.jts.operation.relateng.RelatePointLocator.init(org.locationtech.jts.geom.Geometry) failed to verify: void org.locationtech.jts.operation.relateng.RelatePointLocator.init(org.locationtech.jts.geom.Geometry): [0x2D] register v3 has type Reference: java.lang.Object[] but expected Reference: org.locationtech.jts.algorithm.locate.PointOnGeometryLocator[]
dex2oatd F 04-17 06:43:05 90246 90246 method_verifier.cc:5126]
dex2oatd F 04-17 06:43:10 90246 90246 compiler_driver.cc:866] Had a hard failure verifying all classes, and was asked to abort in such situations. 

Seems to be caused by the lack of type cast in modules/core/src/main/java/org/locationtech/jts/operation/relateng/RelatePointLocator.java:

  private void init(Geometry geom) {
    //-- cache empty status, since may be checked many times
    isEmpty = geom.isEmpty();
    extractElements(geom);
    
    if (lines != null) {
      lineBoundary = new LinearBoundary(lines, boundaryRule);
    }
    
    if (polygons != null) {
      polyLocator = isPrepared 
          ? new IndexedPointInAreaLocator[polygons.size()]
              : new SimplePointInAreaLocator[polygons.size()];
    }
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions