I'm using ProGuard with my Android application and I'm running getting the warnings below in my build log. I've added the appropriate '-keep public class com.foo.OtherClass { public static *; }' statement to my proguard.cfg file, but I still get the warnings. My app runs fine and is dynamically accessing the class correctly. Is it possible to suppress these warnings?

[proguard] Note: com.foo.MyClass accesses a method 'getInstance()' dynamically
[proguard]       Maybe this is program method 'com.foo.OtherClass { com.foo.OtherClass getInstance(); }'

15down voteaccepted

You can avoid it by explicitly mentioning the method in the configuration:

-keep class com.foo.OtherClass { com.foo.OtherClass getInstance(); }

Alternatively, you can suppress notes on a class:

-dontnote com.foo.MyClass

How to suppress 'Maybe this is program method' warnings from ProGuard的更多相关文章

  1. Google JavaScript Style Guide

    转自:http://google.github.io/styleguide/javascriptguide.xml Google JavaScript Style Guide Revision 2.9 ...

  2. CLR via C# 摘要二:IL速记

    最简单的IL程序 .assembly test {} .method void Func() { .entrypoint ldstr "hello world" call void ...

  3. Effective Java 69 Prefer concurrency utilities to wait and notify

    Principle Use the higher-level concurrency utilities instead of wait and notify for easiness. Use Co ...

  4. Catel帮助手册-Catel.Core(6):日志管理

    1,简介      从2.2版本开始,Catel使用了一个自定义的日志系统,这种方式,针对log4net的引用可以被移除,做这个修改主要是为了不强迫用户使用log4net,同时,log4net看起来很 ...

  5. servlet(一):从Sevlet到HttpServlet

    Java Servlet 是运行在 Web 服务器或应用服务器上的程序,它是作为来自 Web 浏览器或其他 HTTP 客户端的请求和 HTTP 服务器上的数据库或应用程序之间的中间层. servlet ...

  6. some cmds,tools and utils man

    NAME stdbuf - Run COMMAND, with modified buffering operations for its standard streams. SYNOPSIS std ...

  7. Google JavaScript代码风格指南

    Google JavaScript代码风格指南 修正版本 2.28 Aaron Whyte Bob Jervis Dan Pupius Eric Arvidsson Fritz Schneider R ...

  8. golang Methods on structs

    原文:http://golangtutorials.blogspot.com/2011/06/methods-on-structs.html snmp 下载,有空学习一下! https://sourc ...

  9. C++抽象类实践

    实践如下: #include <iostream> using namespace std; class Service { public: // 有一个虚函数即为抽象类 int id; ...

随机推荐

  1. 如何去掉文件里的^M

    起因 csv文件用Python处理之后,有的地方跟着一个^M,特别好奇,以为是处理过程中产生的,后来想了想不是. 解决办法 尝试使用replace替换掉,但是失败了 查询原因,谷歌一番,发现是Wind ...

  2. 利用cmd代码一次性提取电脑登陆过的wifi密码到桌面

    for /f "skip=10 tokens=1,2 delims=:" %i in ('netsh wlan show profiles') do @for /f "t ...

  3. 软链接ln -s以及如何解决其产生“Too many levels of symbolic links ”的错误?

    Q1:如何利用ln -s来创建快捷方式? A1:ln(link,链接文件): Windows中的快捷方式,实际上快捷方式和它指向的文件是独立的两个文件,两个都占硬盘空间,只不过用户访问快捷方式时,其效 ...

  4. 基于jQuery图片弹出翻转特效代码

    分享一款基于jQuery图片弹出翻转特效代码.这是一款基于jQuery+HTML5实现的,里面包含六款不同效果的鼠标点击图片弹出特效下载.效果图如下: 在线预览   源码下载 实现的代码. html代 ...

  5. kali Rolling安装之后的一些常用配置总结(更新)

    原文: https://ssooking.github.io/kali-rolling-an-zhuang-zhi-hou-de-yi-xie-chang-yong-pei-zhi-zong-jie/ ...

  6. Oracle查看数据库表的创建时间

    select OBJECT_NAME, CREATED from DBA_OBJECTS obj, USER_TABLES tab where obj.OBJECT_NAME = tab.TABLE_ ...

  7. 【javascript】js 获取 url 后的参数值

    以前写过一篇类似的博文(提取 url 的搜索字符串中的参数),但是个人觉得使用起来不是很方便,今天抽空重新写了个函数,该函数代码更加简洁. //获取 url 后的参数值 function getUrl ...

  8. java File linux windows 下 绝对路径 相对路径问题

    前言 当前项目目录 windows 为  E:\project\testpro\ linux 为  /project/testpro/ Windows环境下获取绝对路径情况 使用 a/b/c 为路径, ...

  9. git设置HTTP代理

    git设置HTTP代理 设置HTTP代理 如果公司使用代理,git就需要设置代理才能克隆远程仓库 执行下面两条语句 git config --global http.proxy 10.167.32.1 ...

  10. Jna & twain

    参考海康威视Java版示例(采用Jna实现) 获得win32原生窗口句柄:HWND hwnd = new HWND(Native.getComponentPointer(panelRealplay)) ...