Reputation: 940
Plugin version: com.android.tools.build:gradle:1.4.0-beta6 Build type config:
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-project.txt'
}
}
minSdkVersion 9
targetSdkVersion 23
useLibrary 'org.apache.http.legacy'
compileSdkVersion 23
buildToolsVersion '23.0.1'
The build cannot be finished because of exception in gradle task. This is extremaly important, because class repackaging fixes many issues on Samsung devices with precompiled support library sources.
Error: :myHeart:transformClassesAndResourcesWithProguardForGooglePlayRelease FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':myHeart:transformClassesAndResourcesWithProguardForGooglePlayRelease'.
java.io.IOException: Can't write [H:\Projekty\my-heart\myHeart\build\intermediates\transforms\CLASSES_and_RESOURCES\FULL_PROJECT\proguard\GooglePlay\release] (Can't read [H:\Projekty\my-heart\myHeart\build\intermediates\classes\GooglePlay\release] (H:\Projekty\my-heart\myHeart\build\intermediates\transforms\CLASSES_and_RESOURCES\FULL_PROJECT\proguard\GooglePlay\release\happy\hacking\con.class (The system cannot find the file specified)))
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
proguard file:
-repackageclasses 'happy.hacking'
-keep class android.support.v4.app.** { *; }
-keep interface android.support.v4.app.** { *; }
-keep class android.support.v7.app.** { *; }
-keep interface android.support.v7.app.** { *; }
-keep class android.support.v13.app.** { *; }
-keep interface android.support.v13.app.** { *; }
#To remove debug logs:
-assumenosideeffects class android.util.Log {
public static *** d(...);
public static *** v(...);
public static *** w(...);
}
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable
I have filed an issue: https://code.google.com/p/android/issues/detail?id=190386&thanks=190386&ts=1445003690
Upvotes: 1
Views: 312
Reputation: 75788
1.4 update to the Android Studio stable release channel. Most of the work and enhancements for Android Studio 1.4 are under the hood.
@Szymon Klimaszewski Trying to use Stable version .
A version of a piece of software that is made available for testing.
For your requirement Use 1.4.0-beta4 instead of 1.4.0-beta6
.1.4.0-beta6
is buggy .
Read this article
http://tools.android.com/tech-docs/new-build-system
Upvotes: 1
Reputation: 940
Thanks to IntelliJ Amiya it turned out that 1.4.0-beta6 is buggy, but 1.4.0-beta4 works totally fine.
Upvotes: 1