# Android error summary
Recently, I have been trying to summarize the mistakes I encounter when I write my own program, but for many reasons I haven't put them into action. This error summary I will continue to update, the following mistakes I encountered and resolved, programming tool Android studio 2.0.
** Error Tip 1**
Error:Execution failed for task ':app:processDebugResources'. > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Administrator\AppData\Local\Android\sdk1\build-tools\23.0.3\aapt.exe'' finished with non-zero exit value 1
** Problem Description and Solution **: If you change only a small part of the program, but report the error, you can solve it by clicking Build - > clear project.
** Error Tips II: **
Error:A problem occurred configuring project ':app'. > Could not resolve all dependencies for configuration ':app:_debugApkCopy'. > Could not find com.android.support:appcompat-v7:23.4.0. Required by: xcmg:app:unspecified > Could not find com.google.android.gms:play-services-appindexing:8.1.0. Required by: xcmg:app:unspecified > Could not find com.android.support:support-v4:23.4.0. Required by: xcmg:app:unspecified
** Problem Description and Solutions **: If you import new existing code, follow these steps to solve the problem (this is my problem, not necessarily for all such problems) ** Step 1** Click SDK Manager - > SDK Tools to check google respository - > apply and follow the prompt. (https://img-blog.csdn.net/20161103094750341)
** Step 2 **: After the above steps are completed, click Build - > clean project.
** Error Tip 3: **
Error:A problem occurred configuring project ':app'. > Could not resolve all dependencies for configuration ':app:_debugApkCopy'. > Could not find com.android.support:appcompat-v7:23.4.0. Required by: xcmg:app:unspecified > Could not find com.android.support:support-v4:23.4.0. Required by: xcmg:app:unspecified > Could not find com.android.support:support-v4:23.4.0. Required by: xcmg:app:unspecified > com.google.android.gms:play-services-appindexing:8.1.0 > com.google.android.gms:play-services-basement:8.1.0
** Problem Description and Solutions **: If you import new existing code, follow these steps to solve the problem (this is my problem, not necessarily for all such problems)
** Step 1** Click SDK Manager - > SDK Tools to check android support respository - > apply and follow the prompt. (https://img-blog.csdn.net/20161103095412194)
** Step 2** After the above steps are completed, click Build - > clean project again.
** Error Tips IV**
Error:(1, 0) Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to "e0a7992f192675817297767391b8206ce7252324" <a href="fixGradleElements">Fix plugin version and sync project</a><br><a href="openFile:F:\Androidstudio\ListViewDemo\app\build.gradle">Open File</a>
** Problem Description and Solution **: If you have this problem when importing a package, follow these steps to modify it.
** Step 1**: Open build.gradle and find the classpath, as shown in Figure 1
The classpath value here is not correct, so how to set the value here?
** Step 2**: File - > project structure (https://img-blog.csdn.net/20161103101421597)
** Step 3 **: project - > Write the contents of android plugin version into the classpath of Step 1.
** Step 4 **: After the above steps are completed, click Build - > clean project. (To be continued...)
** Error Tips 5**
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
Solution **: Add the following code to the project confusion profile proguard-rules.pro: -keepattributes EnclosingMethod
** Error Tips VI**
All packages are not available for download!The following packages are not available:-Package id platforms;android-1
Solution **: Extract the data line and reinsert it. Well, don't ask me why. That's how I solved it.
** Error Tips VII**
Error:(16, 0) Could not find method android() for arguments
Solution **: Delete android {} in the outermost build.gradle file of the project
** Question Tips VIII **
Could not find method compile() for arguments
Solution **: Remove complie s from dependencies in the outermost build. grade file of the project. Then rebuild project and clean project.
** Question Tips IX**
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/3.3/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 2097152KB object heap Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
Solution 1**: Add in gradle.properties
org.gradle.jvmargs=-Xmx1024m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 org.gradle.parallel=true
Solution 2**: Write in the C: Users YDS (current computer username) gradle (if not new) gradle.properties file:
org.gradle.jvmargs=-Xmx1024m
** Error Tips 10**
android.view.InflateException: Binary XML file line #243: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
Solution **: Write a view in the layout file (I write v in lowercase and should be capitalized) and change it to View.
** Error Tip 11**: Failed to create jvm: error code-6
** Solution **: Delete studio.exe.vmoptions in the C: Users XXX (computer username, not Admination) Android Studioxx. XX directory
** Error Tips 12**
android.content.res.Resources$NotFoundException: String resource ID #0x2
Solution: When the setText() method is called, if an int is passed in, it will not be used as content but as resourceID! So convert int to string type
** Error Tips 13**
Error when using NagivationView: java.lang.reflect.Invocation Target Exception
Solution: (1) Write Activity as CompatActivity; (2) Change the theme of the Activity in Manifest to the theme of @style/Theme.AppCompat.
** Error Tips 14**
Error:(1, 1) A problem occurred evaluating project ':app'. > Failed to apply plugin [id 'com.android.application'] > Could not create plugin of type 'AppPlugin'.
Solution: There is a problem with the build.grade file. The problem is as follows:
Replace with the following
Then clear project