I am working with Android Annotations and today I did the new update for Android Studio 1.0.
When I build the project it gave me this error:
Error:(40, 0) Could not find property 'processResources' on com.android.build.gradle.internal.api.ApplicationVariantImpl_Decorated#54335f5.
Here is my build.gradle file for my project:
// 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.0.0'
// the latest version of the android-apt plugin https://bitbucket.org/hvisser/android-apt
// http://stackoverflow.com/a/25939518
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
and this is the build.gradle file for my application:
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
// duhet per te shtuar librarine e android annotations ne ccompile time http://joostfunkekupper.com/useful-android-libraries/
// https://github.com/excilys/androidannotations/wiki/IntelliJIDEA
android {
compileSdkVersion 21
buildToolsVersion '21.1.1'
defaultConfig {
applicationId "<my package>"
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
// https://github.com/excilys/androidannotations/wiki/FAQ
// https://github.com/DayS/androidannotations/wiki/Building-Project-Gradle
//https://bitbucket.org/hvisser/android-apt
apt {// http://stackoverflow.com/a/26284580
arguments {
androidManifestFile variant.processResources.manifestFile
// This should of course be your own package name
resourcePackageName '<my package>'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0#aar'
compile project(':FreeFlow')
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'
compile 'com.squareup.retrofit:retrofit:1.7.0'
compile project(':library')
compile project(':facebook')
compile project(':viewPagerIndicatorLibrary')
compile 'com.google.code.gson:gson:2.3'
compile 'com.android.support:support-v4:21.0.0'
compile 'com.neenbedankt.gradle.plugins:android-apt:1.4'
apt 'org.androidannotations:androidannotations:3.2'
compile 'org.androidannotations:androidannotations-api:3.2'
compile 'com.squareup:otto:1.3.5'
compile 'com.paymill.android:android-sdk:1.2.0'
}
Line 40 where the error happens is in second build.gradle:
androidManifestFile variant.processResources.manifestFile
Has anyone encountered this problem because I couldn't find any solution for this problem
Thanks
There are some changes to apply with the new version of Android Studio.
See this wiki page to get an example of the build.gradle.
Pay attention to this line :
androidManifestFile variant.outputs[0].processResources.manifestFile
Related
I am trying to add facebook login. I am following the facebook quick starts. But I am getting the following error.
`
Error:(24, 0) Gradle DSL method not found: 'compile()'
Possible causes:<ul><li>The project 'FacebookAdd' may be using a version of Gradle that does not contain the method.
Open Gradle wrapper file</li><li>The build file may be missing a Gradle plugin.
Apply Gradle plugin</li>`
and the gradle.build files.
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
}
}
dependencies {
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
}
task clean(type: Delete) {
delete rootProject.buildDir
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.0"
defaultConfig {
applicationId "com.psycho.ayush.facebookadd"
minSdkVersion 17
targetSdkVersion 24
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:24.1.1'
}
P.S. I have gone through almost every question related to this on this site.
It looks like you have two dependencies sections please try this:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.1.1'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
}
and remove this
dependencies {
compile 'com.facebook.android:facebook-android-sdk:[4,5)'}
I upgraded to Android Studio 2.0 and for some reason cannot resolve this issue
Error:Could not find com.android.support:appcompat-v7:23.3.0.
Required by:
Code:app:unspecified
Please install the Android Support Repository from the Android SDK Manager.
Open Android SDK Manager
I have the latest version of the support library as well as previous versions, I have deleted the build folder and rebuilt without success. Here is my complete build.gradle
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
android {
compileSdkVersion 23
buildToolsVersion '23.0.3'
defaultConfig {
applicationId "com.domain.appname"
minSdkVersion 16
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'])
apt 'com.google.dagger:dagger-compiler:2.2'
provided 'javax.annotation:jsr250-api:1.0'
testCompile 'junit:junit:4.12'
compile 'com.google.dagger:dagger:2.2'
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.squareup:otto:1.3.8'
compile 'com.android.support:support-annotations:23.3.0'
compile 'com.android.support:appcompat-v7:23.3.0'
}
And here is the SDK Tools installed
Gradle Version: 2.11
ANdrud Plugin Version: 2.0.0
How can I resolve com.android.support:appcompat-v7:23.3.0. ?
Edit
Project build.gradel
// 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.0.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
// 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
}
I'm trying to add the Parse UI widget by following the guide on https://github.com/ParsePlatform/ParseUI-Android. However, when I do that, I get an error that my project may be using a version of Gradle that does not contain the method and that the build file might be missing the Gradle plugin.
This is my Gradle module:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example.joakim.boken"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile 'com.parse.bolts:bolts-android:1.+'
compile fileTree(dir: 'libs', include: 'Parse-*jar')
}
// Module dependency on ParseUI libraries sources
compile project(':ParseUI-Widget')
// Uncomment if using Facebook Login (optional Maven dependency)
// compile 'com.facebook.android:facebook-android-sdk:4.0.1'
// compile files('YOUR_PROJECT_LIBS_PATH/ParseFacebookUtilsV4-1.10.0.jar')
and this is my 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:1.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
Anybody know what I need to add or erase to get it working? I tried answers to similar questions, but so far nothing worked..
I'm not sure if it mattered that I downloaded the ZIP instead of cloning the repository?
You have to move this line inside the dependencies block:
compile project(':ParseUI-Widget')
It should be:
dependencies {
compile 'com.parse.bolts:bolts-android:1.+'
compile fileTree(dir: 'libs', include: 'Parse-*jar')
// Module dependency on ParseUI libraries sources
compile project(':ParseUI-Widget')
}
This is de build.gradle of app module:
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.my.app"
minSdkVersion 10
targetSdkVersion 22
versionCode 19
versionName "1.6.2"
}
buildTypes {
release {
minifyEnabled false
debuggable false;
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/'] } }
}
repositories {
maven { url 'http://dl.bintray.com/madcyph3r/maven/' }
maven { url 'http://dl.bintray.com/amulyakhare/maven' }
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile "com.google.android.gms:play-services:7.5.0"
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.android.support:recyclerview-v7:21.0.0'
compile 'net.glxn.qrgen:android:2.0'
compile 'com.nineoldandroids:library:2.4.0'
compile 'de.madcyph3r:materialDrawer:1.1.1#aar'
compile 'com.google.maps.android:android-maps-utils:0.3.4'
compile 'com.android.support:support-v4:22.2.0'
compile 'com.google.zxing:core:3.2.0'
compile 'me.dm7.barcodescanner:zxing:1.7'
compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
compile 'org.apache.commons:commons-io:1.3.2'
compile files('libs/GraphView-4.0.1.jar')
compile files('libs/mpandroidchartlibrary-2-1-0.jar')
compile files('libs/bitcoinj-core-0.12.3-bundled.jar')
}
And this is build.gradle of project
// 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.1.0'
classpath 'com.google.gms:google-services:1.3.0-beta1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
I'm trying use Google cloud Messaging , I have followed all steps in https://developers.google.com/cloud-messaging/android/client but when I synchronize gradle files with the project I get this:
Failed to complete gradle execution. Cause: [empty]
I tried implement this solution: Android Studio: failed to complete gradle execution, cause is empty and other similar solutions but result is same.
What could be the solution to this problem? Someone has happened this?
Thaanks in advance!!
I found the solution:
The problem lies not in GCM. The problem arises when I try to compile the app. I used the command;
gradlew assembleDebug --stacktrace
and I threw this error:
Unable to execute dex : method ID not in [0 , 0xFFFF ] : 65536.
I've solved with the steps described Google here:
Building Apps with Over 65K Methods
Hi guys I'm having a problem Gradle DSL method not found: 'compile()'. Most of the discussions I read suggest that I add compile 'com.android.support:support-v4:21.+' to individual's module build file and in my case the compile 'com.android.support:support-v4:21.+' is already there. If I remove the one I added on the top most level build file I get this error (Error:Artifact 'support-v4.jar (com.android.support:support-v4:21.0.3)' not found. Android studio 1.0.2).
Please help, here are my gradle files:
// 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.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
dependencies {
compile 'com.android.support:support-v4:21.+'
}
Gradle file under App folder:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.example.ntokozo.myapplication"
minSdkVersion 15
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.android.support:support-v4:21.0.3'
}
Thank you.
Remove the dependencies block from the top level build.gradle file.
dependencies {
compile 'com.android.support:support-v4:21.+'
}
Also update your sdk files.