Android Question A question about fileprovider.

aumi

New Member
I used the fileprovider to send files to WeChat, and it worked by referring to Erel's sample (just added one line: in.SetComponent("com.tencent.mm/.ui.tools.ShareImgUI")). Later, I gave up on it (as it is not very meaningful for my project, moreover, it is over 4MB...).
Now I want to add this function again, but when I add the fileprovider library, the Logs window displays an error in red.
Unknown member: initializenewinstance
Current declaration does not match previous one.<br />Previous: {Type=f,Rank=0, RemoteObject=False}<br />Current: {Type=JavaObject,Rank=0, RemoteObject=True}
At this time, there is no any relating to fileprovider's code in my project.
When I try to compile it, the following error message appears.
B4A Version: 13.10
Parsing code. (0.02s)
Java Version: 19
Building folders structure. (0.02s)
Compiling code. Error
Error compiling program.
Error description: Current declaration does not match previous one.
Previous: {Type=f,Rank=0, RemoteObject=False}
Current: {Type=JavaObject,Rank=0, RemoteObject=True}
Error occurred on line: 27
Dim f As JavaObject
I wonder where exactly is the line 27(Dim f As JavaObject)? It's not my code.
What should I do?
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

teddybear

Well-Known Member
Licensed User
It seems there is a code module which is named f in your project, rename it or remove it.
 
Last edited:
Upvote 0

aumi

New Member
Oh my god! I found two empty modules f and z at the Modules window, and their contents are as follows.
f:
#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: True
#End Region

Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.

End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    'Activity.LoadLayout("Layout1")

End Sub
z:
Sub Class_Globals
    
End Sub

'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize
    
End Sub
I have never used the Modules window before, and have already forgotten creating these two modules. But this is still very strange: why do they affect the behavior of FileProvider?(In fact, only f does. I tried several times, and it is okay to remove only f while leaving z.)
However, after removing them, the problem was solved.

DonManfred,teddybearThank you for your help.​

 
Upvote 0
Top