小编mer*_*ica的帖子

使用Proguard模糊ORMLite模型类

我有几个模型,我想在我的代码中混淆.我知道我可以忽略整个模型包但我不想这样做.我尝试了一些proguard调整并检查所有相关的帖子无济于事.ORMlite一直在投掷java.lang.RuntimeException: Unable to create application ...App: java.lang.IllegalArgumentException: Foreign field class ....f.p does not have id field.我检查了注释是否仍然存在dex2jarjd,它仍然存在.

我有这个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)

我错过了什么,或者这是不可能的?

android proguard ormlite

5
推荐指数
1
解决办法
1810
查看次数

AngularJS TypeError:无法读取null的属性"insertBefore"

我似乎无法解决我在这里做错的事情.我试图从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)

angularjs

3
推荐指数
1
解决办法
9914
查看次数

标签 统计

android ×1

angularjs ×1

ormlite ×1

proguard ×1