Android Question 3rd aar, initSDK always error,why?

jstzjjk

Member
I initSDK in b4a,but always error,show init GDTADPlugin error
while i initSDK in AS, never error.
Main Code:
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
#MultiDex: True
#AdditionalJar: androidx.appcompat:appcompat
' place at project,should move to Addtional libray, or its real path
#AdditionalJar: C:\_FetchDemo\gdt_fetchAdDemo\GDTSDK.unionNormal.4.482.1352.aar

#End Region

Sub Process_Globals
     Private xui As XUI
End Sub

Sub Globals
  Dim ad As Panel
End Sub
 
Sub Activity_Create(FirstTime As Boolean)
    Dim jo As JavaObject
    jo.InitializeStatic("com.qq.e.comm.managers.GDTAdSdk")
    Dim rx As Reflector
    jo.RunMethod("init", Array As Object( rx.GetContext, "1200794210")  )
'  AS: MyApplication_onCreate ,it runs ok.
'    GDTAdSdk.init( this, "1200794210");
'  but in B4A, ERROR:  
'  
'    Fail To init GDTADPLugin,PluginClassLoader == null;while loading factory impl For:interface com.qq.e.comm.pi.POFactory
'    com.qq.e.comm.managers.plugin.e: Fail To init GDTADPLugin,PluginClassLoader == null;while loading factory impl For:interface com.qq.e.comm.pi.POFactory
'    at com.qq.e.comm.managers.plugin.PM.getFactory(:4)
   
    Activity.LoadLayout("Layout")
the demo project is here.

http://ys-k.ysepan.com/611840552/419675879/k544U644684MILVSg9wT5e/gdt_fetchAdDemo.zip
or
https://github.com/feifeiyu5689/demo/raw/main/gdt_fetchAdDemo.zip
 
Last edited:

jstzjjk

Member

Erel, I have try it for a month, but i can not find any useful information in log. the demo project i have post it.​

*** Debugger waiting for connection (0) ***
*** Debugger waiting for connection (1) ***
showOrHideHighlightView: hasFocus=true; winMode=1; isMrgNull=true
startInputReason = 1
*** Service (starter) Create ***
mMoveStepInDp: 64, mMoveStepInPixel: 192, mUpTimeDelayed: 100
ViewRootImpl mIsInProductivePCDisplay: false
dispatchInputInterval 1000000
** Service (starter) Start **
startInputReason = 5
** Activity (main) Create, isFirst = true **
After accept
插件初始化失败
20:36:24
********************************************
********************************************permission
Fail to init GDTADPLugin,PluginClassLoader == null;while loading factory impl for:interface com.qq.e.comm.pi.POFactory
com.qq.e.comm.managers.plugin.e: Fail to init GDTADPLugin,PluginClassLoader == null;while loading factory impl for:interface com.qq.e.comm.pi.POFactory
at com.qq.e.comm.managers.plugin.PM.getFactory:)4)
at com.qq.e.comm.managers.plugin.PM.getPOFactory(Unknown Source:11)
at com.qq.e.comm.managers.a.run(Unknown Source:6)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:929)
********************************************2
** Activity (main) Resume **
EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
disableOutlineDraw is true
dispatchDetachedFromWindow in doDie
EGLNativeWindowType 0x73b152d910 disconnect failed
handleInit switch not opened pid=12848
startInputReason = 8
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
This is not a standard library. It is made of several components including native binaries. Probably to prevent hacking.
As you see, it will not be simple to use it with B4A. You might be able to understand the process by examining the generated objects from the Android Studio project.
I think that a component named com.jksoft.gdtlibrary is missing. This tool loads the compiled dex at runtime.
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
Upvote 0

jstzjjk

Member
com.jksoft.gdtlibrary is wrote by myself,for trying wrapped it and use in b4a. but also fail.perhaps not clean it up.
i agree its not a standard library. and i found several same question about it.
not found anybody success.
but no special step in AS,it can run.
so, b4a can not do with it ? i have been stopped here for a long time.
 
Upvote 0
Top