unable to build codename one app after adding admobfullscreen lib

亡梦爱人 提交于 2019-12-08 10:06:41

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/39924124/unable-to-build-codename-one-app-after-adding-admobfullscreen-lib

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!