8000 Android shared objects broken · Issue #747 · rbfx/rbfx · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content < 8000 /span>
Android shared objects broken #747
Open
@AaronKel

Description

@AaronKel

Running the sample project with shared objects on you'll see the following error on Android

2025-05-08 13:09:35.676 26697-26788 Urho3D io.urho3d E [13:09:35] [error] [main] : Failed to load plugin 'App.Main'

The problems are in (1)

ModulePlugin::NameToPath

and (2)

DynamicModule::ReadModuleInformation

These are the workarounds so far, a better fix to come...

(1) ModulePlugin::NameToPath:
Gives the wrong path name for an APK as there is no option for Android
Workaround:

ea::string ModulePlugin::NameToPath(const ea::string& name) const
{
    FileSystem* fs = context_->GetSubsystem<FileSystem>();
    ea::string result;

#if defined(__ANDROID__)
    return Format("lib{}{}", name, DYN_LIB_SUFFIX);
#elif __linux__ || __APPLE__
    result = Format("{}lib{}{}", fs->GetProgramDir(), name, DYN_LIB_SUFFIX);
    if (fs->FileExists(result))
        return result;
#endif

#if !_WIN32

    ...

}

(2) DynamicModule::ReadModuleInformation
Same issue, no case for android. Function needs updated.
Workaround:

bool DynamicModule::Load(const ea::string& path)
{
 
   ...

#if defined(__ANDROID__) // Hack to just pass the module as native on android for now
    if (path.ends_with(".so")) {
        moduleType_ = MODULE_NATIVE;
    }
#else
    // Needs to be fixed in here
    moduleType_ = ReadModuleInformation(context_, path);
#endif

   ...

}

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

      0