I know this was asked a few times but the solutions did not really help. I want to import the 'sample' project from https://github.com/zsoltk/overpasser into android studio and I get the following error:
A problem occurred configuring project ':sample'.
> Could not resolve all dependencies for configuration ':sample:_debugCompile'.
> Could not find com.android.support:multidex:1.0.1.
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/multidex/1.0.1/multidex-1.0.1.pom
https://jcenter.bintray.com/com/android/support/multidex/1.0.1/multidex-1.0.1.jar
Required by:
overpasser3:sample:unspecified
> Could not find com.android.support:appcompat-v7:23.4.0.
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/appcompat-v7/23.4.0/appcompat-v7-23.4.0.pom
https://jcenter.bintray.com/com/android/support/appcompat-v7/23.4.0/appcompat-v7-23.4.0.jar
Required by:
overpasser3:sample:unspecified
> Could not find com.google.android.gms:play-services-location:9.2.1.
Searched in the following locations:
https://jcenter.bintray.com/com/google/android/gms/play-services-location/9.2.1/play-services-location-9.2.1.pom
https://jcenter.bintray.com/com/google/android/gms/play-services-location/9.2.1/play-services-location-9.2.1.jar
Required by:
overpasser3:sample:unspecified
> Could not find com.google.android.gms:play-services-maps:9.2.1.
Searched in the following locations:
https://jcenter.bintray.com/com/google/android/gms/play-services-maps/9.2.1/play-services-maps-9.2.1.pom
https://jcenter.bintray.com/com/google/android/gms/play-services-maps/9.2.1/play-services-maps-9.2.1.jar
Required by:
overpasser3:sample:unspecified
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
The web links android studio gives me here are redirecting me into another link which is total empty beside this:
{
"errors" : [ {
"status" : 404,
"message" : "Could not find resource"
} ]
}
The build.gradle:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:2.1.2"
classpath "com.neenbedankt.gradle.plugins:android-apt:1.8"
classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1'
}
}
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
apply plugin: 'com.jakewharton.hugo'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "hu.supercluster.overpasser"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
signingConfigs {
debug {
storeFile file("overpasser-sample.jks")
storePassword "sample"
keyAlias "sample"
keyPassword "sample"
}
}
buildTypes {
debug {
}
}
}
dependencies {
apt "org.androidannotations:androidannotations:3.3.2"
compile "org.androidannotations:androidannotations-api:3.3.2"
// ---------
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.google.android.gms:play-services-location:9.2.1'
compile 'com.google.android.gms:play-services-maps:9.2.1'
// ---------
compile project(':library')
compile project(':library-retrofit-adapter')
}
apt {
arguments {
androidManifestFile variant.outputs[0].processResources.manifestFile
resourcePackageName 'hu.supercluster.overpasser'
}
}
Try this
repositories {
mavenCentral()
jcenter()
google()
}
Recently after upgrading android studio 4.1 my app started to stuck in "running gradle task assembledebug" so i checked the web for possible solution
Tried flutter clean and gradle commands changed gradle files but nothing worked finally deleted gradle and reinstalled android studio again but now i can't get android sdk 28 to be installed (it doesnt appear in sdk list) so i changed sdk to 29 but whenever i try to run my app it gives the fallowing errors
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:3.5.3.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:3.5.3.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.3/gradle-3.5.3.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.3/gradle-3.5.3.pom'.
> Connect to localhost:3128 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
> Could not resolve com.android.tools.build:gradle:3.5.3.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.5.3/gradle-3.5.3.pom'.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.5.3/gradle-3.5.3.pom'.
> Connect to localhost:3128 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
> Could not resolve com.google.gms:google-services:4.3.4.
Required by:
project :
> Could not resolve com.google.gms:google-services:4.3.4.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/google/gms/google-services/4.3.4/google-services-4.3.4.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/google/gms/google-services/4.3.4/google-services-4.3.4.pom'.
> Connect to localhost:3128 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
> Could not resolve com.google.gms:google-services:4.3.4.
> Could not get resource 'https://jcenter.bintray.com/com/google/gms/google-services/4.3.4/google-services-4.3.4.pom'.
> Could not GET 'https://jcenter.bintray.com/com/google/gms/google-services/4.3.4/google-services-4.3.4.pom'.
> Connect to localhost:3128 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BU�LD FAILED in 1m 24s
Exception: Gradle task assembleDebug failed with exit code 1
My current project level build gradle file is like this.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.google.gms:google-services:4.3.4'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
App lvl build gradle file is like this:
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 29
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.farukdurusoy.sayi_avi"
minSdkVersion 16
targetSdkVersion 29
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}
apply plugin: 'com.google.gms.google-services'
Also disabled my firewalls. Any suggestions?
I have some problems while running flutter in android studio
This is my error
Launching lib\main.dart on Moto C Plus in debug mode...
Initializing gradle...
Resolving dependencies...
Finished with error: Please review your Gradle project setup in the android/ folder.
* Error running Gradle:
Exit code 1 from: D:\FlutterPrograms\app\android\gradlew.bat app:properties:
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to E:\Sdk\ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.
FAILURE: Build failed with an exception.
Where:
Build file 'D:\FlutterPrograms\app\android\app\build.gradle' line: 25
What went wrong:
A problem occurred evaluating project ':app'.
Could not resolve all artifacts for configuration 'classpath'.
Could not find lint-gradle-api.jar (com.android.tools.lint:lint-gradle-api:26.1.2).
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.jar
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 1s
This is my buid.gradle file
buildscript {
repositories {
maven {
url 'https://dl.google.com/dl/android/maven2'
}
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
This is my gradle error
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 27
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.shanmukh.app"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
There were lots of similar issues raised the past days, that could be solved by adding the google() repository in first position in the repositories block of the build scripts.
See detailed explanation in the following answers:
couldn't locate lint-gradle-api-26.1.2.jar for flutter project
Could not find play-services-basement.aar
https://stackoverflow.com/a/52982816/6899896
Could not find com.android.tools.build:aapt2:3.2.0
The root cause , related to missing libraries in Jcenter, is explained in detail here : https://stackoverflow.com/a/50885939/6899896
Open the root flutter folder in your computer, and open the gradle folder in that root folder (For example C:\flutter\package\flutter_tool\gradle) and add 'google()' to the buildscript. It fixed the issue for me.
Flutter root folder:
Add 'google()' to the buildscript:
I found a solution!
Go to your flutter folder. After you need to find flutter.gradle. On my PC:
C:\src\flutter\packages\flutter_tools\gradle
Open flutter.gradle with note or notepad and change
buildscript from this:
repositories {
jcenter()
maven {
url 'https://dl.google.com/dl/android/maven2'
}
}
to this:
repositories {
maven {
url 'https://dl.google.com/dl/android/maven2'
}
jcenter()
}
Hi I'm trying to modify the source code for card.io for Android but I'm having issues simply getting the sample app to run.
I followed all of the instructions listed on github perfectly and everything seems to go on without a hitch but I keep getting this error:
Error:Execution failed for task ':card.io:buildNative'.
> Process 'command '/Applications/Android Studio.app/android-ndk-r10e/ndk-build'' finished with non-zero exit value 2
There have been a few posts about this error but the solutions all seem to be caused by modifications users have made to the gradle whereas I haven't modified any of the source.
Here is my local.properties folder:
sdk.dir=/Applications/Android Studio.app/sdk
ndk.dir=/Applications/Android Studio.app/android-ndk-r10e
here is the gradle file (untouched from the source)
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.1'
}
}
apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'signing'
repositories {
mavenCentral()
}
def getBuildVersion = { ->
"git describe --match=*[0-9]*.[0-9]*.*[0-9] --tags --dirty --always".execute().text.trim()
}
ext {
sdkDir = android.plugin.sdkFolder
ndkDir = android.plugin.ndkFolder
adb = new File("${sdkDir}/platform-tools/adb")
build_time = new Date().format("MM/dd/yyyy HH:mm:ss Z")
build_year = new Date().format("yyyy")
product_name = "card.io-Android-SDK"
product_version = getBuildVersion()
}
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
minSdkVersion 8
targetSdkVersion 21
buildConfigField "String", "PRODUCT_NAME", "\"${product_name}\""
buildConfigField "String", "PRODUCT_VERSION", "\"${product_version}\""
buildConfigField "String", "BUILD_TIME", "\"${build_time}\""
testApplicationId 'io.card.development'
}
sourceSets.main {
jni.srcDirs = []
jniLibs.srcDir 'src/main/libs'
}
buildTypes {
debug {
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-build.cfg'
}
}
task cleanNative(type: Exec, description: 'Clean JNI object files') {
commandLine "$ndkDir/ndk-build",
'-C', file('src/main/jni').absolutePath,
'clean'
}
clean.dependsOn cleanNative
task buildNative(type: Exec, description: 'Compile JNI source via NDK') {
commandLine "$ndkDir/ndk-build",
'-C', file('src/main/jni').absolutePath,
'-j', Runtime.runtime.availableProcessors(),
'all'
}
tasks.withType(JavaCompile) {
compileTask -> compileTask.dependsOn buildNative
}
tasks.whenTaskAdded { theTask ->
if (theTask.name == "packageReleaseJniLibs"
|| theTask.name == "packageDebugJniLibs") {
theTask.dependsOn(buildNative)
}
}
}
dependencies {
androidTestCompile "com.jayway.android.robotium:robotium-solo:5.2.1"
}
// TODO remove the variant specific stuff from below - card.io doesn't have flavors
// ---------------- Javadocs ---------------
// More info here: http://www.gradle.org/docs/current/dsl/org.gradle.api.tasks.javadoc.Javadoc.html
android.libraryVariants.all { variant ->
def buildType = variant.buildType.name
def variantName = variant.baseName
if (buildType.equalsIgnoreCase("debug")) {
return;
}
task "${variantName}Doc"(dependsOn: "compile${variantName.capitalize()}Java", type: Javadoc) {
description = "Generates javadoc for build $name"
destinationDir = new File(destinationDir, variantName)
source = variant.javaCompile.source
def variantCompiledClassesDir = file("${buildDir}/intermediates/classes/${variant.dirName}/")
classpath = files(
variant.javaCompile.classpath,
variantCompiledClassesDir,
project.plugins.findPlugin("com.android.library").bootClasspath
)
include 'io/card/payment/*.java'
// More info on options here: http://www.gradle.org/docs/current/javadoc/org/gradle/external/javadoc/StandardJavadocDocletOptions.html
// all of these options were copied from the ant build. I don't know what half these options actually do.
options.docTitle("<h1>card.io Android SDK</h1>")
options.bottom("<i>Copyright © 2012-${build_year} PayPal, Inc. All Rights Reserved.</i>")
options.windowTitle("card.io Android SDK")
options.author(true)
options.version(true)
options.use(true)
options.setMemberLevel(JavadocMemberLevel.PUBLIC)
// enables links to Java 7 docs
options.links("http://docs.oracle.com/javase/7/docs/api/")
// enables links to Android docs.
options.linksOffline("http://d.android.com/reference", "${sdkDir}/docs/reference")
}
task javadocJar(type: Jar, dependsOn: "${variantName}Doc") {
classifier = 'javadoc'
from releaseDoc.destinationDir
}
// ------- MavenCentral publishing
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
sign configurations.archives
}
// these should be specified in the gradle.properties file as:
// systemProp.sonatypeUsername=xxxxxxx
// systemProp.sonatypePassword=yyyyyyy
def sonatypeUsername = System.properties.containsKey('sonatypeUsername') ? System.properties['sonatypeUsername'] : ''
def sonatypePassword = System.properties.containsKey('sonatypePassword') ? System.properties['sonatypePassword'] : ''
uploadArchives {
doFirst {
println "***"
println "uploading archives using username: '" + sonatypeUsername + "'"
println "***"
}
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2/') {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
pom.setArtifactId 'android-sdk'
pom.project {
name 'android-sdk'
groupId = 'io.card'
version = "${product_version}"
packaging 'aar'
description 'This is card.io\'s SDK for Android.'
url 'https://github.com/card-io/card.io-Android-source/'
scm {
url 'scm:git#github.com:card-io/card.io-Android-source.git'
connection 'scm:git#github.com:card-io/card.io-Android-source.git'
developerConnection 'scm:git#github.com:card-io/card.io-Android-source.git'
}
developers {
developer {
id 'brateman'
name 'Jeff Brateman'
}
}
licenses {
license {
name 'MIT'
url 'http://opensource.org/licenses/MIT'
distribution 'repo'
}
}
}
}
}
}
}
I tried other versions of the ndk with no luck. Really confused here! Any help is really appreciated
EDIT: here is the stack trace and some extra info
--info:
> Total time: 14.844 secs Arjunas-MacBook-Air-3:card.io-Android-source
> Arjuna$ ./gradlew clean assembleDebug --info Starting Build Settings
> evaluated using settings file
> '/Users/Arjuna/Documents/workspace/card.io-Android-source/settings.gradle'.
> Projects loaded. Root project using build file
> '/Users/Arjuna/Documents/workspace/card.io-Android-source/build.gradle'.
> Included projects: [root project 'card.io-Android-source', project
> ':SampleApp', project ':card.io'] Evaluating root project
> 'card.io-Android-source' using build file
> '/Users/Arjuna/Documents/workspace/card.io-Android-source/build.gradle'.
> Evaluating project ':SampleApp' using build file
> '/Users/Arjuna/Documents/workspace/card.io-Android-source/SampleApp/build.gradle'.
> Evaluating project ':card.io' using build file
> '/Users/Arjuna/Documents/workspace/card.io-Android-source/card.io/build.gradle'.
> All projects evaluated. Selected primary task 'clean' from project :
> Selected primary task 'assembleDebug' from project : file or directory
> '/Users/Arjuna/Documents/workspace/card.io-Android-source/SampleApp/build/intermediates/pre-dexed/debug',
> not found Tasks to be executed: [task ':SampleApp:clean', task
> ':card.io:cleanNative', task ':card.io:clean', task
> ':SampleApp:preBuild', task ':SampleApp:compileDebugNdk', task
> ':SampleApp:preDebugBuild', task ':SampleApp:checkDebugManifest', task
> ':SampleApp:preReleaseBuild', task ':card.io:compileLint', task
> ':card.io:copyReleaseLint', task ':card.io:mergeReleaseProguardFiles',
> task ':card.io:buildNative', task ':card.io:preBuild', task
> ':card.io:compileReleaseNdk', task ':card.io:packageReleaseJniLibs',
> task ':card.io:packageReleaseRenderscript', task
> ':card.io:preReleaseBuild', task ':card.io:checkReleaseManifest', task
> ':card.io:prepareReleaseDependencies', task
> ':card.io:compileReleaseRenderscript', task
> ':card.io:generateReleaseResValues', task
> ':card.io:generateReleaseResources', task
> ':card.io:packageReleaseResources', task
> ':card.io:compileReleaseAidl', task
> ':card.io:generateReleaseBuildConfig', task
> ':card.io:generateReleaseAssets', task ':card.io:mergeReleaseAssets',
> task ':card.io:processReleaseManifest', task
> ':card.io:processReleaseResources', task
> ':card.io:generateReleaseSources', task ':card.io:compileReleaseJava',
> task ':card.io:proguardRelease', task ':card.io:bundleRelease', task
> ':SampleApp:prepareCardIoAndroidSourceCardIoUnspecifiedLibrary', task
> ':SampleApp:prepareDebugDependencies', task
> ':SampleApp:compileDebugAidl', task
> ':SampleApp:compileDebugRenderscript', task
> ':SampleApp:generateDebugBuildConfig', task
> ':SampleApp:generateDebugAssets', task ':SampleApp:mergeDebugAssets',
> task ':SampleApp:generateDebugResValues', task
> ':SampleApp:generateDebugResources', task
> ':SampleApp:mergeDebugResources', task
> ':SampleApp:processDebugManifest', task
> ':SampleApp:processDebugResources', task
> ':SampleApp:generateDebugSources', task ':SampleApp:compileDebugJava',
> task ':SampleApp:preDexDebug', task ':SampleApp:dexDebug', task
> ':SampleApp:processDebugJavaRes', task
> ':SampleApp:validateDebugSigning', task ':SampleApp:packageDebug',
> task ':SampleApp:zipalignDebug', task ':SampleApp:assembleDebug', task
> ':card.io:copyDebugLint', task ':card.io:mergeDebugProguardFiles',
> task ':card.io:preDebugBuild', task ':card.io:checkDebugManifest',
> task ':card.io:prepareDebugDependencies', task
> ':card.io:compileDebugAidl', task ':card.io:compileDebugRenderscript',
> task ':card.io:generateDebugBuildConfig', task
> ':card.io:generateDebugAssets', task ':card.io:mergeDebugAssets', task
> ':card.io:generateDebugResValues', task
> ':card.io:generateDebugResources', task
> ':card.io:packageDebugResources', task
> ':card.io:processDebugManifest', task
> ':card.io:processDebugResources', task
> ':card.io:generateDebugSources', task ':card.io:compileDebugJava',
> task ':card.io:processDebugJavaRes', task ':card.io:packageDebugJar',
> task ':card.io:compileDebugNdk', task ':card.io:packageDebugJniLibs',
> task ':card.io:packageDebugLocalJar', task
> ':card.io:packageDebugRenderscript', task ':card.io:bundleDebug', task
> ':card.io:assembleDebug'] :SampleApp:clean (Thread[main,5,main])
> started. :SampleApp:clean Executing task ':SampleApp:clean'
> (up-to-date check took 0.001 secs) due to: Task has not declared any
> outputs. :SampleApp:clean (Thread[main,5,main]) completed. Took 0.034
> secs. :card.io:cleanNative (Thread[main,5,main]) started.
> :card.io:cleanNative Executing task ':card.io:cleanNative' (up-to-date
> check took 0.0 secs) due to: Task has not declared any outputs.
> Starting process 'command '/Applications/Android
> Studio.app/android-ndk-r10e/ndk-build''. Working directory:
> /Users/Arjuna/Documents/workspace/card.io-Android-source/card.io
> Command: /Applications/Android Studio.app/android-ndk-r10e/ndk-build
> -C /Users/Arjuna/Documents/workspace/card.io-Android-source/card.io/src/main/jni
> clean Successfully started process 'command '/Applications/Android
> Studio.app/android-ndk-r10e/ndk-build'' usage: dirname path make:
> /Users/Arjuna/build/core/build-local.mk: No such file or directory
> make: *** No rule to make target
> `/Users/Arjuna/build/core/build-local.mk'. Stop. :card.io:cleanNative
> FAILED :card.io:cleanNative (Thread[main,5,main]) completed. Took
> 0.107 secs.
>
> FAILURE: Build failed with an exception.
>
> * What went wrong: Execution failed for task ':card.io:cleanNative'.
> > Process 'command '/Applications/Android Studio.app/android-ndk-r10e/ndk-build'' finished with non-zero exit
> value 2
--stacktrace
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':card.io:cleanNative'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:305)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:88)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:68)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:55)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:80)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
at org.gradle.launcher.Main.doAction(Main.java:33)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:56)
Caused by: org.gradle.process.internal.ExecException: Process 'command '/Applications/Android Studio.app/android-ndk-r10e/ndk-build'' finished with non-zero exit value 2
at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:365)
at org.gradle.process.internal.DefaultExecAction.execute(DefaultExecAction.java:31)
at org.gradle.api.tasks.AbstractExecTask.exec(AbstractExecTask.java:54)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:218)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:579)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:562)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
... 47 more
I am using Android Studio to develop an Android application and I am using Gradle to handle the build. When I try to compileDebug the project, I errors that some libraries aren't found. These libraries are included in the build.gradle file and should be linked by gradle. Since the libraries aren't found at compilation, I think these files aren't linked correctly by gradle.
Can anyone have a look at the configuration file and look for anything wrong with it? Thanks:
buildscript {
repositories {
maven { url 'http://repo1.maven.org/maven2' }
mavenCentral()
}
dependencies {
//classpath 'com.android.tools.build:gradle:0.6.+'
classpath 'com.android.tools.build:gradle:1.1.0'
}
}
apply plugin: 'android'
repositories {
maven {
url 'https://github.com/Goddchen/mvn-repo/raw/master/'
}
mavenCentral()
}
dependencies {
compile 'com.android.support:support-v4:13.0.0'
compile 'com.google.android.gms:play-services:3.1.36'
compile 'com.google.code.gson:gson:2.2.4'
//compile 'com.codeslap:persistence:0.9.24'
compile 'org.apache.commons:commons-io:1.3.2'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.8.4'
//compile 'com.facebook.android:facebook:3.5.2'
compile 'com.facebook.android:facebook:3.17.1'
compile files('libs/rollbar-android-0.0.6.jar')
compile files('libs/libGoogleAnalyticsV2.jar')
//compile files('libs/commons-codec-1.7-SNAPSHOT-android.jar')
compile files('libs/tinylinetry_and.jar')
}
android {
compileSdkVersion 18
buildToolsVersion '19.1.0'
defaultConfig {
minSdkVersion 14
targetSdkVersion 18
}
signingConfigs {
release {
storeFile file("../keystore.jks")
storePassword "******"
keyAlias "Android Release Key"
keyPassword "******"
}
}
buildTypes {
debug {
applicationIdSuffix ".debug"
}
release {
signingConfig signingConfigs.release
}
}
}
The error I get is from this kind:
:app:compileDebugJava
.../Application.java:55: error: package com.rollbar.android does not exist
import com.rollbar.android.Rollbar;
....
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
So all external libraries that are loaded and should be included by gradle aren't found.