I import iosched into my android-studio,and to learn how to remove unused code from jars.When I executing 'installDebug' there is no problem,but when I executing 'installQualityassurance', or just changed minifyEnabled's vaule to true and then executing 'installDebug' again,there will be a problem like below:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':android:packageDebug'.
Unable to compute hash of E:\Android\android_studio_workspace\iosched\android\build\intermediates\classes-proguard\debug\classes.jar
I know the key point to remove unused code from jar is change minifyEnabled's vaule to true,but in my project ,for some jars it works,but for android-support-v4.jar has no effect. What should I do to remove unused code in android-support-v4.jar?
Thanks a lot!
Related
FAILURE: Build failed with an exception.
Where:
Build file '/Users/User/Desktop/testApp/node_modules/#mauron85/react-native-background-geolocation/android/common/build.gradle' line: 1
What went wrong:
A problem occurred evaluating project ':#mauron85_react-native-background-geolocation-common'.
Failed to apply plugin 'com.android.internal.library'.
The option 'android.enableUnitTestBinaryResources' is deprecated.
The current default is 'false'.
It has been removed from the current version of the Android Gradle plugin.
The raw resource for unit test functionality is removed.
Steps for solution :-
Install patch-package, this will later be used to make the changes permanent. (optional - step)
Now you have to hack the node_modules. Go to node_modules#mauron85\react-native-
background-geolocation\android\common\gradle.properties change below things:-
android.enableUnitTestBinaryResources=true # <-- remove this line
android.builder.sdkDownload=true
Run npx patch-package #mauron85/react-native-background-geolocation to save the patch.
Rebuild the app.
i keep getting this build error, i cant get the generated binding object correctly in the Kotlin code
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Error: The processing instruction target matching "[xX][mM][lL]" is not allowed.
i've tried to invalidate, restart, clean the project but it didn't pay off
if the clean and rebuild doesn't work.I think that downgrading your gradle version to 1.2.3.I hope it helps.
Receiving following errors
in Android Studio 2.2
Cannot resolve symbol R in Android Studio 2.2
in gradle console
Execution failed for task ':app:processDebugManifest'.
Manifest merger failed with multiple errors, see logs
Any help would be appreciated.
clean your build, and retry? Sometimes I noticed when I switch branches a lot my R.java file is outdated and doesn't get rebuilt correctly or references out of date xml id's.
Just rebuild project and it will be okay, I also have faced alot of times this error
I am getting Task 'jar' is ambiguous in root project 'ProjectName'.
Candidates are: 'jarDebugClasses', 'jarReleaseClasses'.
while i run ./gradlew clean jar
can anybody help me out.
The error information basically says what is wrong: gradle cannot determine which task you are trying to run as jar is short for both jarDebugClasses as well as jarReleaseClasses. Replacing jar with jarR will solve the ambiguity (if you want to trigger the jarReleaseClasses task - use jarD for jarDebugClasses).
I am using local gradle of version 2.4 and IntelliJ IDEA 14.1.3
When I run project from IntelliJ it runs fine but when execute gradle clean build command from command line it gives the flowing exception and build fails.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mockableAndroidJar'.
> java.util.zip.ZipException: invalid entry compressed size (expected 2051 but got 2050 bytes)
This looks like an old ques which is not yet answered yet.
I got into same problem, when my jar files could not be read by Android Studio and it gave me the above mentioned error.
Taking lead from the comment by -Mikhail Boyarsky I changed classpath in build.gradle file to 'com.android.tools.build:gradle:2.2.3'.
Synced project and it started working.
I solved it by changing com.android.tools.build:gradle:2.3.0 version to 2.2.3, then build it with another exception and then I changed the version back to 2.3.0.
Not sure how it works, looks like a gradle bug.