使用gimdongwoo.ti-media-picker-widget遇x86_64架构模块找不到错误求助
Fixing the "Couldn't find module: ti.mediapicker for architecture: x86_64" Error with the ti-media-picker Widget
Hey there, let’s work through this module not found error together—this is a common gotcha with Appcelerator widgets, and we can break down the fixes step by step:
1. Double-Check Widget Installation & Reference
First, make sure you’re referencing the widget correctly, not the raw module:
- Verify the widget is placed in your project’s
app/widgets/gimdongwoo.ti-media-picker-widgetdirectory (no typos in the folder name!). - Confirm your
config.jsonincludes the widget dependency:"dependencies": { "gimdongwoo.ti-media-picker-widget": "1.0.0" // Use the actual version from the widget docs } - Critical: Don’t use
require('ti.mediapicker')directly. Instead, instantiate the widget as per its docs:const mediaPicker = Alloy.createWidget('gimdongwoo.ti-media-picker-widget', 'widget', { // Add your config options here }); mediaPicker.openPicker();
2. Fix Architecture Support for iOS Simulator
The x86_64 error means the widget’s precompiled module doesn’t support the iOS simulator architecture. Try these:
- Test on a physical iOS device: Arm64 architecture (used by real iPhones/iPads) is likely supported, so this might bypass the issue immediately.
- Recompile the module for x86_64:
- Grab the widget’s source code from its repo.
- Open the module’s Xcode project (usually in
modules/iphone/ti.mediapicker/). - Set the build architecture to include both
x86_64andarm64, then recompile. - Replace the old module files in your project with the newly compiled ones.
3. Clear Appcelerator Cache
Appcelerator’s build cache often causes module detection issues:
- Delete the
build/folder in your project root. - Run
appc cleanin your terminal (if you have the Appcelerator CLI installed). - Restart your Appcelerator Studio or CLI, then rebuild the project.
4. Verify SDK Compatibility
Check the widget’s documentation for supported Appcelerator SDK versions. If you’re using a newer SDK, try downgrading to the version recommended by the widget—older widgets sometimes break with latest SDK updates.
内容的提问来源于stack exchange,提问作者user3752705
相关产品推荐
相关产品推荐

