Change IP address to run MobileFirst Android app on real device

。_饼干妹妹 提交于 2019-12-11 09:55:44

问题


I want to run a MobileFirst hybrid Android application my real device (Samsung Galaxy S5 KitKat 4.4.2)

My phone and PC are connected on the same network.

How can I change the IP address?? I can't find worklightServerRootURL in the file application-descriptor.xml attached below.

<?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>


回答1:


To change the IP address of the MobileFirst server for your Android app follow these steps.

  • Right Click application folder inside the apps folder: Right Click > Build Settings and Deploy Target...
  • Check Build the application to work with a different MobileFirst server box
  • Enter your machine IP address, port number (10080), context (usually project name) http://YOUR_MACHINE_IP:10080/YOUR_PROJECT_NAME
  • Rebuild the application



回答2:


I know it is an old question and @Yoel Nunez's answer is chosen as correct. But, Buid Settings and Deploy Target is now under Run As option.. so the steps would now be:

  • Right Click application folder inside the apps folder: Right Click > Run As > Build Settings and Deploy Target...
  • Check Build the application to work with a different MobileFirst server box
  • Enter your machine IP address, port number (10080), context (usually project name) http://YOUR_MACHINE_IP:10080/YOUR_PROJECT_NAME
  • Rebuild the application


来源:https://stackoverflow.com/questions/29883392/change-ip-address-to-run-mobilefirst-android-app-on-real-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!