android-gradle

Unable to open debugger port : java.net.SocketException “Socket closed”

余生长醉 提交于 2019-11-28 13:16:29
I'm using Android Studio, with multiple flavors using Gradle, each with a Debug and Release type, organized as described here, on the bottom half .When I try to start the debugger, I get this error: Error running androidRecover [installAppDebug]: Unable to open debugger port : java.net.SocketException "Socket closed I'm also unable to attach the debugger to my device once it's running (it only displays the name of my phone, not the app). All 3 flavors install on my phone just fine. I just can't get it to let me debug them. I also tested attaching the debugger on a Nexus tablet, and I got the

Error in building project in Android Studio

筅森魡賤 提交于 2019-11-28 13:15:38
Freshly Installed Android Studio and started new android project. When tried to run it. Got this error from Gradle Error:Could not open initscript class cache for initialization script 'C:\Users\Dexter\AppData\Local\Temp\asLocalRepo10.gradle' (C:\Users\Dexter\.gradle\caches\2.2.1\scripts\asLocalRepo10_d10e66d3o7exs19wwq4uj2zhv\InitScript\initscript). java.io.FileNotFoundException: C:\Users\Dexter\.gradle\caches\2.2.1\scripts\asLocalRepo10_d10e66d3o7exs19wwq4uj2zhv\InitScript\initscript\cache.properties (The system cannot find the file specified) I have tried to rebuild the project and also

MapActivity could not be found. Android Studio 0.5.1

风流意气都作罢 提交于 2019-11-28 12:52:22
I am setting up google map v2 in Android. I am using the new technique on adding dependency using this link." Android Studio with Google Play Services " It did nice after synchronization, clean project and rebuild project. However I could not find the MapActivity. What seems to be the problem? Build.gradle apply plugin: 'android' android { compileSdkVersion 19 buildToolsVersion "19.0.3" defaultConfig { minSdkVersion 8 targetSdkVersion 19 versionCode 1 versionName "1.0" } buildTypes { release { runProguard false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'

The library com.google.android.gms:play-services-base is being requested by various other libraries at [[15.0.1,15.0.1]], but resolves to 16.0.1

吃可爱长大的小学妹 提交于 2019-11-28 12:36:45
I see that this is a common issue apparently, but none of the posted solutions work for me. I have checked and all of my play services and firebase libraries are at the latest version. app/build.gradle : apply plugin: 'com.android.application' android { compileSdkVersion 27 defaultConfig { applicationId "jobquals" minSdkVersion 22 targetSdkVersion 27 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } }

Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException:..non-zero exit value 3

核能气质少年 提交于 2019-11-28 12:21:26
After Clean Project -> Rebuild Project my android project I am getting below error Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-7-oracle/bin/java'' finished with non-zero exit value 3 Gradle : apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.1" defaultConfig { applicationId "com.myapplicationname.app" minSdkVersion 15 targetSdkVersion 23

Gradle installation having a proxy issue

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-28 12:19:38
I'm running into issues building android projects on a server in a corporate network behind a proxy on Jenkins. Have tried with both the jenkins gradle, as well as gradlew. Below is the error message after turning on debug mode. 17:12:31 17:12:40.482 [INFO] [com.android.build.gradle.internal.DependencyManager] Parsing /opt/android/tools/package.xml 17:12:32 17:12:42.383 [DEBUG] [org.gradle.launcher.daemon.server.Daemon] DaemonExpirationPeriodicCheck running 17:12:42 17:12:52.384 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses

How to change the generated filename for App Bundles with Gradle?

感情迁移 提交于 2019-11-28 12:03:10
So to change the generated APK filename inside gradle android I could do something like: applicationVariants.output.all { outputFileName = "the_file_name_that_i_want.apk" } Is there a similar thing for the generated App Bundle file? How can I change the generated App Bundle filename? As a more generic way to Martin Zeitlers answer the following will listen for added tasks, then insert rename tasks for any bundle* task that gets added. Just add it to the bottom of your build.gradle file. Note: It will add more tasks than necessary, but those tasks will be skipped since they don't match any

Why Android Studio doesn't allow me to create Java Classes?

ⅰ亾dé卋堺 提交于 2019-11-28 11:53:31
Starting from the 2 days ago update to Android Studio, it doesnt let me create Java classes anymore. And the current classes are now with a strange symbol. I tried to export, import many and many times with different config but never worked. Any advice? Here are two screenshot UPDATE 1: Here is the structure of my Android Studio project. AndroidManifest is in the right place. Right click on the src folder, Mark Directory As -> Source Root. Android Studio 1.0 Update: In project view of Android Studio please check for “java” folder under src . Usually there will be two folders automatically

Is there a way to only run a specific set of tests in an Android Gradle project?

你说的曾经没有我的故事 提交于 2019-11-28 11:27:15
I have an Android/Gradle project. Whenever I want to run tests, I run: ./gradlew connectedInstrumentTest which runs all my tests under the test folder of my project. My test folder has several automation tests as well as non-automation tests. I'm mostly interested in running the fast non-automation tests without the slow automation tests. Is there a way to run just a specific set of tests, such as from one specific class or anything similar? I'm basically asking about any kind of separation so that I can choose to run just a few tests when I want to. Created a sample project here . Edit local

Exclude .jar from compile in Android Studio with Gradle

烂漫一生 提交于 2019-11-28 11:20:57
I currently have something like this in the build.gradle file. dependencies { compile 'com.android.support:support-v4:13.0.+' compile ('com.xxx:xxx-commons:1.+') { } } A problem arises since both jUnit and hamcrest-core are present in the com.xxx:xxx maven repository, creating an error like this: Gradle: Origin 1: /Users/yyy/.gradle/caches/artifacts-26/filestore/junit/junit/4.11/jar/4e031bb61df09069aeb2bffb4019e7a5034a4ee0/junit-4.11.jar Gradle: Origin 2: /Users/yyy/.gradle/caches/artifacts-26/filestore/org.hamcrest/hamcrest-core/1.3/jar/42a25dc3219429f0e5d060061f71acb49bf010a0/hamcrest-core-1