添加admobfullscreen lib后无法构建代号一个应用程序 [英] unable to build codename one app after adding admobfullscreen lib

查看:151
本文介绍了添加admobfullscreen lib后无法构建代号一个应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚完成我的应用程序,一切正常,直到我添加了admob全屏lib文件并按照那里的说明进行操作。它可以在模拟器上运行(仅将代号一个图标显示为广告内容)。在构建应用程序时,我从构建服务器收到错误消息。像这样的东西:



使用JDK Java编译器API进行编译。
/tmp/build2300287277349891895xxx/MyApplication/src/main/java/com/codename1/admob/AdMobNativeImpl.java:3:错误:包com.google.android.gms.ads不存在
import com .google.android.gms.ads。*;
^
/tmp/build2300287277349891895xxx/MyApplication/src/main/java/com/codename1/admob/AdMobNativeImpl.java:13:错误:找不到符号
private InterstitialAd非页内广告;
^
符号:class InterstitialAd
位置:class AdMobNativeImpl
/tmp/build2300287277349891895xxxxxx/MyApplication/src/main/java/com/codename1/admob/AdMobNativeImpl.java:66:错误:找不到符号
interstitial = new InterstitialAd(活动);
^
符号:class InterstitialAd
位置:class AdMobNativeImpl
/tmp/build2300287277349891895xxx/MyApplication/src/main/java/com/codename1/admob/AdMobNativeImpl.java:68:错误:找不到符号
interstitial.setAdListener(new AdListener(){
^
符号:class AdListener
位置:class AdMobNativeImpl
/ tmp / build2300287277349891895xxxxxx / MyApplication / src / main / java / com / codename1 / admob / AdMobNativeImpl.java:106:错误:找不到符号
最终AdRequest adRequest = new AdRequest.Builder()。build();
^
符号:类AdRequest
位置:类AdMobNativeImpl
/tmp/build2300287277349891891895xxx/MyApplication/src/main/java/com/codename1/admob/AdMobNativeImpl.java:106:错误:包AdRequest不存在
最终AdRequest adRequest = new AdRequest.Builder()。build();
^
注:某些输入文件使用或覆盖不推荐使用的API。
注意:有关详细信息,请使用-Xlint:deprecation重新编译。
注意:某些输入文件使用未经检查或不安全的操作。
注意:使用-Xlint重新编译:未经检查,以获取详细信息。
6个错误
:compileDebugJavaWithJavac失败
:compileDebugJavaWithJavac(线程[Daemon worker,5,main])已完成。花费了7.981秒。



失败:


  • 出了什么问题:
    任务':compileDebugJavaWithJavac'的执行失败。


    编译失败;



  • 尝试:
    使用--debug选项运行以获取更多日志输出。
    以上是错误输出




请帮助我。不知道该怎么办。谢谢

解决方案

请确保您已添加扩展页面



请注意,该插件较旧,因此不包含该插件默认情况下,我认为您应该忽略includeGplayServices提示。


I have just completed my app,all good and fine till i added the admob fullscreen lib file and followed the instructions there. it works on the simulator(just shows the codename one icon as the ad content). on building the app, i get an error from the build servers. something like this:

Compiling with JDK Java compiler API. /tmp/build2300287277349891895xxx/MyApplication/src/main/java/com/codename1/admob/AdMobNativeImpl.java:3: error: package com.google.android.gms.ads does not exist import com.google.android.gms.ads.*; ^ /tmp/build2300287277349891895xxx/MyApplication/src/main/java/com/codename1/admob/AdMobNativeImpl.java:13: error: cannot find symbol private InterstitialAd interstitial; ^ symbol: class InterstitialAd location: class AdMobNativeImpl /tmp/build2300287277349891895xxx/MyApplication/src/main/java/com/codename1/admob/AdMobNativeImpl.java:66: error: cannot find symbol interstitial = new InterstitialAd(activity); ^ symbol: class InterstitialAd location: class AdMobNativeImpl /tmp/build2300287277349891895xxx/MyApplication/src/main/java/com/codename1/admob/AdMobNativeImpl.java:68: error: cannot find symbol interstitial.setAdListener(new AdListener() { ^ symbol: class AdListener location: class AdMobNativeImpl /tmp/build2300287277349891895xxx/MyApplication/src/main/java/com/codename1/admob/AdMobNativeImpl.java:106: error: cannot find symbol final AdRequest adRequest = new AdRequest.Builder().build(); ^ symbol: class AdRequest location: class AdMobNativeImpl /tmp/build2300287277349891895xxx/MyApplication/src/main/java/com/codename1/admob/AdMobNativeImpl.java:106: error: package AdRequest does not exist final AdRequest adRequest = new AdRequest.Builder().build(); ^ Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 6 errors :compileDebugJavaWithJavac FAILED :compileDebugJavaWithJavac (Thread[Daemon worker,5,main]) completed. Took 7.981 secs.

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':compileDebugJavaWithJavac'.

    Compilation failed; see the compiler error output for details.

  • Try: Run with --debug option to get more log output. Above is the error output

Please i need help. Dont know what to do. Thanks all

解决方案

Make sure that you added the build hints listed in the extension page

Notice that the plugin is old so it doesn't include that by default, I think you should ignore the includeGplayServices hint.

这篇关于添加admobfullscreen lib后无法构建代号一个应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆