build.gradle

Could not find aapt2-proto.jar (com.android.tools.build:aapt2-proto:0.3.1)

时光怂恿深爱的人放手 提交于 2019-11-28 10:26:13
问题 I'm using Android Studio to work with tomahawk-android project, so i cloned the project using git , directly into the Android Studio , where it fails to build, saying; Could not find aapt2-proto.jar (com.android.tools.build:aapt2-proto:0.3.1). Searched in the following locations: https://jcenter.bintray.com/com/android/tools/build/aapt2-proto/0.3.1/aapt2-proto-0.3.1.jar build.gradle: apply plugin: "com.android.application" android { implementationSdkVersion 23 buildToolsVersion '23.0.3'

Cannot resolve symbol 'GooglePlayServicesClient'

本秂侑毒 提交于 2019-11-28 10:22:04
I am trying to migrate a project from Eclipse to Android Studio, the project can be build in Eclipse and was successful imported to Android Studio, however, I get Cannot resolve symbol 'GooglePlayServicesClient' error in Android Studio. I followed the official tutorial to imported Google Play service in Android Studio, and an other package " com.google.android.gms.common.ConnectionResult " that used in my project does not have same issue. Only ' GooglePlayServicesClient ' cannot be resolved. I have also tried clean and rebuild my project, but the problem persists. What am I doing wrong? Update

Android Studio: Resolving Duplicate Classes

…衆ロ難τιáo~ 提交于 2019-11-28 10:14:35
When I try to run my android application on an Android device, the gradle console reports the following error: Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/loopj/android/http/AsyncHttpClient$1.class When I search for the "AsyncHttpClient" class, I see that it's indeed being found in two separate locations: /Users/Afflatus/.gradle/caches/modules-2/files-2.1/com.loopj.android/android-async-http/1.4.9/5d171c3cd5343e5997f974561abed21442273fd1/android-async-http-1

IntelliJ/Gradle Could not determine java version from '11.0.1'

放肆的年华 提交于 2019-11-28 09:58:54
I'm running a Linux Ubuntu 18 OS. Installed jdk in a custom local directory. Normally, IntelliJ recommends that you use the default gradle wrapper . But in my case, I want to be able to change the Gradle Version on the fly whenever it's due for an update. If you use IntelliJ with Gradle, and you bump into the following error: Could not determine java version from '11.0.1' If you use IntelliJ Checks: Navigate to: File >> Settings >> Build, Execution, Deployment >> Build Tools >> Gradle . Alongside Gradle JVM: make sure you select the correct version of Java. Navigate to: Right-Click 'Project

Android Studio, how to add my own git repository as a library project(sub module)?

做~自己de王妃 提交于 2019-11-28 09:42:19
问题 I am new to Android Studio, Right now I have create a project and added a module in it as a library project but when i push the project to Git the library project gets also added to the repository instead in other new Git repository. I just want to know that how can i create a sub module in Android Studio like we do in Eclipse via egit plugin, and how to push it to a completely new Git repository, practically this sub module would actually be my library project. 回答1: i also had the same

Could not find com.android.tools.build.gradle:3.0.0-alpha7

我是研究僧i 提交于 2019-11-28 09:38:10
I update the gradle plugin to the latest, and i'm getting this error: Error:Could not find com.android.tools.build.gradle:3.0.0-alpha7:. Searched in the following locations: file:/C:/Users/dmin/Documents/android-studio/gradle/m2repository/com/android/tools/build/gradle/3.0.0-alpha7//3.0.0-alpha7-.pom file:/C:/Users/dmin/Documents/android-studio/gradle/m2repository/com/android/tools/build/gradle/3.0.0-alpha7//3.0.0-alpha7-.jar https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0-alpha7//3.0.0-alpha7-.pom https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0-alpha7//3.0.0

Pulltorefresh add to gradle

余生颓废 提交于 2019-11-28 09:30:27
can anyone help me add this library in build.gradle Android Studio. https://github.com/chrisbanes/Android-PullToRefresh I know it is deprecated but I want to use it, I would appreciate if someone could help me what to write in dependencies { compile 'com.android.support:support-v4:18.0.0' compile 'com.android.support:appcompat-v7:+' compile '????' } as mentioned I want to use the deprecated library not new Actionbar-Pulltorefresh. tried to google it but couldn't find any help. I suggest you to use ActionBarPullToRefresh (same author). However, if you would like to use PullToRefresh, you have

Android Studio - Gradle sync error

为君一笑 提交于 2019-11-28 09:06:33
I have a synchronization error in Android Studio. I Use: 1.0.2 version from canary channel. Gradle : I tried with version 2.2.1(downloaded from https://www.gradle.org/downloads ) and self-download version. JDK : jdk1.8.0_05 I created a new project and the error is always the same: Error:Unable to find method 'org.objectweb.asm.ClassReader.getMaxStringLength()I'. Possible causes for this unexpected error include: Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.) I tried resolve the issue with the invalidation of cache method , and stopping

create version.txt file in project dir via build.gradle task

≯℡__Kan透↙ 提交于 2019-11-28 08:56:47
Apologies in advance for my ignorance. I'm very new to gradle. My is goal is to have some task in my build.gradle file, wherein a file 'version.txt' is created in my project directory whenever I run the gradle terminal command in my project root. This 'version.txt' file needs to contain version metadata of the build, such as: Version: 1.0 Revision: 1z7g30jFHYjl42L9fh0pqzmsQkF Buildtime: 2016-06-14 07:16:37 EST Application-name: foobarbaz app (^Revision would be the git commit hash of the HEAD) I've tried to reuse snippets from the following resources, but to no avail, possibly because these

Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve

大兔子大兔子 提交于 2019-11-28 08:54:34
Newly installed Android studio 3.1.3 is giving strange dependencies error when making a new project and compiling for very first time. A similar question that didn't help resolve the problem. Event Logs: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.support:appcompat-v7:28.0.0-alpha3. Open File Show Details Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.support.constraint:constraint-layout:1.1.2. Open File Show Details Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could