Issue
I want to run the app without clicking on "generate signed apk..."
My project structure is :
I want to run 'main' sourceSet
I use in Built Variants 'release',
But error is:
The APK file ...\zastavokNet\build\outputs\apk\zastavokNet-release.apk does not exist on disk.
Here is my gradle:
buildscript {
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
classpath 'org.tmatesoft.svnkit:svnkit-cli:1.8.7'
}
}
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 22
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.***"
minSdkVersion 14
targetSdkVersion 22
versionName "1.0."
versionCode 1
}
signingConfigs {
release {
storeFile file("***\\key.jks")
storePassword "***"
keyAlias "***"
keyPassword "***"
}
}
repositories {
maven {
url "https://mint.splunk.com/gradle/"
}
}
buildTypes {
release {
minifyEnabled true
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-android.txt'
}
debug {
debuggable true
signingConfig android.signingConfigs.debug
}
}
sourceSets {
main {
manifest.srcFile '/src/main/AndroidManifest.xml'
java.srcDirs = ['/src/main/java']
res.srcDirs = ['/src/main/res']
assets.srcDirs = ['/src/main/assets']
}
debug {
manifest.srcFile '/src/main/AndroidManifest.xml'
res.srcDirs = ['/src/debug/res']
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
Solution
Often times doing a clean (Build > Clean Project) then rebuilding will fix issues such as this.
If it doesn't, you should also try updating your build tools- 21.1.2 is pretty old. The latest is 23.0.1. While you are at it, check your top-level build.gradle and make sure you are using the latest Gradle plugin version (1.3.1, the com.android.tools.build:gradle
dependency).
Answered By - Bryan Herbst
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.