【问题标题】:Cordova Crosswalk plugin - usage with Meteor 1.4.2.2 not workingCordova Crosswalk 插件 - 与 Meteor 1.4.2.2 一起使用不起作用
【发布时间】:2017-04-30 21:52:50
【问题描述】:

经过长期不成功的搜索,我决定在这里发布我的问题。我正在尝试在我的 Meteor 应用程序中使用 Cordova Crosswalk 插件。我用的是大气的包装

meteor add crosswalk

以及来自 Github 的 Cordova 包

meteor add cordova:cordova-plugin-crosswalk-webview@2.2.0

当我在我的应用程序中安装包时,一切正常,除非我构建我的应用程序(Android apk 文件)它不包含人行横道(apk 大小约为 10 MB,有或没有插件)。

当我构建应用程序时,我得到的唯一提示是以下

Crosswalk info:dova app for Android          |
    After much discussion and analysis of the market,
    we have decided to discontinue support for Android 4.0 (ICS) in Crosswalk starting with version 20,
    so the minSdkVersion of Cordova project is configured to 16 by default. 

但这听起来更像是一个信息。我还在我的 mobile-config.js 文件中添加了以下行,但没有成功

app.setPreference('android-minSdkVersion', '16');

我在这里错过了什么?

提前致谢!

【问题讨论】:

  • 我将 crosswalk@1.7.0 作为一个流星包运行,但不是插件(不是必需的?)尝试删除它
  • 嗨@Mikkel,感谢您的回复。正如我所描述的,我尝试使用流星包但没有成功,构建的 apk 仍然只有 10 MB 大小,这意味着没有添加人行横道。 ouy 可以描述您的构建过程吗?是否在其他文件夹中构建了包含人行横道的 apk?
  • @mikkel 再问一个问题,你能发布你的 mobile-config.js 配置吗?这对我很有帮助!提前致谢

标签: javascript android cordova meteor crosswalk


【解决方案1】:

这是我的移动配置。这里的秘方几乎没有

// mobile-config.js
// This section sets up some basic app metadata,
// the entire section is optional.
App.info({
  id: 'com.senecto.amba.mcduck',
  version: '1.1.10',
  name: 'Amba.McDuck',
  description: 'Amba tablet - mcduck version',
  author: 'Mike King',
  email: 'contact@senecto.com',
  website: 'http://senecto.com'
});
// Set up resources such as icons and launch screens.
App.icons({
// 'iphone_2x        // (120x120)
// 'iphone_3x        // (180x180)
// 'ipad               // (76x76)
// 'ipad_2x          // (152x152)
// 'ipad_pro           // (167x167)
// 'ios_settings       // (29x29)
// 'ios_settings_2x  // (58x58)
// 'ios_settings_3x  // (87x87)
// 'ios_spotlight    // (40x40)
// 'ios_spotlight_2x   // (80x80)
'android_mdpi'    : 'public/res/icon/mipmap-mdpi/ic_launcher.png',     // (48x48)
'android_hdpi'    : 'public/res/icon/mipmap-hdpi/ic_launcher.png',   // (72x72)
'android_xhdpi'   : 'public/res/icon/mipmap-xhdpi/ic_launcher.png',  // (96x96)
'android_xxhdpi'  : 'public/res/icon/mipmap-xxhdpi/ic_launcher.png',   // (144x144)
'android_xxxhdpi' : 'public/res/icon/mipmap-xxxhdpi/ic_launcher.png'   // (192x192)//   
});
App.launchScreens({
// 'iphone_2x': 'public/res/screen.png',
// 'iphone5': 'public/res/screen.png',
// 'iphone6': 'public/res/screen.png',
// 'iphone6p_portrait': 'public/res/screen.png',
// 'iphone6p_landscape': 'public/res/screen.png',
// 'ipad_portrait': 'public/res/screen.png',
// 'ipad_portrait_2x': 'public/res/screen.png',
// 'ipad_landscape': 'public/res/screen.png',
// 'ipad_landscape_2x': 'public/res/screen.png',
'android_mdpi_portrait': 'public/res/screen.png',
'android_mdpi_landscape': 'public/res/screen.png',
'android_hdpi_portrait': 'public/res/screen.png',
'android_hdpi_landscape': 'public/res/screen.png',
'android_xhdpi_portrait': 'public/res/screen.png',
'android_xhdpi_landscape': 'public/res/screen.png',
'android_xxhdpi_portrait': 'public/res/screen.png',
'android_xxhdpi_landscape': 'public/res/screen.png'
  // 'iphone': 'splash/Default~iphone.png',
  // 'iphone_2x': 'splash/Default@2x~iphone.png',
  // ... more screen sizes and platforms ...
});
// Set PhoneGap/Cordova preferences
//App.setPreference('BackgroundColor', '0xff0000ff');
App.setPreference('HideKeyboardFormAccessoryBar', true);
// App.setPreference('Orientation', 'landscape');
// App.setPreference('Orientation', 'landscape', 'android');
// App.setPreference('Orientation', 'landscape', 'ios');
App.setPreference('Fullscreen', 'true', 'android');
App.setPreference('Fullscreen', 'true', 'ios');
App.setPreference('android-targetSdkVersion', '23');
App.setPreference('WebAppStartupTimeout', 60000);
App.setPreference('AndroidPersistentFileLocation','Compatibility')

// Pass preferences for a particular PhoneGap/Cordova plugin
// App.configurePlugin('com.phonegap.plugins.facebookconnect', {
//   APP_ID: '1234567890',
//   API_KEY: 'supersecretapikey'
// });
// Add custom tags for a particular PhoneGap/Cordova plugin
// to the end of generated config.xml.
// Universal Links is shown as an example here.
// App.appendToConfig(`
//   <universal-links>
//     <host name="localhost:3000" />
//   </universal-links>
// `);

App.accessRule('blob:*');
App.accessRule('file:*');
App.accessRule('*');
App.accessRule('skype:*',{launchExternal: true});

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多