idea testidea module sourcess root 和sources root 有什么区别

LV4.高级会员/
本帖最后由 TIntin大神 于
22:53 编辑
1,,首先发一波root用户的模式。
没有root的用户请看这里。努比亚Z11旗舰机 Recovery+ROOT by 沉默之星()-无边框Z11-牛仔俱乐部-努比亚社区
:第一步,设置-卡设置-更多-新建接入点(apn)
apn;cmwap
代理;127.0.0.1
端口;8787
apn;3gwap
apn类型:default(可以不设置,影响不大)
代理;127.0.0.1
端口;8787
apn;ctwap
apn类型;default(可以不设置)
代理;127.0.0.1
端口;8787
选择右上角-保存接入点(apn)
点击选择此接入点
第二步,安装hap和配置hap(强烈建议安装Busybox后重启,不然运行模式时可能会显示找不到pid文件。)
下载并安装hap
“打开hap,翻到选项那一页
找到伪装host1和伪装host2,把里面原来的网址删掉,
移动伪装host1和伪装host2改成:wap.**.(“**”一般是你的省份缩写,不过有些不确定的可以去百度自己的省份的伪装host《如湖南**为hn,广东为:gd》)
联通伪装host1和伪装host2统一改成:
电信伪装host不确定可以去百度一下
电信需要把伪装host上方的代理ip改成10.0.0.200原为10.0.0.172(电信免流需要定向流量包)
第三步,导入模式
将hap切换到页面
在屏幕右方偏上一点有添加和导入两个按钮
点击“导入”
在一大堆文件目录里面找到下载好的模式
点击下载好的模式(模式为mhp格式,用Uc下载的去UCdownload找,用百度云下载的去baidunetxx找。)
第四步,启动模式-启动防跳
在hap页面,选择你刚刚导入的模式,在弹出的下拉列表中点击启动模式
第五步,发送cxll到10086,查看一下你的流量还剩下多少
下载一个10M左右的东西,过5分钟,再查一下
流量没变的话就是免流成功了。。。。。。。
链接/s/1i4Ce5vf
密码:pups
模式导入(某云搬的,支持广东移动,广西移动,四川,海南移动,其他地方未测试)/share/link?shareid=&uk=
非root用户用的软件和上面一个软件不同,端口要改成65080
连接/s/1eSp0qYIsxcr
如果不能上网页的话请开飞行模式10秒,然后在软件设置里面设置开机自启,有网自启!再发一个楼主正在用的模式
/share/link?shareid=&uk=
拯救大神,请顶一下这个贴!
支持X大神,请顶贴
/forum.php?mod=viewthread&tid=728484&extra=page%3D1&mobile=2
17:33 上传
(90.12 KB)
17:32 上传
17:32 上传
(161.51 KB)
17:32 上传
(490.65 KB)
17:32 上传
(144.07 KB)
17:32 上传
17:33 上传
17:33 上传
01:12 上传
点击文件名下载附件
1.86 MB, 下载次数: 209
在线时间 小时
LV4.高级会员
链接正在编辑中,请稍后。。。。。。。
在线时间 小时
提示: 作者被禁止或删除 内容自动屏蔽
在线时间 小时
LV2.正式会员
来自努比亚社区WAP版
行不行啊,,先收藏
在线时间 小时
LV4.高级会员
来自努比亚社区WAP版
广东移动不是和谐了吗?有模式?
在线时间 小时
LV2.正式会员
个性.是一种生活态度
在线时间 小时
LV4.高级会员
广东移动不是和谐了吗?有模式?
今天刚刚从某云找到一个新的,试了下,可以。下了6G的东西,不扣流量。
在线时间 小时
LV2.正式会员
未root的能用?
在线时间 小时
LV2.正式会员
看看是什么东东。。。。。。。。
在线时间 小时
LV4.高级会员
来自努比亚社区WAP版
摇摇乐 发表于
未root的能用?
嗯嗯,网速很慢,自带模式只有是几十k。
签到看排名
版块推荐百宝箱
测光分离、对焦分离、测光锁定、多重曝光等,让手机也能拍出媲美单反级的照片
布拉格S 新品发布会图文直播,报道汇总!
组织或参与牛仔俱乐部线下同城会活动,将有机会获得nubia手机或参与新品发布会。
今日活跃用户
发帖数:21
400-700-6600
努比亚社区APP下载
400-700-6600
周一到周日 8:30-20:30 (全年无休)Content Root
Content Root
Content RootOn this page:Basics
Content root is a folder that contains all the files that make up your module.
A module can have more than one content root, however, in most of the cases one content root will suffice.
(In certain situations, the modules without content roots may be useful.)
Content roots in IntelliJ IDEA are shown as
See also, .
Types of content roots
By default, all the files in a content root folder are involved in indexing, searching, parsing, code
completion, etc. To change this status, folders within a content root can be assigned to the following categories:
Source roots
( shown as ).
By assigning a folder to this category, you tell IntelliJ IDEA that this folder and its subfolders
contain source code that should be compiled as part of the build process.
In Java modules, the subfolders within the source roots represent your Java package structure.
You can assign a package prefix to a source root (e.g.com.mycompany.myapp)
instead of creating the corresponding folder structure within that source root
(e.g.com/mycompany/myapp). For more information, see .
In the absence of the package prefix and the subfolders,
a source root would represent the default package (an unnamed package).
Generated source roots
(or gene shown as;
in certain views the
[generated]
text marker is used) are similar to source roots.
The difference is that the generated source roots are not suggested as target folders
when performing the
using the.
Test source roots
(or shown as ).
These roots are similar to source roots
but are for code intended for testing (e.g., for unit tests).
Test source folders let you keep the code related to testing separate from the production code.
Compilation results for sources and test sources, normally, are
placed into different folders.
Generated test source roots
(or generated shown as ;
in certain views the
[generated]
text marker is used) are similar to test source roots.
The difference is the same as between the source roots and the generated source roots.
Test resource roots
(or t shown as ;
available only in Java modules) are for resource files associated with your test sources.
In all other respects, these folders are similar to resource folders.
Excluded roots
(marked as ) are ones that IntelliJ IDEA "partially ignores".
Very limited coding assistance is provided for files in excluded folders.
Classes contained in excluded folders don't appear in code completion suggestion lists,
references to such classes are shown in the editor as unresolved.
When searching, IntelliJ IDEA doesn't look in excluded folders, etc.
Making the folders whose contents are "less important" excluded may improve the IDE performance.
Normally excluded are compilation output folders.
Resource roots
( marked as ).
These roots are available only in Java modules) are for
resource files used in your application (images, various configuration XML and properties files, etc.).
During the build process, all the contents of the resource folders are copied to the output folder
Modules without content roots: Collections of dependencies
A module can be used solely as a collection of
for other modules.
In such cases, instead of specifying the necessary dependencies separately,
you can add the dependency on the corresponding module.
A module used for such purpose, obviously, doesn't need a content root.
Package prefix for Java source roots
A package prefix specifies which Java package corresponds to a folder and
can be assigned to the following categories of the Java source roots:
SourcesGenerated sourcesTest sourcesGenerated test sources
If specified, the package prefix acts as an equivalent of the corresponding folder structure which
has to be created otherwise.
To illustrate, let's assume you are going to work with the com.mycompany.myapp package.
In the absence of the package prefix,
you would create the folder structure com/mycompany/myapp
in the corresponding source root folder (e.g. src).
The alternative would be to assign com.mycompany.myapp to src as its package prefix and
store the corresponding classes right in src.
See AlsoProcedures:Reference:Web Resources:Last modified: 14 July 2015&
发表评论:
TA的最新馆藏13412人阅读
经历(62)
Android(2)

最近参与了一个Anroid医疗项目,其中项目底层有很多基础类及通讯类,而且很多涉及复杂的字节操作还有多线程同步及状态机处理。这样的项目做一下TDD还是必要的,尽量项目前期把风险降低一些。
现在的问题是本人使用的是IntelliJ开发的Android项目,刚开始还真不知道怎么下手。在参考了一些资料后,总结了一下IntelliJ中配置JUnit测试环境的步骤,希望对大家有帮助。
操作系统:Windows 7
IntelliJ版本:13.1
Android SDK API:19
Java Version:1.7
JUnit 4子版本:JUnit 4.11(IntelliJ自带)
一、在项目的AndroidManifest.xml文件中做如下更改:
在application节点下添加
&uses-library android:name=&android.test.runner&/&,如图:
在根节点下添加如下内容:
其中targetPackage跟你所在项目的包名相同(参见你的AppManifest.xml文件顶部:
二、为你所在项目添加如下jar包引用
1、junit-4.11
2、harmcrest-core-1.3
3、annotations
三、调整项目对jar包的引用顺序
做这个调整是因为我们使用的Android API中包含了JUnit 3.8,默认SDK是放在最前面的,否则代码中的Junit会被认为是Junit 3.8,那你就只能使用Junit 3的测试方式了。
四、在项目目录树中,创建一个与src平级的目录用于存放所有的测试类。
简单起见我使用的是tests.
除了创建目录,我们还需要指定新创建的目录为测试根目录:
右键tests目录,选择'Mark Directory As'---&'Test Sources Root'
五、在你的测试根目录下创建你的测试分类目录及具体的测试类
在测试类内部你需要的只是给测试方法加上@Test标注。
六、运行你的测试
1、在代码编辑界面,在你的测试方法体中点击右键,在弹出的菜单中选中以JUnit的方式运行
这种方式非常适合刚写完测试,亟待看到某个测试的运行结果的场景。
还有一种使用快捷键的方式来单独运行某个测试,我们只需要将文本焦点切换到某个测试方法中,然后在使用组合键Ctrl+Shift+F10就可以达到同上面一样的测试效果。
2、编辑运行Configuration
点击Configuration按钮,在弹出界面中按如下步骤创建一个JUnit运行配置
在弹出的配置窗口做简单的配置。具体配置细节请参见本文参考部分的《IntelliJ IDEA对JUnit支持的官方文档》部分。
这种方式适合于批量执行测试的场景。
回顾JUnit3的使用方式
1、让你的测试类继承自Testcase
2、每个测试方法名必须以小写test为前缀
备注:IntelliJ IDEA已经内部支持JUnit4,Android SDK中也至少对JUnit3做了支持,因此并不需要再从Maven中对JUnit进行依赖管控。除非你需要使用最新的JUnit中的某项特性。
: 在开启JUnit4.0功能后项目中涉及Android生命周期的测试类(比如AndroidTestCase)将没有办法运行。原因在于AndroidTestCase这些是由SDK支持的,但是SDK中引用的是JUnit3.8的类库,我的理解是如果你引用的是JUnit4.0,那么在运行时AndroidTestCase这些Android特有的测试依赖的JUnit3.8在运行时是不会加载的,测试运行器尝试加载该类测试时就会报错。 因此,如果你希望在你的项目中测试与Android生命周期相关的类的话,那就只能在项目中摒弃JUnit4。
在IntelliJ IDEA的项目中开启Annotations
IntelliJ IDEA对JUnit支持的官方文档
IntelliJ IDEA提供的JUnit测试的Sample项目
ADT中如何配置JUnit
JUnit4测试说明:
JUnit4在IntelliJ IDEA中的使用(应该有三篇,但是只有后两篇可见。可能第一篇就是将配置的,但是不可见--有点遗憾)
Android单元测试初探--Instrumentation
IntelliJ IDEA和ADT的持续测试插件Infinitest
ADT中使用JUnit的一个教程
一个老程序员的Android测试驱动开发实践系列3篇(主要侧重界面交互测试)

参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:166830次
积分:2311
积分:2311
排名:第12762名
原创:45篇
转载:50篇
译文:13篇
评论:14条
(1)(1)(1)(1)(2)(1)(3)(5)(7)(2)(47)(9)(4)(1)(2)(2)(3)(3)(1)(5)(1)(2)(2)(2)(1)(1)(1)(1)(1)

我要回帖

更多关于 idea sources 的文章

 

随机推荐