Android proguard error com.google.ads.util.i: and setMediaPlaybackRequiresUserGesture(boolean) -
i trying create apk file, when press finish on export dialog, got error, , apk not created. cannot find on net far, maybe here can help? error:
proguard returned error code 1. see console warning: com.google.ads.util.i: can't find referenced method 'void setmediaplaybackrequiresusergesture(boolean)' in class android.webkit.websettings should check if need specify additional program jars. warning: there 1 unresolved references program class members. input classes appear inconsistent. may need recompile them , try again. alternatively, may have specify option '-dontskipnonpubliclibraryclassmembers'. java.io.ioexception: please correct above warnings first. @ proguard.initializer.execute(initializer.java:321) @ proguard.proguard.initialize(proguard.java:211) @ proguard.proguard.execute(proguard.java:86) @ proguard.proguard.main(proguard.java:492)
i tried add
-dontskipnonpubliclibraryclassmembers
but did not help. using ads, normal android app, works fine in emulator.
my proguard.config default empty
# enable proguard in project, edit project.properties # define proguard.config property described in file. # # add project specific proguard rules here. # default, flags in file appended flags specified # in ${sdk.dir}/tools/proguard/proguard-android.txt # can edit include path , order changing proguard # include property in project.properties. # # more details, see # http://developer.android.com/guide/developing/tools/proguard.html # add project specific keep options here: # if project uses webview js, uncomment following # , specify qualified class name javascript interface # class: #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; #}
and project.properties:
# file automatically generated android tools. # not modify file -- changes erased! # # file must checked in version control systems. # # customize properties used ant build system edit # "ant.properties", , override values adapt script # project structure. # # enable proguard shrink , obfuscate code, uncomment (available properties: sdk.dir, user.home): proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt # project target. target=android-16
thanks
ps: these default android proguard settings safe enough prevent basic "hacking"? (if can make workable)
as warning message indicates, google ads library refers method isn't present in target runtime (android-16). method exists of android-17. should specify target of android-17 or higher, proguard can find method , analyze code.
if application works on other targets anyway, can still specify other targets in androidmanifest.xml.
proguard provides basic protection against static analysis: obfuscates identifiers , modifies structure of code. more protection, can consider commercial sibling dexguard, adds more protection against static analysis , dynamic analysis, techniques string encryption, class encryption, , tamper detection. nothing unbreakable, in end it's economic trade-off , potential hackers, of time, effort, money, gains, expertise,...
(i developer of proguard , dexguard)
Comments
Post a Comment