Android Studio,使用 Hbuilder,报错

zhaokui525
2017-07-12 07:42 3.8k 0

https://github.com/jpush/jpush-hbuilder-demo#install
您好,我在GitHub上面下载的Demo。Android的怎么无法运行啊。我是直接在Android studio中打开的。包名和key都更换了,麻烦看看谢谢啦

左边报错 :::

Information:Gradle tasks [:app:assembleDebug]
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/RInformation.java
Error:(8, 35) 错误: 找不到符号
符号: 类 PdrR
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java
Error:(22, 36) 错误: 程序包io.dcloud.common.DHInterface不存在
Error:(23, 36) 错误: 程序包io.dcloud.common.DHInterface不存在
Error:(24, 29) 错误: 程序包io.dcloud.common.util不存在
Error:(26, 35) 错误: 找不到符号
符号: 类 StandardFeature
Error:(38, 20) 错误: 找不到符号
符号:   类 IWebview
位置: 类 JPushService
Error:(50, 22) 错误: 找不到符号
符号:   类 IWebview
位置: 类 JPushService
Error:(88, 26) 错误: 找不到符号
符号:   类 IWebview
位置: 类 JPushService
Error:(92, 28) 错误: 找不到符号
符号:   类 IWebview
位置: 类 JPushService
Error:(96, 31) 错误: 找不到符号
符号:   类 IWebview
位置: 类 JPushService
Error:(171, 35) 错误: 找不到符号
符号:   类 IWebview
位置: 类 JPushService
Error:(181, 38) 错误: 找不到符号
符号:   类 IWebview
位置: 类 JPushService
Error:(208, 41) 错误: 找不到符号
符号:   类 IWebview
位置: 类 JPushService
Error:(217, 41) 错误: 找不到符号
符号:   类 IWebview
位置: 类 JPushService
Error:(221, 38) 错误: 找不到符号
符号:   类 IWebview
位置: 类 JPushService
Error:(225, 39) 错误: 找不到符号
符号:   类 IWebview
位置: 类 JPushService
Error:(237, 25) 错误: 找不到符号
符号:   类 IWebview
位置: 类 JPushService
Error:(250, 26) 错误: 找不到符号
符号:   类 IWebview
位置: 类 JPushService
Error:(259, 34) 错误: 找不到符号
符号:   类 IWebview
位置: 类 JPushService
Error:(274, 30) 错误: 找不到符号
符号:   类 IWebview
位置: 类 JPushService
Error:(288, 49) 错误: 找不到符号
符号:   类 IWebview
位置: 类 JPushService
Error:(298, 50) 错误: 找不到符号
符号:   类 IWebview
位置: 类 JPushService
Error:(306, 42) 错误: 找不到符号
符号:   类 IWebview
位置: 类 JPushService
Error:(318, 29) 错误: 找不到符号
符号:   类 IWebview
位置: 类 JPushService
Error:(354, 32) 错误: 找不到符号
符号:   类 IWebview
位置: 类 JPushService
Error:(378, 35) 错误: 找不到符号
符号:   类 IWebview
位置: 类 JPushService
Error:(43, 5) 错误: 方法不会覆盖或实现超类型的方法
Error:(69, 5) 错误: 方法不会覆盖或实现超类型的方法
Error:(71, 9) 错误: 找不到符号
符号:   变量 super
位置: 类 JPushService
Error:(75, 5) 错误: 方法不会覆盖或实现超类型的方法
Error:(77, 9) 错误: 找不到符号
符号:   变量 super
位置: 类 JPushService
Error:(101, 61) 错误: 找不到符号
符号:   变量 JSUtil
位置: 类 JPushService
Error:(101, 17) 错误: 找不到符号
符号:   变量 JSUtil
位置: 类 JPushService
Error:(103, 61) 错误: 找不到符号
符号:   变量 JSUtil
位置: 类 JPushService
Error:(103, 17) 错误: 找不到符号
符号:   变量 JSUtil
位置: 类 JPushService
Error:(175, 61) 错误: 找不到符号
符号:   变量 JSUtil
位置: 类 JPushService
Error:(175, 13) 错误: 找不到符号
符号:   变量 JSUtil
位置: 类 JPushService
Error:(326, 25) 错误: 找不到符号
符号:   变量 JSUtil
位置: 类 JPushService
Error:(325, 17) 错误: 找不到符号
符号:   变量 JSUtil
位置: 类 JPushService
Error:(333, 25) 错误: 找不到符号
符号:   变量 JSUtil
位置: 类 JPushService
Error:(332, 17) 错误: 找不到符号
符号:   变量 JSUtil
位置: 类 JPushService
Error:(340, 25) 错误: 找不到符号
符号:   变量 JSUtil
位置: 类 JPushService
Error:(339, 17) 错误: 找不到符号
符号:   变量 JSUtil
位置: 类 JPushService
Error:(364, 25) 错误: 找不到符号
符号:   变量 JSUtil
位置: 类 JPushService
Error:(363, 17) 错误: 找不到符号
符号:   变量 JSUtil
位置: 类 JPushService
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
Information:BUILD FAILED
Information:Total time: 7.351 secs
Information:46 errors
Information:0 warnings
Information:See complete output in console


右边报错 ::

Executing tasks: [:app:assembleDebug]

Configuration on demand is an incubating feature.
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory.  It is currently set to /Users/imac/Documents/eclipase_android/android-sdk/ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.

Incremental java compilation is an incubating feature.
:app:buildInfoDebugLoader
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:prepareCnJiguangSdkJcore112Library
:app:prepareCnJiguangSdkJpush305Library
:app:prepareComAndroidSupportAnimatedVectorDrawable2531Library
:app:prepareComAndroidSupportAppcompatV72531Library
:app:prepareComAndroidSupportConstraintConstraintLayout102Library
:app:prepareComAndroidSupportSupportCompat2531Library
:app:prepareComAndroidSupportSupportCoreUi2531Library
:app:prepareComAndroidSupportSupportCoreUtils2531Library
:app:prepareComAndroidSupportSupportFragment2531Library
:app:prepareComAndroidSupportSupportMediaCompat2531Library
:app:prepareComAndroidSupportSupportV42531Library
:app:prepareComAndroidSupportSupportVectorDrawable2531Library
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources
:app:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
:app:javaPreCompileDebug
:app:compileDebugJavaWithJavac
:app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).

/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:22: 错误: 程序包io.dcloud.common.DHInterface不存在
import io.dcloud.common.DHInterface.IWebview;
                                   ^
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:23: 错误: 程序包io.dcloud.common.DHInterface不存在
import io.dcloud.common.DHInterface.StandardFeature;
                                   ^
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:24: 错误: 程序包io.dcloud.common.util不存在
import io.dcloud.common.util.JSUtil;
                            ^
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:26: 错误: 找不到符号
public class JPushService extends StandardFeature {
                                  ^
  符号: 类 StandardFeature
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:38: 错误: 找不到符号
    private static IWebview mIWebview;
                   ^
  符号:   类 IWebview
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:50: 错误: 找不到符号
    public void init(IWebview webview, JSONArray data) {
                     ^
  符号:   类 IWebview
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:88: 错误: 找不到符号
    public void stopPush(IWebview webview, JSONArray data) {
                         ^
  符号:   类 IWebview
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:92: 错误: 找不到符号
    public void resumePush(IWebview webview, JSONArray data) {
                           ^
  符号:   类 IWebview
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:96: 错误: 找不到符号
    public void isPushStopped(IWebview webview, JSONArray data) {
                              ^
  符号:   类 IWebview
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:171: 错误: 找不到符号
    public void getRegistrationID(IWebview webview, JSONArray data) {
                                  ^
  符号:   类 IWebview
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:181: 错误: 找不到符号
    public void addLocalNotification(IWebview webview, JSONArray data) {
                                     ^
  符号:   类 IWebview
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:208: 错误: 找不到符号
    public void removeLocalNotification(IWebview webview, JSONArray data) {
                                        ^
  符号:   类 IWebview
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:217: 错误: 找不到符号
    public void clearLocalNotifications(IWebview webview, JSONArray data) {
                                        ^
  符号:   类 IWebview
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:221: 错误: 找不到符号
    public void clearAllNotification(IWebview webview, JSONArray data) {
                                     ^
  符号:   类 IWebview
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:225: 错误: 找不到符号
    public void clearNotificationById(IWebview webview, JSONArray data) {
                                      ^
  符号:   类 IWebview
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:237: 错误: 找不到符号
    public void setTags(IWebview webview, JSONArray data) {
                        ^
  符号:   类 IWebview
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:250: 错误: 找不到符号
    public void setAlias(IWebview webview, JSONArray data) {
                         ^
  符号:   类 IWebview
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:259: 错误: 找不到符号
    public void setTagsWithAlias(IWebview webview, JSONArray data) {
                                 ^
  符号:   类 IWebview
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:274: 错误: 找不到符号
    public void setDebugMode(IWebview webview, JSONArray data) {
                             ^
  符号:   类 IWebview
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:288: 错误: 找不到符号
    public void setBasicPushNotificationBuilder(IWebview webview, JSONArray data) {
                                                ^
  符号:   类 IWebview
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:298: 错误: 找不到符号
    public void setCustomPushNotificationBuilder(IWebview webview, JSONArray data) {
                                                 ^
  符号:   类 IWebview
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:306: 错误: 找不到符号
    public void setLatestNotificationNum(IWebview webview, JSONArray data) {
                                         ^
  符号:   类 IWebview
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:318: 错误: 找不到符号
    public void setPushTime(IWebview webview, JSONArray data) {
                            ^
  符号:   类 IWebview
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:354: 错误: 找不到符号
    public void setSilenceTime(IWebview webview, JSONArray data) {
                               ^
  符号:   类 IWebview
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:378: 错误: 找不到符号
    public void requestPermission(IWebview webview, JSONArray data) {
                                  ^
  符号:   类 IWebview
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/RInformation.java:8: 错误: 找不到符号
public class RInformation extends PdrR {
                                  ^
  符号: 类 PdrR
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:43: 错误: 方法不会覆盖或实现超类型的方法
    @Override
    ^
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:69: 错误: 方法不会覆盖或实现超类型的方法
    @Override
    ^
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:71: 错误: 找不到符号
        super.onPause();
        ^
  符号:   变量 super
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:75: 错误: 方法不会覆盖或实现超类型的方法
    @Override
    ^
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:77: 错误: 找不到符号
        super.onResume();
        ^
  符号:   变量 super
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:101: 错误: 找不到符号
                JSUtil.execCallback(webview, callbackId, 1, JSUtil.OK, false);
                                                            ^
  符号:   变量 JSUtil
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:101: 错误: 找不到符号
                JSUtil.execCallback(webview, callbackId, 1, JSUtil.OK, false);
                ^
  符号:   变量 JSUtil
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:103: 错误: 找不到符号
                JSUtil.execCallback(webview, callbackId, 0, JSUtil.OK, false);
                                                            ^
  符号:   变量 JSUtil
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:103: 错误: 找不到符号
                JSUtil.execCallback(webview, callbackId, 0, JSUtil.OK, false);
                ^
  符号:   变量 JSUtil
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:175: 错误: 找不到符号
            JSUtil.execCallback(webview, callbackId, regId, JSUtil.OK, false);
                                                            ^
  符号:   变量 JSUtil
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:175: 错误: 找不到符号
            JSUtil.execCallback(webview, callbackId, regId, JSUtil.OK, false);
            ^
  符号:   变量 JSUtil
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:326: 错误: 找不到符号
                        JSUtil.ERROR, false);
                        ^
  符号:   变量 JSUtil
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:325: 错误: 找不到符号
                JSUtil.execCallback(webview, callbackId, "允许推送日期设置不正确",
                ^
  符号:   变量 JSUtil
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:333: 错误: 找不到符号
                        JSUtil.ERROR, false);
                        ^
  符号:   变量 JSUtil
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:332: 错误: 找不到符号
                JSUtil.execCallback(webview, callbackId, "允许推送开始时间设置不正确",
                ^
  符号:   变量 JSUtil
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:340: 错误: 找不到符号
                        JSUtil.ERROR, false);
                        ^
  符号:   变量 JSUtil
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:339: 错误: 找不到符号
                JSUtil.execCallback(webview, callbackId, "允许推送结束时间设置不正确",
                ^
  符号:   变量 JSUtil
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:364: 错误: 找不到符号
                        JSUtil.ERROR, false);
                        ^
  符号:   变量 JSUtil
  位置: 类 JPushService
/Users/imac/Downloads/jpush-hbuilder-demo-master/android/app/src/main/java/io/dcloud/feature/jpush/JPushService.java:363: 错误: 找不到符号
                JSUtil.execCallback(webview, callbackId, "时间设置不正确",
                ^
  符号:   变量 JSUtil
  位置: 类 JPushService
45 个错误

:app:compileDebugJavaWithJavac FAILED
:app:buildInfoGeneratorDebug

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 7.351 secs

由于本人不懂Android开发,所以不清楚这两个是啥意思,所以就都放上去了。辛苦看看,谢谢。。。

1个回答

热门排序