Android to determine if the cloud is embedded correctly

Source: Internet
Author: User

After compiling and packaging the APK, install the APK on the phone, connect the data cable, open the command line, and enter the following command:

[Java]View Plaincopy
    1. ADB logcat-v time-s nbsagent:v

Then run an app embedded in the listen cloud code for effective network access and, if the following occurs,

[Java]View Plaincopy
    1. Nbsagent start
    2. Nbsagent enabled
    3. Nbsagent V1. 1.x
    4. Connect success

The embedding succeeds or fails

When embedding the listening cloud Code, the fifth step is as follows:

[Plain]View Plaincopy
  1. (5) Set environment variable ant_opts
  2. In Mac OS and Linux Environment:
  3. Export ant_opts= "-javaagent:/path/to/nbs-android-agent/nbs.newlens.class.rewriter.jar"
  4. In Windows Environment:
  5. SET ant_opts= "-javaagent:c:\path\to\nbs-android-agent\nbs.newlens.class.rewriter.jar"
  6. Please replace the "/path/to/nbs-android-agent/" with your actual SDK store path.
  7. Notice:please don ' t set the environment variable (i.e. ant_opts) in user or system environment variable permanently, othe Rwise it would make effects to other Android projects with no need embedded-code.
  8. Strongly propose to set the environment variable temporarily in single compiling command-line, or set the environment Vari Able separately in batching compile script of the project, that need embedded-code.
  9. Notice:because of the affect caused by some known bugs in Android development tools, please don ' t use blank in the path of Nbs.newlens.class.rewriter.jar file.


Note the point:

It is necessary to copy Nbs.newlens.class.rewriter.jar to the SDK directory of your computer, such as/home/yee/tools/sdk

[Plain]View Plaincopy
    1. And the/path/to/nbs-android-agent need to be set to <span style= "Color:rgb (0, 128, 0); line-height:24px; RGB (243, 243, 243); " >/home/yee/tools/sdk</span>
[Plain]View Plaincopy
    1. <span style= "Color:rgb (0, 128, 0); line-height:24px; RGB (243, 243, 243); " > also said, if the SDK absolute path is <span style= "Color:rgb (0, 128, 0); line-height:24px; RGB (243, 243, 243); " >/home/yee/tools/sdk</span></span>
[Plain]View Plaincopy
    1. <span style= "Color:rgb (0, 128, 0); line-height:24px; RGB (243, 243, 243); " ><span style= "Color:rgb (0, 128, 0); line-height:24px; RGB (243, 243, 243); " > </span></span><pre name= "code" class= "plain" >set ant_opts= "-javaagent:c:\path\to\ Nbs-android-agent\nbs.newlens.class.rewriter.jar "
[Plain]View Plaincopy
    1. <pre name= "code" class= "plain" ><pre name= "code" class= "plain" style= "Color:rgb (0, 128, 0); line-height:24px; " > This sentence should be changed to

Export ant_opts= "-javaagent:/home/yee/tools/sdk/nbs.newlens.class.rewriter.jar"

[Plain]View Plaincopy
    1. I must remember.

Android to determine if the cloud is embedded correctly

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.