`

如何解决build.xml运行中的异常:软件包 com.google.ads 不存在和can't find referenced class com.googl

阅读更多

 

linux ubuntu 环境下

 /home/ww/Workplace/ProName/src/cn/com/ui/MainAty.java:41: 软件包 com.google.ads 不存在

    [javac] import com.google.ads.AdRequest;

    [javac]                      ^

    [javac] /home/ww/Workplace/ProName/src/cn/com/ui/MainAty.java:42: 软件包 com.google.ads 不存在

    [javac] import com.google.ads.AdSize;

    [javac]                      ^

 

问题:编译时,找不到com.google.com这个包。

解决方法:在javac的classpath下面引入com.google.com的jar包,例如:<fileset file="${admob.jar}"></fileset>

 

 

 

 

Warning: cn.com.ui.MainAty: can't find referenced class com.google.ads.AdSize

     [java] Warning: cn.com.ui.MainAty: can't find referenced class com.google.ads.AdView

 

     [java] Warning: there were 23 unresolved references to classes or interfaces.

     [java]          You may need to specify additional library jars (using '-libraryjars'),

     [java]          or perhaps the '-dontskipnonpubliclibraryclasses' option.

     [java] java.io.IOException: Please correct the above warnings first.

     [java] at proguard.Initializer.execute(Initializer.java:308)

     [java] at proguard.ProGuard.initialize(ProGuard.java:210)

     [java] at proguard.ProGuard.execute(ProGuard.java:85)

     [java] at proguard.ProGuard.main(ProGuard.java:499)

 

问题:混淆时,找不到com.google.com这个包

解决方法:在混淆时,引入相应的jar包,例如:<arg value="-libraryjars ${admob.jar}"/>

 

注:admob.jar是com.google.com包的路径

 

 

分享到:
评论
2 楼 莫言_MoYan 2012-07-18  
超...越 写道
哥们你好:是不是在proguard.cfg中加上它啊:—<arg value="-libraryjars ${库名}"/>
我加了还报错: proguard.ParseException: Unknown option '-<arg' in line 7 of file 'E:\project\UDPServer\proguard.cfg',
[2012-07-05 21:09:33 - UDPServer]   included from argument number 1
[2012-07-05 21:09:33 - UDPServer] at proguard.ConfigurationParser.parse(ConfigurationParser.java:172)
[2012-07-05 21:09:33 - UDPServer] at proguard.ProGuard.main(ProGuard.java:484)
指点指点。。。。感激



你想实现什么啊这是?
1 楼 超...越 2012-07-05  
哥们你好:是不是在proguard.cfg中加上它啊:—<arg value="-libraryjars ${库名}"/>
我加了还报错: proguard.ParseException: Unknown option '-<arg' in line 7 of file 'E:\project\UDPServer\proguard.cfg',
[2012-07-05 21:09:33 - UDPServer]   included from argument number 1
[2012-07-05 21:09:33 - UDPServer] at proguard.ConfigurationParser.parse(ConfigurationParser.java:172)
[2012-07-05 21:09:33 - UDPServer] at proguard.ProGuard.main(ProGuard.java:484)
指点指点。。。。感激

相关推荐

    can't find referenced pointcut

    spring-framework-3.1.1.RELEASE jdk1.7 环境下 can't find referenced pointcut 问题解决 换了对应的jar文件即可 aspectjrt.jar aspectj-1.6.6.jar aspectjweaver.jar

    org.eclipse.paho.mqttv5.client-1.2.5.jar解决SSL认证连接SNIHostName类不存在的问题

    MQTTv5版的客户端库,原地址:...本资源合入了解决低于android7.0报错Caused by: java.lang.ClassNotFoundException: Didn't find class "javax.net.ssl.SNIHostName"的问题。

    Build Report Tool 3.0.19.rar

    You can also save build reports to XML files, or open previously saved ones. Whenever you build your project, the Build Report Tool will automatically generate a build report and save it. If you don't...

    python UnboundLocalError: local variable ‘x’ referenced before assignment

    一、疑难杂症 def test_scopt(): ...上面这两种情况都会报错:UnboundLocalError: local variable ‘x’ referenced before assignment 二、探究原因 1、python变量作用域   一般在使用函数def、类cla

    android-a programmer's guide

    Referenced Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

    java中的0 can‘t find referenced pointcut runTim

    解决方法 后来经过排查,发现是自己的写法有问题,在@Around的参数中我们使用的是runtime(),这里是有问题的! @Around: 环绕增强,相当于MethodInterceptor. 这里Around的value参数应该写的是上面的签名,而不是...

    sunjce_provider.jar

    Could not find class 'com.sun.crypto.provider.SunJCE', referenced from method ...不能加载到类的情况

    EhLib 6.3 Build 6.3.176 Russian version. Full source included.

    EhLib 6.3 Build 6.3.176 Russian version. Full source included. ------------------------------------------------------------------- The Library contains components and classes for Borland Delphi ...

    HoudiniExprEditor_外部代码编辑器

    houdini的内置编辑器中的vex或python的代码推送到vscode上。自动配置的语法高亮和自动补全。 安装方法: Go to you $HOME/Houdini16.0 folder ( for instance, on windows: C:\Users\%USERNAME%\Documents\...

    jQwidgets 3.6.0

    styles/images: contains images referenced in the stylesheet files Files for individual widgets. Include depending on project needs: jqx-all.js: All plug-ins and widgets jqxdata.js: Data Source plug-...

    apache-ant-1.8.2.jar

    The type org.apache.tools.ant.Task cannot be resolved. It is indirectly referenced from required .class files错误....., 解决办法:在工程中加入此jar包

    dubbo找不到dubbo.xsd报错

    dubbo找不到dubbo.xsd报错, cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'. - schema_reference.4: Failed to read schema document...

    EhLib 8.0 Build 8.0.023 Pro Edition FullSource for D7-XE8

    EhLib 8.0 Build 8.0.023 Pro Edition FullSource for D7-XE8 亲测可用,含全部源码及 Demo The Library contains components and classes for Borland Delphi versions 7, 9, Developer Studio 2006, Delphi 2007...

    EhLib 5.65.6.20 for XE2

    1. This version of library doesn't have help files for Delphi8 and Delphi2005. 2. Delphi 4.x - 7.x: Copy the EhLib.hlp and EhLib.cnt files to the Delphi HELP subdirectory. Select Help|Customize to ...

    Android代码-tmc

    MyConfig config = TaggedModularConfig.rootModule("main").applyTags("prod").create(MyConfig.class); TMC modules have filename patterns .tmc. (ex: main.tmc.json, config.tmc.yml) Modules are ...

    plat-sw-3.0.0.1.zip

    百度 编译镜像 bash apollo.sh build 报错 文件 ERROR: /apollo/modules/drivers/camera/BUILD:49:1: no such package '@adv_plat//': Error downloading...

    Find Reference 2

    https://assetstore.unity.com/packages/tools/find-reference-2-59092 FR2 helps instantly clean up asset references for your projects Email | Documentation | Forum Why FR2? - Optimize your projects ...

    ios开发之项目废弃图片资源清理工具

    A Mac App to find unused images and resources in an XCode project. It is heavily influenced by jeffhodnett‘s [Unused](http://jeffhodnett.github.io/Unused/), but Unused is very slow, and the results ...

    Find Reference 2 1.2.10

    How can FR2 help? Just select one or more asset in Project panel and FR2 will show you: - Exactly what's being included in each scene or in each prefab. Remember that one redundant reference may ...

Global site tag (gtag.js) - Google Analytics