且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

IBM工作灯6.1 - 约QUOT问题;工作灯设置"

更新时间:2023-12-03 20:52:52

问题2:
请参阅此问题的详细说明:IBM工作灯 - 如何更改默认的"工作灯设置"字符串?

Issue #2
See the detailed explanation in this question: IBM Worklight - How to change the default "Worklight Settings" string?

问题#1
需要注意的是,印在LogCat中以下警告:

Issue #1
Note the following warning that is printed in LogCat:

12-31 19:47:26.874:W /测试(1412):您的应用程序使用   WL.OptionsMenu API。需要注意的是,如果你的应用程序面向的Andr​​oid 3.0   (API等级11)或更高,WL.OptionsMenu可能没有任何效果,   根据设备。

12-31 19:47:26.874: W/test(1412): Your application is using the WL.OptionsMenu API. Note that, if your application targets Android 3.0 (API level 11) or higher, WL.OptionsMenu might have no effect, depending on the device.

文档链接

这是因为在较高水平的API谷歌已经在Android中转移到操作栏UI控件​​,它取代了选项菜单。 Android的操作栏尚不支持工作灯。

This is because in higher API Levels Google has moved on in Android to the Action Bar UI widget that replaces the Options Menu. The Android Action Bar is not yet supported in Worklight.

去工作灯设置的方法是在选项菜单中敲击按键。选项​​菜单可以工作或没有在各种设备具有较高的API级别,这也解释了你看到的不稳定行为的工作相结合。

The way to get to Worklight Settings is by tapping a button in the Options Menu. Options Menu may work or not work in various devices in combination with higher API Levels, which explains the erratic behavior you see.

底线是:这仅仅是直到操作栏支持添加的方式。该行为将是不稳定的较新的操作系统版本,在***的,可能只是无法正常工作。

The bottom line is: that's just the way it is until Action Bar support is added. The behavior will be erratic on newer OS versions at best and may just not work.

下面的实验是可以做到用的minSdkVersion 8,10,13或15(你需要通过Android SDK安装),并在每个你很可能看到一个不同的体验:工作按钮,工作不扣,不扣可言,崩溃的旋转,不会在某些情况下......和其他未知的现象显示。这是由于缺乏操作栏支持工作灯和不断变化的支持,Android的自身的API之间的水平。

The below experiment can be done using minSdkVersion 8, 10, 13 or 15 (which you need to install via the Android SDK), and in each you may very well see a different experience: working button, not working button, no button at all, crash on rotate, does not display in certain scenarios... and other unknown phenomenon. This is due to the lack of Action Bar support in Worklight and the changing support in Android itself between API Levels.

随着Android的环境,工作灯6.0.0.1一个新的应用程序:

A new application with the Android environment in Worklight 6.0.0.1:

  • 的minSdkVersion:8,建设目标2.2,AVD采用Android 2.2:工作
  • 的minSdkVersion:8,建设目标4.0.3,AVD采用Android 4.0.3:工作
  • 的minSdkVersion:8,建设目标4.2.2,AVD采用Android 4.2.2:工作
  • 的minSdkVersion:8,建设目标4.3,AVD采用Android 4.3:工作

=====

导入工作灯6.1.0.0同一个应用程序:
它升级到科尔多瓦3.1,你还可以得到以下信息:

The same application imported to Worklight 6.1.0.0:
It is upgraded to Cordova 3.1 and you also get the following message:

FWLST1124W:建议你的Andr​​oid   应用程序将针对用于构建机器人相同的API级别   项目。用于编译该项目的API级别被指定为   项目构建目标的项目/属性/ Android的对话框。   配置您的应用程序添加到目标相同的API级别   机器人:targetSdkVersion属性的Andr​​oidManifest.xml和设置   它具有相同的值。

FWLST1124W: It is recommended that your Android application will target the same API level used to build the android project. The API level used to compile the project is specified as the Project Build Target in Project / Properties / Android dialog. Configure your application to target the same API level by adding the android:targetSdkVersion attribute to AndroidManifest.xml and setting it with the same value.

但是让我们没有做到这一点,因此这将是类似于你...

But lets not do it, so it'll be similar to yours...

  • 的minSdkVersion:8,建设目标2.2,AVD采用Android 2.2:工作
  • 的minSdkVersion:8,建设目标4.0.3,AVD采用Android 4.0.3:工作
  • 的minSdkVersion:8,建设目标4.2.2,AVD采用Android 4.2.2:工作
  • 的minSdkVersion:8,建设目标4.3,AVD采用Android 4.3:工作

=====

一个新的应用程序的Andr​​oid环境中工作灯6.1.0.0:
默认情况下使用的minSdkVersion 9,但让我们用8到在Android 2.2上运行它。

A new application with the Android environment in Worklight 6.1.0.0:
By default uses minSdkVersion 9, but lets use 8 to run it on Android 2.2 as well.

  • 的minSdkVersion:8,targetSdkVersion:18,建设目标2.2,AVD采用Android 2.2:编译失败

  • minSdkVersion: 8, targetSdkVersion: 18, Build Target 2.2, AVD using Android 2.2: fails compiling

由于该的Andr​​oidManifest.xml 现在默认也使用安卓configChanges =定位| keyboardHidden |屏幕尺寸屏幕尺寸不支持Android 2.2的...

Because the AndroidManifest.xml now by default also uses android:configChanges="orientation|keyboardHidden|screenSize. screenSize is not supported in Android 2.2...


  • 的minSdkVersion:8/13,targetSdkVersion:18,采用Android 4.0.3建设目标4.0.3,AVD:无按钮
  • 的minSdkVersion:8/13,targetSdkVersion:18,采用Android 4.2.2建设目标4.2.2,AVD:无按钮
  • 的minSdkVersion:8/13,targetSdkVersion:18,建设目标4.3,AVD采用Android 4.3:没有任何按键

附加阅读:Relation与安卓的minSdkVersion,安卓targetSdkVersion和"目标"