NativeScript / NativeScript/android

SBG generating conflicting class definitions

未关闭
#1,569 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@vmutafov 已经在做这个了。

开始于 2020年2月6日。

主要语言
C++
星标
563
派生
144
平均合并
10 小时 46 分钟
30 天内合并 PR
14

描述

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 6.3
  • Cross-platform modules:6.3
  • Android Runtime:6.3
  • Plugin(s): Creating/Updating SciChart plugin

Describe the bug
SBG throws the following error:

/home/nathanael/projects/NativeScript/repos/nativescript-scichart/demo/platforms/android/app/src/main/java/com/tns/gen/com/scichart/charting/visuals/renderableSeries/tooltips/XySeriesTooltip_bundle_25_108_.java:27: error: name clash: internalUpdate(XySeriesInfo) and internalUpdate(XySeriesInfo<? extends Object>) have the same erasure
protected void internalUpdate(
^
/home/nathanael/projects/NativeScript/repos/nativescript-scichart/demo/platforms/android/app/src/main/java/com/tns/gen/com/scichart/charting/visuals/renderableSeries/tooltips/XySeriesTooltip_bundle_25_108_.java:18: error: name clash: internalUpdate(XySeriesInfo<? extends Object>) in XySeriesTooltip_bundle_25_108_ and internalUpdate(XySeriesInfo) in XySeriesTooltip have the same erasure, yet neither overrides the other
protected void internalUpdate(

To Reproduce
Gradle:

repositories {
    maven { url 'https://www.myget.org/F/abtsoftware/maven' }
 }

dependencies {
    // Declare SciChart libraries as module dependencies
       implementation (group: 'com.scichart.library', name: 'core', version: '3.+', ext: 'aar')
        implementation (group: 'com.scichart.library', name: 'data', version: '3.+', ext: 'aar')
        implementation (group: 'com.scichart.library', name: 'drawing', version: '3.+', ext: 'aar')
        implementation (group: 'com.scichart.library', name: 'charting3d', version: '3.+', ext: 'aar')
        implementation (group: 'com.scichart.library', name: 'charting', version: '3.+', ext: 'aar')
        implementation (group: 'com.scichart.library', name: 'extensions', version: '3.+', ext: 'aar')
        implementation (group: 'com.scichart.library', name: 'extensions3d', version: '3.+', ext: 'aar')
}

JavaScript

const FirstCustomXySeriesTooltip = com.scichart.charting.visuals.renderableSeries.tooltips.XySeriesTooltip.extend( {
	internalUpdate: function(seriesInfo) {
           console.log("Hi");
        }});
const tooltip = new FirstCustomXySeriesTooltip();

Expected behavior
It works

Sample project

  • contact me, I can send it privately....

Additional context
It is complaining about the internalUpdate this function ends up with two of them

Class Generated:

* AUTO-GENERATED FILE. DO NOT MODIFY.
 * This class was automatically generated by the
 * static binding generator from the resources it found.
 * Please do not modify by hand.
 */
package com.tns.gen.com.scichart.charting.visuals.renderableSeries.tooltips;

public class XySeriesTooltip_bundle_25_108_
    extends com.scichart.charting.visuals.renderableSeries.tooltips.XySeriesTooltip
    implements com.tns.NativeScriptHashCodeProvider {
  public XySeriesTooltip_bundle_25_108_(
      android.content.Context param_0,
      com.scichart.charting.visuals.renderableSeries.hitTest.XySeriesInfo param_1) {
    super(param_0, param_1);
    com.tns.Runtime.initInstance(this);
  }

  protected void internalUpdate(
      com.scichart.charting.visuals.renderableSeries.hitTest.XySeriesInfo<
              ? extends java.lang.Object>
          param_0) {
    java.lang.Object[] args = new java.lang.Object[1];
    args[0] = param_0;
    com.tns.Runtime.callJSMethod(this, "internalUpdate", void.class, args);
  }

  protected void internalUpdate(
      com.scichart.charting.visuals.renderableSeries.hitTest.XySeriesInfo param_0) {
    java.lang.Object[] args = new java.lang.Object[1];
    args[0] = param_0;
    com.tns.Runtime.callJSMethod(this, "internalUpdate", void.class, args);
  }

  public int hashCode__super() {
    return super.hashCode();
  }

  public boolean equals__super(java.lang.Object other) {
    return super.equals(other);
  }
}

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。