服务器构建过程出错

时间:2017-05-17 15:03:53

标签: codenameone

美好的一天 我刚刚完成了我的代号一个应用程序,并且在模拟器中测试时一切顺利,但是在发送一个android构建时它失败了。我检查了错误日志,似乎无法理解问题所在。下面是显示代号为one server的完整错误日志的链接。 链接:https://www.dropbox.com/s/6f7fcr8l7fr1w4d/new%20error.txt?dl=0

1 个答案:

答案 0 :(得分:1)

这是日志中的实际错误:

/tmp/build3509442697339141445xxx/myEvents/src/main/java/com/mycompany/myEvents/myEventsStub.java:65: error: package com.google.android.gms.ads does not exist
            com.google.android.gms.ads.AdView adView = new com.google.android.gms.ads.AdView(this);
                                      ^
/tmp/build3509442697339141445xxx/myEvents/src/main/java/com/mycompany/myEvents/myEventsStub.java:65: error: package com.google.android.gms.ads does not exist
            com.google.android.gms.ads.AdView adView = new com.google.android.gms.ads.AdView(this);
                                                                                     ^
/tmp/build3509442697339141445xxx/myEvents/src/main/java/com/mycompany/myEvents/myEventsStub.java:68: error: package com.google.android.gms.ads does not exist
            adView.setAdSize(com.google.android.gms.ads.AdSize.SMART_BANNER);
                                                       ^
/tmp/build3509442697339141445xxx/myEvents/src/main/java/com/mycompany/myEvents/myEventsStub.java:69: error: package com.google.android.gms.ads.AdSize does not exist
            AndroidImplementation.setViewAboveBelow(null, adView, 0, com.google.android.gms.ads.AdSize.SMART_BANNER.getHeightInPixels(this));
                                                                                                      ^
/tmp/build3509442697339141445xxx/myEvents/src/main/java/com/mycompany/myEvents/myEventsStub.java:70: error: package com.google.android.gms.ads does not exist
            com.google.android.gms.ads.AdRequest adRequest = new com.google.android.gms.ads.AdRequest.Builder().addTestDevice("C6783E2486F0931D9D09FABC65094FDF").build();
                                      ^
/tmp/build3509442697339141445xxx/myEvents/src/main/java/com/mycompany/myEvents/myEventsStub.java:70: error: package com.google.android.gms.ads.AdRequest does not exist
            com.google.android.gms.ads.AdRequest adRequest = new com.google.android.gms.ads.AdRequest.Builder().addTestDevice("C6783E2486F0931D9D09FABC65094FDF").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

我猜你定义了由于某种原因失败的构建提示android.googleAdUnitIdgoogle.adUnitId。 AFAIK横幅广告并非经常被我们的开发人员使用,因此可能会出现问题并且没有人注意到。