在真实设备上将 IP 地址更改为 运行 MobileFirst Android 应用程序
Change IP address to run MobileFirst Android app on real device
我想 运行 MobileFirst 混合 Android 应用程序我的真实设备 (Samsung Galaxy S5 KitKat 4.4.2)
我的 phone 和 PC 连接在同一网络上。
如何更改IP地址??我在下面附加的文件 application-descriptor.xml 中找不到 worklightServerRootURL
。
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Licensed Materials - Property of IBM
5725-I43 (C) Copyright IBM Corp. 2006, 2013. All Rights Reserved.
US Government Users Restricted Rights - Use, duplication or
disclosure restricted by GSA ADP Schedule Contract with IBM Corp. --><!-- Attribute "id" must be identical to application folder name --><application xmlns="http://www.worklight.com/application-descriptor" id="MoodApp" platformVersion="6.3.0.00.20150214-1702">
<displayName>MoodApp</displayName>
<description>MoodApp</description>
<author>
<name>application's author</name>
<email>application author's e-mail</email>
<homepage>http://mycompany.com</homepage>
<copyright>Copyright My Company</copyright>
</author>
<mainFile>index.html</mainFile>
<features/>
<thumbnailImage>common/images/thumbnail.png</thumbnailImage>
<android version="1.0">
<worklightSettings include="false"/>
<security>
<encryptWebResources enabled="false"/>
<testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3"/>
<publicSigningKey/>
<packageName/>
</security>
</android>
要更改 Android 应用的 MobileFirst 服务器的 IP 地址,请按照以下步骤操作。
- 右键单击
apps
文件夹内的应用程序文件夹:右键单击 > 构建设置并部署目标...
- 选中构建应用程序以使用不同的 MobileFirst 服务器框
- 输入你的机器IP地址、端口号(10080)、上下文(通常是项目名)
http://YOUR_MACHINE_IP:10080/YOUR_PROJECT_NAME
- 重建应用程序
我知道这是一个老问题,@Yoel Nunez 的 答案被选为正确答案。但是,Buid Settings and Deploy Target 现在在 运行 As 选项下..所以现在的步骤是:
- 右键单击 apps 文件夹内的应用程序文件夹:右键单击 > 运行 As > Build设置和部署目标...
- 选中构建应用程序以使用不同的 MobileFirst 服务器框
- 输入你的机器IP地址、端口号(10080)、上下文(通常是项目名)http://YOUR_MACHINE_IP:10080/YOUR_PROJECT_NAME
- 重建应用程序
我想 运行 MobileFirst 混合 Android 应用程序我的真实设备 (Samsung Galaxy S5 KitKat 4.4.2)
我的 phone 和 PC 连接在同一网络上。
如何更改IP地址??我在下面附加的文件 application-descriptor.xml 中找不到 worklightServerRootURL
。
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Licensed Materials - Property of IBM
5725-I43 (C) Copyright IBM Corp. 2006, 2013. All Rights Reserved.
US Government Users Restricted Rights - Use, duplication or
disclosure restricted by GSA ADP Schedule Contract with IBM Corp. --><!-- Attribute "id" must be identical to application folder name --><application xmlns="http://www.worklight.com/application-descriptor" id="MoodApp" platformVersion="6.3.0.00.20150214-1702">
<displayName>MoodApp</displayName>
<description>MoodApp</description>
<author>
<name>application's author</name>
<email>application author's e-mail</email>
<homepage>http://mycompany.com</homepage>
<copyright>Copyright My Company</copyright>
</author>
<mainFile>index.html</mainFile>
<features/>
<thumbnailImage>common/images/thumbnail.png</thumbnailImage>
<android version="1.0">
<worklightSettings include="false"/>
<security>
<encryptWebResources enabled="false"/>
<testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3"/>
<publicSigningKey/>
<packageName/>
</security>
</android>
要更改 Android 应用的 MobileFirst 服务器的 IP 地址,请按照以下步骤操作。
- 右键单击
apps
文件夹内的应用程序文件夹:右键单击 > 构建设置并部署目标... - 选中构建应用程序以使用不同的 MobileFirst 服务器框
- 输入你的机器IP地址、端口号(10080)、上下文(通常是项目名)
http://YOUR_MACHINE_IP:10080/YOUR_PROJECT_NAME
- 重建应用程序
我知道这是一个老问题,@Yoel Nunez 的 答案被选为正确答案。但是,Buid Settings and Deploy Target 现在在 运行 As 选项下..所以现在的步骤是:
- 右键单击 apps 文件夹内的应用程序文件夹:右键单击 > 运行 As > Build设置和部署目标...
- 选中构建应用程序以使用不同的 MobileFirst 服务器框
- 输入你的机器IP地址、端口号(10080)、上下文(通常是项目名)http://YOUR_MACHINE_IP:10080/YOUR_PROJECT_NAME
- 重建应用程序