我有几个模型,我想在我的代码中混淆.我知道我可以忽略整个模型包但我不想这样做.我尝试了一些proguard调整并检查所有相关的帖子无济于事.ORMlite一直在投掷java.lang.RuntimeException: Unable to create application ...App: java.lang.IllegalArgumentException: Foreign field class ....f.p does not have id field.我检查了注释是否仍然存在dex2jar和jd,它仍然存在.
我有这个proguard配置(以及更多混淆其他部分):
好斗的东西:
-mergeinterfacesaggressively
-allowaccessmodification
-optimizationpasses 5
-verbose
-dontskipnonpubliclibraryclasses
-dontpreverify
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
Run Code Online (Sandbox Code Playgroud)
保留各种框架所需的信息:
-keepattributes *Annotation*
-keepattributes Signature
-keepattributes EnclosingMethod
Run Code Online (Sandbox Code Playgroud)
ORMLITE相关:
-keep class com.j256.**
-keepclassmembers class com.j256.** { *; }
-keep enum com.j256.**
-keepclassmembers enum com.j256.** { *; }
-keep interface com.j256.**
-keepclassmembers interface com.j256.** { *; }
Run Code Online (Sandbox Code Playgroud)
我错过了什么,或者这是不可能的?
我似乎无法解决我在这里做错的事情.我试图从php文件中提取json数据,然后在我的Angular应用程序中显示它.
我的app.js:
var app = angular.module("MyApp", []);
app.controller("ClientHealthCtrl", function($scope, $http) {
$http.get('json.php').
success(function(data, status, headers, config) {
$scope.rows = data;
}).
error(function(data, status, headers, config) {
// log error
});
});
Run Code Online (Sandbox Code Playgroud)
我的HTML:
<body class="skin-black" ng-app="MyApp">
...
<tbody ng-controller="ClientHealthCtrl">
<tr class="link_back" ng-repeat="Computer in rows">
<td><a href="#cid={{Computer.id}}">{{Computer.ComputerName}}</a></td>
<td><i class="fa fa-fw fa-check-square" style="color:#008000;"></i>{{Computer.WmiTest}}</td>
<td><i class="fa fa-fw fa-check-square" style="color:#008000;"></i>{{Computer.SmsClientService}}</td>
<td><i class="fa fa-fw fa-check-square" style="color:#008000;"></i>{{Computer.McAfeeFrameworkService}}</td>
<td><i class="fa fa-fw fa-check-square" style="color:#008000;"></i>{{Computer.RemoteManagement}}</td>
</tr>
</tbody>
Run Code Online (Sandbox Code Playgroud)
结果导致......
TypeError: Cannot read property 'insertBefore' of null
at https://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.js:2067:13
at forEach (https://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.js:113:18) …Run Code Online (Sandbox Code Playgroud)