Android Studio various issues
1.dexDebug Execexception finished with Non-zero exit value 2 full bug log is as follows:
(Error:execution failed for task ': App:dexdebug ').
> com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:Process ' command ' D:\JDK8\jdk1.8.0_11\bin\java.exe "finished with Non-zero exit value 2)
You need to configure the following code in Gradle because more than one libraries file is referenced
Defaultconfig {
multidexenabled true
}
2.Execution failed for task ': App:transformclasseswithjarmergingfordebug '.
> Com.android.build.api.transform.TransformException:java.util.zip.ZipException:duplicate Entry:android/ Support/v4/app/backstackstate$1.class
Error:execution failed for task ': App:transformclasseswithjarmergingfordebug '.
> Com.android.build.api.transform.TransformException:java.util.zip.ZipException:duplicate Entry:android/ Support/annotation/arrayres.class
Error:execution failed for task ': App:transformclasseswithjarmergingfordebug '.
> Com.android.build.api.transform.TransformException:java.util.zip.ZipException:duplicate Entry:com/android/ Volley/servererror.class
Cause: SUPPORT-V4 is also referenced in the jar package or AAR package that was added, and conflicts with references in the project
CTRL + N--in the search box, type Backstackstate--finds all classes that reference the class, which are classes that cause conflicts
Remove code from Gradle in this project that references conflicting packages or remove conflicting code from the jar or AAR package to ensure that only one copy of the same third-party package is referenced in a module
3.project Sturcture and Project Structure are not displayed either by pressing the shortcut key or by opening it from files
Event log: Illegalargumentexception:multiple entries with same key:google inc.:google Apis:23=google APIs (Google Inc.) (API) and Google Inc.:google Apis:23=google APIs (Google Inc.) (API 23)
Workaround: First look at the location of the system Configuration SDK and whether the path used by Android Studio is the same, if not inconsistent reconfigure the system's SDK path or re-modify the SDK path of Android Studio
Remove Google API23 from SDK Manager
If not, uninstall Android Studio--Reinstall, and still have a problem click File--Invalidate Cashes/restart-Invalidate and Restart, No solution to continue removing Google API23 from SDK Manager
4.
Error:execution failed for task ': App:clean '.
> Unable to delete directory:e:\as_workspaces\djigo\app\build\intermediates\res\merged\debug
There is an error in the project and cannot delete the file under this folder. manually delete the Debug folder or a tool to shred (supplement with 20160916).
5.
Error:execution failed for task ': Tongyan_bugs_framework_master:processdebugandroidtestmanifest '.
> java.lang.RuntimeException:Manifest merger failed:uses-sdk:minsdkversion cannot be smaller than version Decl Ared in library [djigo:tysubwayinspection3.0-framework:unspecified] E:\as_workspaces\DJIgo\tongyan_bugs_framework_ Master\build\intermediates\exploded-aar\djigo\ty3.0-framework\unspecified\androidmanifest.xml
Suggestion:use tools:overridelibrary= "com.ton.framework" to force usage
The SDK version of the library is in conflict with the SDK version of the app.
6.
Error:execution failed for task ': App:processdebugmanifest '.
> Manifest merger failed:uses-sdk:minsdkversion cannot be smaller than version declared in library [djigo:tongy An-djigo-lib:unspecified] E:\as_workspaces\DJIgo\app\build\intermediates\exploded-aar\DJIgo\tongyan-djigo-lib\ Unspecified\androidmanifest.xml
Suggestion:use tools:overridelibrary= "Com.tongyan.lib.djigo" to force usage
7.
Error:execution failed for task ': Tongyan-djigo-lib:compilereleasejavawithjavac '.
> compilation failed; See the compiler error output for details.
Http://stackoverflow.com/questions/33404552/execution-failed-for-task-appcompiledebugjavawithjavac-in-android-studio
8.
Note: E:\as_workspaces\DJIgo\tongyan-djigo-lib\src\main\java\com\tongyan\lib\djigo\ui\view\ Controlmoveview.java uses or overrides outdated APIs.
Note: For more information, please recompile using-xlint:deprecation. Android studio-file->project structure->android SDK location (path should be incorrect)
9.
Error:execution failed for task ': App:compiledebugjavawithjavac '.
> Java.io.filenotfoundexception:e:\as_workspaces\tysubway\app\libs\pushservice-4.5.6.88.jar (the system cannot find the file specified.) )
It is necessary to cancel all the jar packages under the Lib package in the dependencies and add them.
10.
Error:execution failed for task ': Tysubwayinspection3.0-framework:packagereleaseresources '.
> java.io.IOException:Could Not delete folder E:\as_workspaces\DJIgo\tysubwayinspection3.0-framework\build\ Intermediates\bundles\release\res
11. Due to the following problems caused by the use of sdk5.0, it is necessary to use sdk6.0
E:\as_workspaces\DJIgo\app\build\intermediates\res\merged\debug\values-v23\values-v23.xml
Error: (3) Error retrieving parent for Item:no Resource found that matches the given name ' Android:TextAppearance.Material . Widget.Button.Inverse '.
Error: Error retrieving parent for Item:no Resource found that matches the given name ' Android:Widget.Material.Button . Colored '.
Error:execution failed for task ': App:processdebugresources '.
> com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:Process ' command ' D:\Android\adt-bundle-windows-x86_64-20140702\android_sdk\build-tools\23.0.0\aapt.exe ' finished with Non-zero Exit value 1
12.
Error:execution failed for task ': App:clean '.
> Unable to delete file:e:\as_workspaces\djigo-demo\app\build\intermediates\exploded-aar\com.android.support\ Support-v4\23.3.0\jars\classes.jar
Error in Project
13.
Error:execution failed for task ': App:transformclasseswithjarmergingfordebug '.
> Com.android.build.api.transform.TransformException:java.util.zip.ZipException:duplicate Entry:android/ Support/annotation/integerres.class
Package conflict, in the app and sub-Library carefully find out if there is the same jar package
14.
Error:execution failed for task ': App:clean '.
> Unable to delete directory:e:\as_workspaces\djigo_fly\app\build\outputs\apk
Cannot delete the file under this folder, to the directory will know.
15.
About the R file could not be introduced, causing a long time to fail to find the source of the error. For example, if the error occurs within Class A, but the message indicates that Class B's R file cannot be introduced.
This way you have to use the exclusion method, like a choice question, to the B-class problem first commented out, a class inside the problem will be exposed.
16.2016-07-04
With regard to this issue, it is important to note that. Sometimes even though there is a red fork that can run, the as check may cause the problem. In addition, if there is no problem in the code, you need to see if there is an error in the Androidmanifest.xml, which is generally the cause. Just know this.
17.2016-07-04
Error:execution failed for task ': Tongyan_structurecheck_library:clean '.
> Unable to delete directory:e:\as_workspaces\tysubwayinspectionnj_reconsitution\structurecheck_library\build\ Intermediates\exploded-aar
Follow the instructions above, you can not delete this directory, you will manually delete the next
18.2016-07-15
Error:execution failed for task ': App:clean '.
> Unable to delete directory:e:\as_workspaces\tysubwayinspectionnj_reconsitution\app\build\intermediates\ Classes\debug\com\tongyan\nanjing\subway
Unable to delete directory like this can not delete files, you find this folder to delete, if you can not delete the smash off. The error of the official website is still relatively stupid, he let you do what, you just do it.
19.2016-07-18
http://stackoverflow.com/questions/29440321/ NOSUCHFIELDERROR-NO-STATIC-FIELD-LISTVIEW1-OF-TYPE-I-IN-CLASS-LCOM-DISDEMO-RID20.2016-09-14 when the code in model cannot produce r files, you can do the following, but only if There is no conflict between the XML in the package and the Java code (ensure that you have as much clean as possible before you view the message). 21.2016-09-16 when the following problem occurs 1. Change the configuration in your as to the configuration line in the project that can be compiled 2. As in the place also need to note (is to say that the configuration in the project you are working on as is replaced by this sentence distributionurl-updated in 20160920)22.2016-09-23edittext:layout tag was TextView [wrongviewcast] Scene: Code run, clean, compile no problem, running on the phone is no problem, but the use of the signature will expose the error. It's not going to work, but the premise is that all the code is correct. The view type conversion is completely correct. Solution: Aactivity under the app package, but the layou layout in another library (hereinafter referred to as the B-pack), in the process of solving the problem conjecture may be the cause of the problem, and finally the B package in the app package below the layout file moved under the app package to solve the problem. 23.2016-10-24
Error: (1, 0) Plugin is too old, please update to a more recent version, or set android_daily_override environment variable To "AD3F801955F53E94516853B8F93AC2B9EE8CC4"
<a href= "fixgradleelements" >fix plugin version and sync project</a><br><a href= "Openfile:e:\as_ Workspaces\pedometerdemo\app\build.gradle ">open file</a>
Change the configuration of the service to the configuration of the currently available projects
24.2016-10-24
Error:could not open No_initscript class cache for initialization script ' C:\Users\Rubert\AppData\Local\Temp\ Aslocalrepo194.gradle ' (C:\Users\Rubert\.gradle\caches\2.4\scripts\asLocalRepo194_dzs652nv4687n61mc501sfben\ Initscript\no_initscript).
> Failed to create directory ' C:\Users\Rubert\.gradle\caches\2.4\scripts\asLocalRepo194_ Dzs652nv4687n61mc501sfben\initscript\no_initscript\classes '
25.2016-11-01error:execution failed for task ': App:transformclasseswithdexfordebug '.
> com.android.build.api.transform.TransformException:java.lang.RuntimeException:java.lang.RuntimeException: Com.android.ide.common.process.ProcessException:java.util.concurrent.ExecutionException: Java.lang.UnsupportedOperationException
This problem is due to Libs imported V4 package version has a problem, later changed to the following can be
dependencies {
Compile Filetree (include: [' *.jar '], dir: ' Libs ')
Compile files (' Libs/volley.jar ')
Compile files (' Libs/gson-1.7.1.jar ')
Compile ' com.android.support:support-v4:22.0.0 '
}
26.2016.12.26
> Cannot find System Java Compiler. Ensure that is installed a JDK (not just a JRE) and configured your java_home system variable to point to the accord ing directory.
FILE-->PROJECT-->STRUCTRUE-->SDK LOCATION-->JDK Location
Use embedded JDK front tick to specify a JDK address.
27.2017.1.10
Error:com.android.builder.internal.aapt.AaptException:Failed to crunch file E:\as_workspaces\TYSubwayInspectionNJ_ Reconsitution3\tongyan_structurecheck_library\build\intermediates\exploded-aar\tysubwayinspectionnj_ Reconsitution3\tongyan_framework_library\unspecified\res\drawable-hdpi-v4\np_numberpicker_up_disabled_focused_ Holo_dark.png into E:\as_workspaces\TYSubwayInspectionNJ_Reconsitution3\Tongyan_StructureCheck_Library\build\ Intermediates\res\merged\androidtest\debug\drawable-hdpi-v4\np_numberpicker_up_disabled_focused_holo_dark.png
Modify the name path to avoid a long path
28.2017.2.16
When you android:targetsdkversion= "22" and then change 22 to 23 o'clock, you will encounter various problems, such as the compilation does not pass, the file cannot be written (permissions registered). Remove the app from your phone and install it.
29.2017.2.23
Error:error converting bytecode to Dex:
Cause:com.android.dex.DexException:Multiple dex Files Define landroid/support/v4/accessibilityservice/ Accessibilityserviceinfocompat$accessibilityserviceinfoversionimpl;
30.2017.2.24
Error:a problem occurred configuring project ': App '.
> Unable to find optional library:org.apache.http.legacy
Android {Compilesdkversion23 Buildtoolsversion "23.0.3" Defaultconfig {applicationid ' Com.xxx.xxxe ' m Insdkversion 14 targetsdkversion 22 Versioncode 1 Versionname" 1.0 " multidexenabled Span style= "COLOR: #0000ff" >true} buildtypes {release {minifyenabled false Proguardfiles getdefaultproguardfile (' proguard-android.txt '), ' Proguard-rules.pro ' }} productflavors {} uselibrary ' org.apache.http.legacy ' }
31.2017-03-08
Error:execution failed for task ': App:compilereleasejava '.
> Cannot find System Java Compiler. Ensure that is installed a JDK (not just a JRE) and configured your java_home system variable to point to the accord ing directory.
Remove the check box here and change it to your JDK root directory.
32.
Error:error converting bytecode to Dex:
Cause:com.android.dex.DexException:Multiple dex files define lorg/apache/commons/net/datagramsocketclient;
Clean
33.2017-04-28
Error:execution failed for task ': App:transformclasseswithdexfordebug '.
> com.android.build.api.transform.TransformException:com.android.ide.common.process.ProcessException: Java.util.concurrent.ExecutionException:java.lang.UnsupportedOperationException
With the 25th.
34.2017-04-28
Android API23 cannot be used with httpclient, add the following code to the Build.gradle file
android { "org.apache.http.legacy"}
35.2017-07-06
error:failed to open zip file.
Gradle ' s dependency cache May is corrupt (this sometimes occurs after a network connection timeout.)
<a href= "Syncproject" >re-download Dependencies and Sync Project (requires network) </a>
<a href= "Syncproject" >re-download Dependencies and Sync Project (requires network) </a>
The problem is that you gradle the wrong version, File->project Structure->project->gradle versions in projects that are currently running normally (2.14.1), set the version to the same location in the project that you cannot run. Then, there was no then.
Reprint-android Studio various issues