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. Oracle使用Sql把XML解析成表(Table)的方法

    SELECT * FROM XMLTABLE('$B/DEAL_BASIC/USER_DEAL_INFO' PASSING XMLTYPE('<?xml version="1.0&qu ...

  2. LeetCode: Search in Rotated Sorted Array II 解题报告

    Search in Rotated Sorted Array II Follow up for "LeetCode: Search in Rotated Sorted Array 解题报告& ...

  3. 用nodejs的express框架在本机快速搭建一台服务器

    [本文出自天外归云的博客园] 简介 用express框架在本机搭建一个服务器,这样大家可以通过指定的url来在你的服务器上运行相应的功能. Express是一个基于nodejs的框架,我们可以用它来完 ...

  4. Python通过ssh连接服务器并执行命令

    [本文出自天外归云的博客园] 脚本示例如下: # coding:utf-8 import time,paramiko,re,StringIO def exec_shell(command): ''' ...

  5. resource.h

    resource.h就是.rc文件的头文件.rc文件里的常量全在resource.h定义 .rc文件和resource.h 都是给project add resource 的时候VS 自动生成的.一般 ...

  6. php 验证所传参数为必填的时候的验证逻辑

    此段代码摘自lumen框架: xx/vendor/illuminate/validation/Validator.php /** * Validate that a required attribut ...

  7. sphinx/Coreseek 4.1 执行make出错

    参考的网址: http://blog.csdn.net/jcjc918/article/details/39032689 configure正确之后,执行make,出现如下的报错信息 configur ...

  8. sam9260 闲鱼

    开发板 https://2.taobao.com/item.htm?spm=2007.1000338.6.8.5vXVdv&id=534550318896 核心板 https://item.t ...

  9. uboot下的网络终端/控制台

    许多linux设备可能没有外置串口,这是就需要一个网络终端来在uboot下操作设备,如升级镜像等. uboot下的网络终端为netconsole,代码drivers/net/netconsole.c. ...

  10. 推荐几个不错的h5游戏引擎

    http://www.phaser.io/examples http://www.cocos.com/ http://cn.cocos2d-x.org/tutorial/lists?id=30 coc ...