我想在我的真实设备上运行MobileFirst混合Android应用程序(三星Galaxy S5 KitKat 4.4.2)

我的手机和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
重建应用程序

10-07 19:17
查看更多