Android学习之路解决问题

呀呀先不管为什么了,能解决就好。。

报错:com.android.ide.common.process.ProcessException: Failed to execute aapt

解决:Module的build.gradle中的compileSdkVersion和buildToolsVersion以及dependncies全部正确

android {
    compileSdkVersion 27
    buildToolsVersion "27.0.3" 
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:27.1.0'

参考:

https://developer.android.google.cn/studio/releases/gradle-plugin.html#updating-plugin

报错:Should have subtitle controller already set 

是这么说的

When the MediaPlayer starts playing a music (or other source), it checks if there is a SubtitleController and shows this message if it’s not set. It doesn’t seem to care about if the source you want to play is a music or video. Not sure why he did that.

百度来一个翻译

当播放器开始播放音乐(或其他来源),检查是否有subtitlecontroller显示此消息如果不设置。它似乎并不关心你想播放的源是音乐还是视频。不知道他为什么那样做。

管他呢不知道为嘛,如果以后必须要解决再学习。

参考:http://blog.csdn.net/ouyang_peng/article/details/54023240

报错:Calling invokeAndWait from read-action leads to possible deadlock.

解决:关掉重新打开

报错:com.android.ddmlib.AdbCommandRejectedException: insufficient permissions for device

解决:手机线掉了,再连一遍

报错:Validates resource references inside Android XML files.

比如下面这个报红

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">

参考:http://blog.163.com/wslngcjsdxdr@126/blog/static/16219623020146971323118/

http://blog.csdn.net/u010687761/article/details/73732451

报错:Error:Execution failed for task ':app:transformClassesWithRetrolambdaForDebug'.

> Missing javaCompileTask for variant: debug/0 from output dir: 

这个真实查了好久,首先来个关于retrolmabda的小介绍:https://www.jianshu.com/p/e950a683b2a8点击打开链接

之后就出现问题,还是版本变更引发的西瓜案,懵啊,我用的是android3.0 jdk1.8的竟然还是使用了插件。。参考http://blog.csdn.net/hexingen/article/details/78298500点击打开链接

使用就是用了,只不过改一下下

解决:根目录下的build.gradle的依赖里,把retrolmabda写成3.7.0

classpath 'me.tatarka:gradle-retrolambda:3.7.0'  //使用lamatada


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值