Why I receive Invoke error: method not found











up vote
0
down vote

favorite












I try to integrate in Delphi appsFlyer (android)



public abstract interface AppsFlyerConversionListener
{
@WorkerThread
public abstract void onInstallConversionDataLoaded(Map<String, String> paramMap);
public abstract void onInstallConversionFailure(String paramString);
@WorkerThread
public abstract void onAppOpenAttribution(Map<String, String> paramMap);
public abstract void onAttributionFailure(String paramString);
}

public class AppsFlyerLib implements a
{
public static AppsFlyerLib getInstance() {...}
public AppsFlyerLib init(String paramString, AppsFlyerConversionListener paramAppsFlyerConversionListener) {...}
public AppsFlyerLib init(String paramString, AppsFlyerConversionListener paramAppsFlyerConversionListener, Context paramContext) {...}
}


so i translate thoses class in delphi like this :



  {*******************************************************}
JAppsFlyerConversionListenerClass = interface(IJavaClass)
['{FE22E5D8-EF6E-44DE-AE27-45C224FF4E06}']
end;

{**********************************************************}
[JavaSignature('com/appsflyer/AppsFlyerConversionListener')]
JAppsFlyerConversionListener = interface(IJavaInstance)
['{698F89B7-7DD7-4F32-B196-BEE4E16FBD36}']
procedure onAppOpenAttribution(conversionData: JMap); cdecl;
procedure onAttributionFailure(errorMessage: JString); cdecl;
procedure onInstallConversionDataLoaded(conversionData: JMap); cdecl;
procedure onInstallConversionFailure(errorMessage: JString); cdecl;
end;
TJAppsFlyerConversionListener = class(TJavaGenericImport<JAppsFlyerConversionListenerClass, JAppsFlyerConversionListener>) end;

{****************************************}
JAppsFlyerLibClass = interface(IJavaClass)
['{B2787D1A-BDFB-41A3-B876-05148C26FF3F}']
{class} function getInstance: JAppsFlyerLib; cdecl;
end;

{*******************************************}
[JavaSignature('com/appsflyer/AppsFlyerLib')]
JAppsFlyerLib = interface(IJavaInstance)
['{F8676840-7A1B-4BA7-BFFD-362668E9927A}']
function init(key: JString; conversionListener: JAppsFlyerConversionListener): JAppsFlyerLib; cdecl; overload;
function init(key: JString; conversionListener: JAppsFlyerConversionListener; context: JContext): JAppsFlyerLib; cdecl; overload;
end;
TJAppsFlyerLib = class(TJavaGenericImport<JAppsFlyerLibClass, JAppsFlyerLib>) end;


and I implemente the JAppsFlyerConversionListener like this :



TAppsFlyerConversionListener= class(TJavaLocal, JAppsFlyerConversionListener)
private
public
procedure onAppOpenAttribution(conversionData: JMap); cdecl;
procedure onAttributionFailure(errorMessage: JString); cdecl;
procedure onInstallConversionDataLoaded(conversionData: JMap); cdecl;
procedure onInstallConversionFailure(errorMessage: JString); cdecl;
end;


but now when i call :



FAppsFlyerConversionListener := TAppsFlyerConversionListener.create;
TJAppsFlyerLib.JavaClass.getInstance.init(StringToJstring('xxxxx'), FAppsFlyerConversionListener, TAndroidHelper.Context.getApplicationContext);


I receive :




Invoke error: method not found




any idea why ?



NOTE: even doing TJAppsFlyerLib.JavaClass.getInstance.init(nil, nil, nil) return me




Invoke error: method not found




NOTE2: I don't know if it's matter but we have also the function init in JObjectClass :



  JObjectClass = interface(IJavaClass)
['{83BD30EE-FE9B-470D-AD6C-23AEAABB7FFA}']
{class} function init: JObject; cdecl;
end;









share|improve this question
























  • Embarcadero's JNIBridge framework uses its own init() methods for class constructors. If a class has an actual non-constructor init() method, there is likely a conflict within the framework's internal logic. You should file a bug report with Embarcadero.
    – Remy Lebeau
    Nov 4 at 17:06















up vote
0
down vote

favorite












I try to integrate in Delphi appsFlyer (android)



public abstract interface AppsFlyerConversionListener
{
@WorkerThread
public abstract void onInstallConversionDataLoaded(Map<String, String> paramMap);
public abstract void onInstallConversionFailure(String paramString);
@WorkerThread
public abstract void onAppOpenAttribution(Map<String, String> paramMap);
public abstract void onAttributionFailure(String paramString);
}

public class AppsFlyerLib implements a
{
public static AppsFlyerLib getInstance() {...}
public AppsFlyerLib init(String paramString, AppsFlyerConversionListener paramAppsFlyerConversionListener) {...}
public AppsFlyerLib init(String paramString, AppsFlyerConversionListener paramAppsFlyerConversionListener, Context paramContext) {...}
}


so i translate thoses class in delphi like this :



  {*******************************************************}
JAppsFlyerConversionListenerClass = interface(IJavaClass)
['{FE22E5D8-EF6E-44DE-AE27-45C224FF4E06}']
end;

{**********************************************************}
[JavaSignature('com/appsflyer/AppsFlyerConversionListener')]
JAppsFlyerConversionListener = interface(IJavaInstance)
['{698F89B7-7DD7-4F32-B196-BEE4E16FBD36}']
procedure onAppOpenAttribution(conversionData: JMap); cdecl;
procedure onAttributionFailure(errorMessage: JString); cdecl;
procedure onInstallConversionDataLoaded(conversionData: JMap); cdecl;
procedure onInstallConversionFailure(errorMessage: JString); cdecl;
end;
TJAppsFlyerConversionListener = class(TJavaGenericImport<JAppsFlyerConversionListenerClass, JAppsFlyerConversionListener>) end;

{****************************************}
JAppsFlyerLibClass = interface(IJavaClass)
['{B2787D1A-BDFB-41A3-B876-05148C26FF3F}']
{class} function getInstance: JAppsFlyerLib; cdecl;
end;

{*******************************************}
[JavaSignature('com/appsflyer/AppsFlyerLib')]
JAppsFlyerLib = interface(IJavaInstance)
['{F8676840-7A1B-4BA7-BFFD-362668E9927A}']
function init(key: JString; conversionListener: JAppsFlyerConversionListener): JAppsFlyerLib; cdecl; overload;
function init(key: JString; conversionListener: JAppsFlyerConversionListener; context: JContext): JAppsFlyerLib; cdecl; overload;
end;
TJAppsFlyerLib = class(TJavaGenericImport<JAppsFlyerLibClass, JAppsFlyerLib>) end;


and I implemente the JAppsFlyerConversionListener like this :



TAppsFlyerConversionListener= class(TJavaLocal, JAppsFlyerConversionListener)
private
public
procedure onAppOpenAttribution(conversionData: JMap); cdecl;
procedure onAttributionFailure(errorMessage: JString); cdecl;
procedure onInstallConversionDataLoaded(conversionData: JMap); cdecl;
procedure onInstallConversionFailure(errorMessage: JString); cdecl;
end;


but now when i call :



FAppsFlyerConversionListener := TAppsFlyerConversionListener.create;
TJAppsFlyerLib.JavaClass.getInstance.init(StringToJstring('xxxxx'), FAppsFlyerConversionListener, TAndroidHelper.Context.getApplicationContext);


I receive :




Invoke error: method not found




any idea why ?



NOTE: even doing TJAppsFlyerLib.JavaClass.getInstance.init(nil, nil, nil) return me




Invoke error: method not found




NOTE2: I don't know if it's matter but we have also the function init in JObjectClass :



  JObjectClass = interface(IJavaClass)
['{83BD30EE-FE9B-470D-AD6C-23AEAABB7FFA}']
{class} function init: JObject; cdecl;
end;









share|improve this question
























  • Embarcadero's JNIBridge framework uses its own init() methods for class constructors. If a class has an actual non-constructor init() method, there is likely a conflict within the framework's internal logic. You should file a bug report with Embarcadero.
    – Remy Lebeau
    Nov 4 at 17:06













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I try to integrate in Delphi appsFlyer (android)



public abstract interface AppsFlyerConversionListener
{
@WorkerThread
public abstract void onInstallConversionDataLoaded(Map<String, String> paramMap);
public abstract void onInstallConversionFailure(String paramString);
@WorkerThread
public abstract void onAppOpenAttribution(Map<String, String> paramMap);
public abstract void onAttributionFailure(String paramString);
}

public class AppsFlyerLib implements a
{
public static AppsFlyerLib getInstance() {...}
public AppsFlyerLib init(String paramString, AppsFlyerConversionListener paramAppsFlyerConversionListener) {...}
public AppsFlyerLib init(String paramString, AppsFlyerConversionListener paramAppsFlyerConversionListener, Context paramContext) {...}
}


so i translate thoses class in delphi like this :



  {*******************************************************}
JAppsFlyerConversionListenerClass = interface(IJavaClass)
['{FE22E5D8-EF6E-44DE-AE27-45C224FF4E06}']
end;

{**********************************************************}
[JavaSignature('com/appsflyer/AppsFlyerConversionListener')]
JAppsFlyerConversionListener = interface(IJavaInstance)
['{698F89B7-7DD7-4F32-B196-BEE4E16FBD36}']
procedure onAppOpenAttribution(conversionData: JMap); cdecl;
procedure onAttributionFailure(errorMessage: JString); cdecl;
procedure onInstallConversionDataLoaded(conversionData: JMap); cdecl;
procedure onInstallConversionFailure(errorMessage: JString); cdecl;
end;
TJAppsFlyerConversionListener = class(TJavaGenericImport<JAppsFlyerConversionListenerClass, JAppsFlyerConversionListener>) end;

{****************************************}
JAppsFlyerLibClass = interface(IJavaClass)
['{B2787D1A-BDFB-41A3-B876-05148C26FF3F}']
{class} function getInstance: JAppsFlyerLib; cdecl;
end;

{*******************************************}
[JavaSignature('com/appsflyer/AppsFlyerLib')]
JAppsFlyerLib = interface(IJavaInstance)
['{F8676840-7A1B-4BA7-BFFD-362668E9927A}']
function init(key: JString; conversionListener: JAppsFlyerConversionListener): JAppsFlyerLib; cdecl; overload;
function init(key: JString; conversionListener: JAppsFlyerConversionListener; context: JContext): JAppsFlyerLib; cdecl; overload;
end;
TJAppsFlyerLib = class(TJavaGenericImport<JAppsFlyerLibClass, JAppsFlyerLib>) end;


and I implemente the JAppsFlyerConversionListener like this :



TAppsFlyerConversionListener= class(TJavaLocal, JAppsFlyerConversionListener)
private
public
procedure onAppOpenAttribution(conversionData: JMap); cdecl;
procedure onAttributionFailure(errorMessage: JString); cdecl;
procedure onInstallConversionDataLoaded(conversionData: JMap); cdecl;
procedure onInstallConversionFailure(errorMessage: JString); cdecl;
end;


but now when i call :



FAppsFlyerConversionListener := TAppsFlyerConversionListener.create;
TJAppsFlyerLib.JavaClass.getInstance.init(StringToJstring('xxxxx'), FAppsFlyerConversionListener, TAndroidHelper.Context.getApplicationContext);


I receive :




Invoke error: method not found




any idea why ?



NOTE: even doing TJAppsFlyerLib.JavaClass.getInstance.init(nil, nil, nil) return me




Invoke error: method not found




NOTE2: I don't know if it's matter but we have also the function init in JObjectClass :



  JObjectClass = interface(IJavaClass)
['{83BD30EE-FE9B-470D-AD6C-23AEAABB7FFA}']
{class} function init: JObject; cdecl;
end;









share|improve this question















I try to integrate in Delphi appsFlyer (android)



public abstract interface AppsFlyerConversionListener
{
@WorkerThread
public abstract void onInstallConversionDataLoaded(Map<String, String> paramMap);
public abstract void onInstallConversionFailure(String paramString);
@WorkerThread
public abstract void onAppOpenAttribution(Map<String, String> paramMap);
public abstract void onAttributionFailure(String paramString);
}

public class AppsFlyerLib implements a
{
public static AppsFlyerLib getInstance() {...}
public AppsFlyerLib init(String paramString, AppsFlyerConversionListener paramAppsFlyerConversionListener) {...}
public AppsFlyerLib init(String paramString, AppsFlyerConversionListener paramAppsFlyerConversionListener, Context paramContext) {...}
}


so i translate thoses class in delphi like this :



  {*******************************************************}
JAppsFlyerConversionListenerClass = interface(IJavaClass)
['{FE22E5D8-EF6E-44DE-AE27-45C224FF4E06}']
end;

{**********************************************************}
[JavaSignature('com/appsflyer/AppsFlyerConversionListener')]
JAppsFlyerConversionListener = interface(IJavaInstance)
['{698F89B7-7DD7-4F32-B196-BEE4E16FBD36}']
procedure onAppOpenAttribution(conversionData: JMap); cdecl;
procedure onAttributionFailure(errorMessage: JString); cdecl;
procedure onInstallConversionDataLoaded(conversionData: JMap); cdecl;
procedure onInstallConversionFailure(errorMessage: JString); cdecl;
end;
TJAppsFlyerConversionListener = class(TJavaGenericImport<JAppsFlyerConversionListenerClass, JAppsFlyerConversionListener>) end;

{****************************************}
JAppsFlyerLibClass = interface(IJavaClass)
['{B2787D1A-BDFB-41A3-B876-05148C26FF3F}']
{class} function getInstance: JAppsFlyerLib; cdecl;
end;

{*******************************************}
[JavaSignature('com/appsflyer/AppsFlyerLib')]
JAppsFlyerLib = interface(IJavaInstance)
['{F8676840-7A1B-4BA7-BFFD-362668E9927A}']
function init(key: JString; conversionListener: JAppsFlyerConversionListener): JAppsFlyerLib; cdecl; overload;
function init(key: JString; conversionListener: JAppsFlyerConversionListener; context: JContext): JAppsFlyerLib; cdecl; overload;
end;
TJAppsFlyerLib = class(TJavaGenericImport<JAppsFlyerLibClass, JAppsFlyerLib>) end;


and I implemente the JAppsFlyerConversionListener like this :



TAppsFlyerConversionListener= class(TJavaLocal, JAppsFlyerConversionListener)
private
public
procedure onAppOpenAttribution(conversionData: JMap); cdecl;
procedure onAttributionFailure(errorMessage: JString); cdecl;
procedure onInstallConversionDataLoaded(conversionData: JMap); cdecl;
procedure onInstallConversionFailure(errorMessage: JString); cdecl;
end;


but now when i call :



FAppsFlyerConversionListener := TAppsFlyerConversionListener.create;
TJAppsFlyerLib.JavaClass.getInstance.init(StringToJstring('xxxxx'), FAppsFlyerConversionListener, TAndroidHelper.Context.getApplicationContext);


I receive :




Invoke error: method not found




any idea why ?



NOTE: even doing TJAppsFlyerLib.JavaClass.getInstance.init(nil, nil, nil) return me




Invoke error: method not found




NOTE2: I don't know if it's matter but we have also the function init in JObjectClass :



  JObjectClass = interface(IJavaClass)
['{83BD30EE-FE9B-470D-AD6C-23AEAABB7FFA}']
{class} function init: JObject; cdecl;
end;






delphi firemonkey appsflyer






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 4 at 13:37

























asked Nov 4 at 9:45









loki

2,55821044




2,55821044












  • Embarcadero's JNIBridge framework uses its own init() methods for class constructors. If a class has an actual non-constructor init() method, there is likely a conflict within the framework's internal logic. You should file a bug report with Embarcadero.
    – Remy Lebeau
    Nov 4 at 17:06


















  • Embarcadero's JNIBridge framework uses its own init() methods for class constructors. If a class has an actual non-constructor init() method, there is likely a conflict within the framework's internal logic. You should file a bug report with Embarcadero.
    – Remy Lebeau
    Nov 4 at 17:06
















Embarcadero's JNIBridge framework uses its own init() methods for class constructors. If a class has an actual non-constructor init() method, there is likely a conflict within the framework's internal logic. You should file a bug report with Embarcadero.
– Remy Lebeau
Nov 4 at 17:06




Embarcadero's JNIBridge framework uses its own init() methods for class constructors. If a class has an actual non-constructor init() method, there is likely a conflict within the framework's internal logic. You should file a bug report with Embarcadero.
– Remy Lebeau
Nov 4 at 17:06

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53139487%2fwhy-i-receive-invoke-error-method-not-found%23new-answer', 'question_page');
}
);

Post as a guest





































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53139487%2fwhy-i-receive-invoke-error-method-not-found%23new-answer', 'question_page');
}
);

Post as a guest




















































































這個網誌中的熱門文章

Tangent Lines Diagram Along Smooth Curve

Yusuf al-Mu'taman ibn Hud

Zucchini