I cloned the repo from Git Hub, and did all the stepts mentioned without any errors.
Next i started a new project and added libraries under my app as mentioned in https://coderwall.com/p/eurvaq/tesseract-with-andoird-and-gradle.
When i add build.gradle to tess-two directory i get an error after the sync is completed
Error:Configuration with name 'default' not found.
I tried a lot to resolve but wasn't able to fix it.
Need your help guys to figure out the error.
build.gradle file under tess-two
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
}
}
apply plugin: 'com.android.library'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
minSdkVersion 14
targetSdkVersion 23
}
sourceSets.main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
res.srcDirs = ['res']
jniLibs.srcDirs = ['libs']
}
}
Event Log
8:59:46 AM Gradle sync started
9:00:12 AM Gradle sync failed: Configuration with name 'default' not found.
Consult IDE log for more details (Help | Show Log)
9:00:33 AM Gradle sync started
9:00:35 AM Gradle sync failed: Configuration with name 'default' not found.
Consult IDE log for more details (Help | Show Log)
9:00:56 AM Gradle sync started
9:00:58 AM Gradle sync failed: Configuration with name 'default' not found.
Consult IDE log for more details (Help | Show Log)
Log file
http://pastebin.com/WVxxmm1c
settings.gradle of app
include ':app'
include 'app:libraries'
include 'app:libraries:tess-two'
Your issue is here:
include ':app'
include 'app:libraries' //REMOVE THIS LINE!
include 'app:libraries:tess-two'
Since you are defining include 'app:libraries', Gradle is expecting a build.gradle file inside the app/libraries folder.
Configuration with name 'default happens because gradle doesn't find this file, or if inside the build.gradle file Gradle doesn't find the default configuration.
I finally got it fixed.
I removed include 'app:libraries' from settings.gradle of app.
And added the tess-two under libraries folder as a module to app.
I was adding a wrong module, all this time.
But i still cant figure out what the "Configuration with name 'default' means.
Related
I'm trying to run Android Studio on windows 10. Currently I have the most up to date version of Android Studio. Every time I try to open a new project or open an existing project, the gradle fails to build always displaying connection reset error message. This is the error message it displays.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:4.1.2.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:4.1.2.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.1.2/gradle-4.1.2.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.1.2/gradle-4.1.2.pom'.
> Connection reset
> Could not resolve com.android.tools.build:gradle:4.1.2.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/4.1.2/gradle-4.1.2.pom'.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/4.1.2/gradle-4.1.2.pom'.
> Connection reset
I currently have the file gradle.build set up like this because this is how comes automatically for me
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.2"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
And I have the gradle-wrapper.properties file set up like this
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
I have tried changing the line
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
to
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
but that didn't change anything. I tried seeing if it was an Internet connection problem and nothing changed. I'm not sure what else there is to try.
Today I started to learn flutter.
I created new flutter project from Flutter Application in android studio 3.5.3.
I created new android virtual device and then tried to run main.dart.
I remember that my project freezed during initializing gradle in the first run so I had to stop and rerun main.dart and after that it raises following error:
Launching lib\main.dart on AOSP on IA Emulator in debug mode...
Running Gradle task 'assembleDebug'...
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 find sdk-common.jar (com.android.tools:sdk-common:26.5.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/26.5.0/sdk-common- 26.5.0.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 2s
Finished with error: Gradle task assembleDebug failed with exit code 1
build.gradle file contains:
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
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
}
and settings.gradle contains:
include ':app'
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
}
plugins.each { name, path ->
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
include ":$name"
project(":$name").projectDir = pluginDirectory
}
I guess that freezing was because of poor connection at the moment of initializing and sdk-common.jar didn`t download correctly.
As I mentioned above, I'm new to flutter and I don't know how to clean build the project so I repeated step by step several times but error persists.
I have no idea about this problem.
Can anyone kindly help me?
Please tell me if details are not clear enough to understand.
What went wrong:
A problem occurred configuring root project 'android'.
Could not resolve all artifacts for configuration ':classpath'.
Could not find sdk-common.jar (com.android.tools:sdk-common:26.5.0).
add maven to your gradle file to solve this as follows
maven { url 'https://maven.google.com' }
although i would suggest you use API 28
I don't know how to clean build the project
run flutter clean in your project root folder
Using android studio 2.3.3 I've stuck on Gradle Build Running.
I don't have any idea and loss my mind to figure it out what happened with my project. Recently we want to compile Zoom Login Application Sample and following carefully from this link.
Here are Android Studio Version :
Android Studio 2.3.3
Build #AI-162.4069837, built on June 6, 2017
JRE: 1.8.0_31-b13 x86
JVM: Java HotSpot(TM) Server VM by Oracle Corporation
On event log, Grade seems working hard to finish this task
Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies]
I've tried to
Set Global Gradle Setting to Offline Work by followed this solution
Isn't using google play service like this solution suggest.
Not using proxy
Add org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 and org.gradle.parallel=true on gradle.properties project
On C:\Users\<username>\.gradle\gradle.properties add this line org.gradle.daemon=true and org.gradle.parallel=true
Every solution I tried but no one work well. This is silly and ridiculous, the build phase cannot be completed even I leave that for one night.
Here is project build.gradle :
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.facialnetwork.com/maven2'
credentials {
username '***'
password '***'
}
authentication {
basic(BasicAuthentication)
}
}
// Reference local .aar file if it doesn't exist in maven
flatDir{ dirs '../../../' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
and here module build.gradle
buildscript {
}
apply plugin: 'com.android.application'
android {
if (project.hasProperty("zoom_keystore")) {
signingConfigs {
release {
storeFile file(zoom_keystore)
storePassword zoom_keystore_password
keyAlias zoom_key_alias
keyPassword zoom_key_password
}
}
}
compileSdkVersion 25
buildToolsVersion '25.0.3'
defaultConfig {
applicationId "com.facetec.zoom.sampleapp"
minSdkVersion 18
targetSdkVersion 25
versionCode 1
versionName "1.0"
buildConfigField("String", "ZOOM_APP_TOKEN", System.getProperty("zoom_app_token", "\"\""))
resConfigs "en"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
if (signingConfigs.hasProperty('release')) {
signingConfig signingConfigs.release
}
}
debug {
debuggable true
jniDebuggable true
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
dependencies {
compile 'com.android.support:appcompat-v7:25.+'
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.facetec:zoom-authentication:5.1.1#aar'
compile project(':zoom-authentication-5.1.1')
}
after trying to build from gradlew command line gradlew -d assembleDebug,
I got this log, maybe can help identify my problem :
09:08:19.942 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock
acquired.
09:08:19.942 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Relea
sing lock on daemon addresses registry.
> Building 62% > :app:compileDebugJavaWithJavac
Its stuck on task :app:compileDebugJavaWithJavac
I've tried to delete caches on C:\Users\<username>\.gradle\caches and still hang on :app:compileDebugJavaWithJavac process
I cannot figure it out. Any Idea? What I miss out?
Thanks.
This works for me:
CTRL + SHIFT + ESC -> Process -> Kill java.exe -> Rebuild
I also face this problem.
and i m really tired because i continuously 3 days find this solution.
then i show in gradle console. in which it show error: C:\Users\khimsuriya\AppData\Local\Android\sdk\build-tools\29.0.3-> "aapt" does not start.
so i change "build tool version" to 26.0.3 and the error was finished.
so you try change "build tool version" in your build.gradle(app level). it continue still you find perfect "strong textbuild tool version"
it is 100% work.
My number .9725414329
I have been trying to build the application which uses crashlytics from fabric.io.
But build gets failed with bellow mentioned error.
Executing tasks: [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources]
Configuration on demand is an incubating feature.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:classpath'.
> Could not resolve io.fabric.tools:gradle:1.+.
Required by:
TestProject18July2016:app:unspecified
> Could not resolve io.fabric.tools:gradle:1.+.
> Failed to list versions for io.fabric.tools:gradle.
> Unable to load Maven meta-data from https://maven.fabric.io/public/io/fabric/tools/gradle/maven-metadata.xml.
> Could not GET 'https://maven.fabric.io/public/io/fabric/tools/gradle/maven-metadata.xml'.
> peer not authenticated
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 1.367 secs
My internet is behind proxy server. I have enabled both HTTP & HTTPS settings in gradle.properties file.
## Project-wide Gradle settings.
#
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
#
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
#
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#Mon Jul 18 11:14:57 IST 2016
systemProp.http.proxyPassword=<PASSWORD>
systemProp.https.proxyUser=<USERID>
systemProp.https.proxyPort=<PORT>
systemProp.http.proxyHost=<PROXY_SERVER_ADDRESS>
systemProp.https.proxyPassword=<PASSWORD>
systemProp.https.proxyHost=<PROXY_SERVER_ADDRESS>
systemProp.http.proxyUser=<USERID>
systemProp.http.proxyPort=<PORT>
My build.gradle file is bellow:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
My app.gradle file is bellow:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 23
buildToolsVersion "24.0.0"
defaultConfig {
applicationId "testfirebase.kishor.testproject18july2016"
minSdkVersion 19
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
/* testCompile 'junit:junit:4.12'*/
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile('com.crashlytics.sdk.android:crashlytics:2.6.0#aar') {
transitive = true;
}
}
Currently I am using Android Studio Version 1.5.1(Tried 2.1 also, but no luck.)
I have searched google a lot, but not able to find exact solution.
Kindly Please help.
Thanks.
After a long efforts I have identified a workaround for it.
Actually the problemetic maven url : https://maven.fabric.io/public/io/fabric/tools/gradle/maven-metadata.xml
was redirecting to bellow url :
https://s3.amazonaws.com/fabric-artifacts/public/io/fabric/tools/gradle/maven-metadata.xml
Somehow in Android studio, this redirection was failing. So in app build.gradle file, I replaced the the maven url.
from
maven { url 'https://maven.fabric.io/public' }
to
maven { url 'http://s3.amazonaws.com/fabric-artifacts/public' }
Which solved my problem.
I've been trying to properly import this library to begin writing an image editing component for my application. I currently have the downloaded 'creativesdk-repo' folder in the root directory, and have followed instructions according to this tutorial:
https://creativesdk.adobe.com/docs/android/#/articles/gettingstarted/index.html.
And this tutorial as well:
https://creativesdk.adobe.com/docs/android/#/articles/imageediting/index.html
There are no problems building when I simply use the basic authorization library, but my application needs photo editing capability. My foremost problem (among many) lies within the build.gradle file of the application (not the encompassing project build.gradle file).
Here is the code in my build.gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.0"
defaultConfig {
applicationId "com.example"
minSdkVersion 14
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.adobe.creativesdk.foundation:auth:0.3.94'
compile 'com.adobe.creativesdk.image:4.0.0'
}
The very last line causes an error message to appear:
Error:Failed to resolve: com.adobe.creativesdk.image:4.0.0:
Open File
I believe these messages mean that the image editing portion of the Adobe Creative SDK libraries are not being recognized. I have even tested this with example projects from Adobe and it runs into the same problem. What can I do to fix this and start writing this portion of my application?
You need download creative-sdk repo from download links into your project folder. In the project gradle define creative-sdk repo url like this:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenCentral()
jcenter()
maven{
url "${project.rootDir}/creativesdk-repo" //ADD THE CORRECT LOCATION OF THE CREATIVESDK LIBRARY FILES
}
}
}
In your app build.gradle define this:
compile 'com.adobe.creativesdk.foundation:auth:0.3.94'
compile 'com.adobe.creativesdk:image:4.0.0'
You should extend your Application class and implement this, something like this:
public class ExampleApplication extends MultiDexApplication implements IAdobeAuthClientCredentials , IAviaryClientCredentials {
private static final String CREATIVE_SDK_SAMPLE_CLIENT_ID = "62bbd145c3f54ee39151823358c83e28";
private static final String CREATIVE_SDK_SAMPLE_CLIENT_SECRET = "2522a432-dfc8-40c4-94fe-646e10223562";
#Override
public void onCreate() {
super.onCreate();
AdobeCSDKFoundation.initializeCSDKFoundation(getApplicationContext());
}
#Override
public String getClientID() {
return CREATIVE_SDK_SAMPLE_CLIENT_ID;
}
#Override
public String getClientSecret() {
return CREATIVE_SDK_SAMPLE_CLIENT_SECRET;
}
#Override
public String getBillingKey() {
return "";
}
}
In your AndroidManifest.xml inside Application tag put this:
<provider
android:name="com.aviary.android.feather.sdk.internal.cds.AviaryCdsProvider"
android:authorities="com.package.AviaryCdsProvider"
android:exported="false"
android:process=":aviary_cds" />
With this configuration you can call Aviary Sdk Activity with this:
Intent newIntent = new AviaryIntent.Builder(this);
//config values
startActivity(newIntent);
I configure SDK like this, and its working. Sorry for the delay.
UPDATE 10/10/2016:
Thanks to Ash Ryan:
Trying to make an Android Studio Application with Adobe Creative SDK Image Editing, cannot get libraries compiled in gradle
Use this:
//noinspection SpellCheckingInspection
repositories {
// ...
// For Adobe Creative SDK
maven { url 'https://repo.adobe.com/nexus/content/repositories/releases/' }
}
Source: https://creativesdk.adobe.com/docs/android/#/articles/gettingstarted/index.html
Please make sure under global project repo. If not gradle not able to find the path.
allprojects {
repositories {
compile 'com.adobe.creativesdk.foundation:auth:0.3.94'
compile 'com.adobe.creativesdk:image:4.0.0'
}
I think your error is here. Change:
complie 'com.adobe.creativesdk.image:4.0.0'
for this:
compile 'com.adobe.creativesdk.image:4.0.0'
It`s a simple sintax error.
UPDATE 10/10/2016:
Thanks to Ash Ryan:
Trying to make an Android Studio Application with Adobe Creative SDK Image Editing, cannot get libraries compiled in gradle
just use latest lib dependency in Module:app build.gradle file and update your android sdk and android studio
compile 'com.adobe.creativesdk:image:4.6.3'