判断听云是否正常嵌入及注意事项

4 篇文章 0 订阅
2 篇文章 0 订阅

 编译打包成apk之后,将apk在手机上进行安装,连接数据线,打开命令行,输入以下命令:

adb logcat -v time -s NBSAgent:V
之后运行嵌入听云代码的app,进行有效的网络访问,如果出现以下内容,
NBSAgent start

NBSAgent enabled

NBSAgent V1.1.×

connect success


则表示嵌入成功,否则失败



在嵌入听云代码时,第五步,如下:

(5)set environment variable ANT_OPTS
In Mac OS and Linux environment:
export ANT_OPTS="-javaagent:/path/to/nbs-android-agent/nbs.newlens.class.rewriter.jar"
In Windows environment:
SET ANT_OPTS="-javaagent:C:\path\to\nbs-android-agent\nbs.newlens.class.rewriter.jar"
Please replace "/path/to/nbs-android-agent/" with your actual SDK store path.
Notice: Please don't set the environment variable (i.e. ANT_OPTS) in user or system environment variable permanently, otherwise it would make effects to other Android projects with no need embedded-code.
Strongly propose to set the environment variable temporarily in single compiling command-line, or set the environment variable separately in batching compile script of the project that need embedded-code.
Notice: Because of the affect caused by some known bug in Android development tools, please don't use blank in the path of nbs.newlens.class.rewriter.jar file.

注意点:

其中需要将nbs.newlens.class.rewriter.jar拷贝到所在电脑的sdk目录下,如/home/yee/tools/sdk

且/path/to/nbs-android-agent需要设置为<span style="color: rgb(0, 128, 0); line-height: 24px; background-color: rgb(243, 243, 243);">/home/yee/tools/sdk</span>
<span style="color: rgb(0, 128, 0); line-height: 24px; background-color: rgb(243, 243, 243);">也就说,如果将sdk绝对路径为<span style="color: rgb(0, 128, 0); line-height: 24px; background-color: rgb(243, 243, 243);">/home/yee/tools/sdk</span></span>
<span style="color: rgb(0, 128, 0); line-height: 24px; background-color: rgb(243, 243, 243);"><span style="color: rgb(0, 128, 0); line-height: 24px; background-color: 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"
<pre name="code" class="plain"><pre name="code" class="plain" style="color: rgb(0, 128, 0); line-height: 24px;">这句话,应该改为
export ANT_OPTS="-javaagent:/home/yee/tools/sdk/nbs.newlens.class.rewriter.jar"

 
一定谨记
 
 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值