android studio 错误总结

Error:Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 1572864KB object heap
grald构建堆栈内存不足,在C:\Users\Administrator\.gradle\gradle.properties文件中修改内存大小-Xmx512m。


Error:Could not download artifact 'gradle.jar (com.android.tools.build:gradle:1.0.1)': No cached version available for offline mode.
导入别人的工程会出现这样的问题,是你安装的Android studio的版本对应build.gradle文件里的classpath与别人项目的classpath不同,改成你版本对应的路径,再try again即可



Error:(55, 13) Failed to resolve: com.google.firebase:firebase-messaging:9.0.0
Error:(54, 13) Failed to resolve: com.google.firebase:firebase-core:9.0.0

需要在 build.gradle 中的 buildscript,allprojects添加 jcenter(),mavenCentral()

添加库包的托管库,这两个都是。库包都是从这里面下载的。
可有一些引用需要tools的版本才能引用的到,所以可能需要tools升级


com.Android.build.api.transform.TransformException:java.util.zip.ZipException: duplicate entry:android/support/v4/app/TaskStackBuilder$SupportParentable.class`.
Android Studio 引用多个jar、aar或者工程时出现

在所添加的 jar 包或 aar 包中也引用了support-v4,与工程中引用的相冲突


Error:(9, 0) Your project path contains non-ASCII characters. This will most likely
cause the build to fail on Windows. Please move your project to a different
directory. See http://b.android.com/95744 for details.

项目路径中包涵中文字符,修改为中文即可


Installation failed with message INSTALL_FAILED_INSUFFICIENT_STORAGE.
It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.
WARNING: Uninstalling will remove the application data!
内存空间不足,无法安装


Unable to create Debug Bridge: Unable to start adb server: error: could not install *smartsocket* listener: cannot bind to 127.0.0.1:5037: 通常每个套接字地址(协议/网络地址/端口)只允许使用一次。 (10048)
could not read ok from ADB Server
* failed to start daemon *
error: cannot connect to daemon
'E:\android-sdk-windows\platform-tools\adb.exe,start-server' failed -- run manually if necessary
端口被占用
方法1,在as工具栏,tools->android->enable adb integration勾选
方法2,在cmd中反复,adb kill-server  adb start-server 知道出现端口信息
方法2,重新启动机器

猜你喜欢

转载自blog.csdn.net/l331258747/article/details/52936622