开发者社区> 问答> 正文

Android studio在运行代码时总会报错?报错

Information:Gradle tasks [:ImageSwitcherTest:assembleDebug]
Error:C:\Users\XK\AndroidStudioProjects\MyApplication\ImageSwitcherTest\build\intermediates\instant-run-support\debug\slice_7\AndroidManifest.xml:2 attribute 'android:versionCode' not found
Error:failed processing manifest
Error:C:\Users\XK\AndroidStudioProjects\MyApplication\ImageSwitcherTest\build\intermediates\instant-run-support\debug\slice_6\AndroidManifest.xml:2 attribute 'android:versionCode' not found
Error:failed processing manifest
Error:C:\Users\XK\AndroidStudioProjects\MyApplication\ImageSwitcherTest\build\intermediates\instant-run-support\debug\slice_5\AndroidManifest.xml:2 attribute 'android:versionCode' not found
Error:failed processing manifest
Error:Execution failed for task ':ImageSwitcherTest:transformDexWithInstantRunSlicesApkForDebug'.
> java.lang.RuntimeException: com.android.ide.common.process.ProcessException: Failed to execute aapt
Information:BUILD FAILED in 16s
Information:7 errors
Information:0 warnings
Information:See complete output in console

请问这是怎么回事,谢谢!

展开
收起
爱吃鱼的程序员 2020-06-08 13:57:16 649 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    android:versionCode,在AndroidManifest.xml里面配置

    2020-06-08 13:57:32
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
58同城Android客户端Walle框架演进与实践之路 立即下载
Android组件化实现 立即下载
蚂蚁聚宝Android秒级编译——Freeline 立即下载