Android studio打包apk报错Error: [Instantiatable]

报错代码:
Information:Gradle tasks [:Android_hdjs:assembleRelease]
:Android_hdjs:preBuild UP-TO-DATE
:Android_hdjs:preReleaseBuild UP-TO-DATE
:Android_hdjs:checkReleaseManifest
:Android_hdjs:prepareReleaseDependencies
:Android_hdjs:compileReleaseAidl UP-TO-DATE
:Android_hdjs:compileReleaseRenderscript UP-TO-DATE
:Android_hdjs:generateReleaseBuildConfig UP-TO-DATE
:Android_hdjs:generateReleaseAssets UP-TO-DATE
:Android_hdjs:mergeReleaseAssets UP-TO-DATE
:Android_hdjs:generateReleaseResValues UP-TO-DATE
:Android_hdjs:generateReleaseResources UP-TO-DATE
:Android_hdjs:mergeReleaseResources UP-TO-DATE
:Android_hdjs:processReleaseManifest UP-TO-DATE
:Android_hdjs:processReleaseResources UP-TO-DATE
:Android_hdjs:generateReleaseSources UP-TO-DATE
:Android_hdjs:compileReleaseJavaWithJavac UP-TO-DATE
:Android_hdjs:compileReleaseNdk UP-TO-DATE
:Android_hdjs:compileReleaseSources UP-TO-DATE
:Android_hdjs:lintVitalRelease
E:\edxc_yhb_android\hdjs\Android_hdjs\src\main\java\com\wlhy\app\UpdateVersionByDownloadManager.java
Error:Error: This inner class should be static (com.wlhy.app.UpdateVersionByDownloadManager.DownloadCompleteReceiver) [Instantiatable]

1个回答

这个内部类应该是静态的,意思是你要找到com.wlhy.app.UpdateVersionByDownloadManager.DownloadCompleteReceiver这个类,然后查看用法......看看你是不是用在静态里面了。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问