我在我的应用中实施了proguards也使用SMAATO添加了广告但是我收到以下错误:
proguard.ParseException: Unexpected keyword 'classmembers'
我按照SMAATO documentation:添加了以下行:
-dontwarn com.mopub.**
-keep public class * extends one.mopub.*
-keep class com.mopub.** { *; }
-keep classmembers class com.millennialmedia** {
public *;
}
-keep class com.millennialmedia**
-keep public class com.smaato.soma.internal.connector.OrmmaBridge {
public *;
}
-keepattributes *Annotation
答案 0 :(得分:0)
尝试使用
-keepclasseswithmembers class pkg.yourclass 或-keepclassmembers类pkg.yourclass
答案 1 :(得分:0)
此行中还有一个空格导致此解析错误:
"devDependencies": {
"chai": "3.5.0",
"gulp": "^3.9.1",
"gulp-copy": "0.0.2",
"gulp-exec": "^2.1.2",
"gulp-istanbul": "^1.0.0",
"gulp-load-plugins": "^1.2.4",
"gulp-util": "^3.0.7",
"istanbul": "0.4.4",
"mocha": "2.2.5",
...
}
保持规则必须写成这样的一个单词(另外,为了清楚起见,我会在通配符之前添加一个分隔点):
`public static String readVersion() throws IOException {
InputStream in = VersionUtil.class.getResourceAsStream("/META-INF/MANIFEST.MF");
Manifest manifest = new Manifest(in);
// Lire la propriété "Implementation-Version" du Manifest
String version = manifest.getMainAttributes().getValue(Attributes.Name.IMPLEMENTATION_VERSION);
return version;
}`