1.我在pom.xml添加
<dependency>
<groupId>com.github.tony19</groupId>
<artifactId>apktool-lib</artifactId>
<version>1.4.4-3</version>
</dependency>
然后项目中有了android.jar
sans是提示如下错误
[INFO ] 16:25:40.882 org.nutz.resource.Scans.<init>(Scans.java:459) - Running in Android , so nothing I can scan , just disable myself
[DEBUG] 16:25:40.887 org.nutz.resource.Scans.scan(Scans.java:274) - Found 0 resource by src( /code/code.json ) , regex( ^(.+[.])(js|json)$ )
[DEBUG] 16:25:40.923 org.nutz.castor.Castors.reload(Castors.java:115) - Using 95 castor for Castors
Exception in thread "main" java.lang.RuntimeException: folder or file like '^(.+[.])(js|json)$' no found in /code/code.json
at org.nutz.lang.Lang.makeThrow(Lang.java:151)
at org.nutz.resource.Scans.loadResource(Scans.java:112)
at org.nutz.ioc.loader.json.JsonLoader.<init>(JsonLoader.java:45)
at cn.enilu.common.code.Generator.main(Generator.java:152)
有这个jar文件不一定就是android环境吧
/** 当前运行的 Java 虚拟机是否是在安卓环境 */
public static final boolean isAndroid;
static {
boolean flag = false;
try {
Class.forName("android.Manifest");
flag = true;
}
catch (Throwable e) {}
isAndroid = flag;
}