android-gradle

Manifest merger failed with multiple errors, see logs when updating Firebase and gsm dependencies

ⅰ亾dé卋堺 提交于 2019-11-30 08:17:23
I'm really new with android and I got this problems while I try to upgrade all my to dependencies to support newest firebase error when I upgrade GSM and firebase. Here is my app/build.graddle apply plugin: 'com.android.application' android { compileSdkVersion 25 buildToolsVersion '27.0.3' defaultConfig { applicationId '******' minSdkVersion 21 targetSdkVersion 25 versionCode 22 /** Version Specification : Database.API.Application **/ versionName "1.5.2" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" aaptOptions.cruncherEnabled = false aaptOptions.useNewCruncher =

Gradle: How to run instrumentation test for class

我与影子孤独终老i 提交于 2019-11-30 08:11:53
I'm running instrumentation test in Android Studio with Run Configuration defined as below (don't mind warning): So this is invoking test suit for a specific class. How can I achieve this with command line, I guess using ./gradlew command ? As stated in the AndroidTestingBlueprint you can use the android.testInstrumentationRunnerArguments.class property: ./gradlew app:connectedAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.example.android.testing.blueprint.ui.espresso.EspressoTest According to the docs : When you run tests from the command-line with Android Debug Bridge

Cannot read packageName from AndroidManifest.xml

安稳与你 提交于 2019-11-30 08:11:19
I have errors in my android manifest file: Error:Cannot read packageName from C:\Users\brandon\AndroidStudioProjects\MineDodge2\app\src\main\AndroidManifest.x‌​ml Error:The markup in the document preceding the root element must be well-formed. I tried to look on this website but the answers aren't working for me. <?xml version="1.0" encoding="utf-8"?> < manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.brandon.MineDodge" > <application android:allowBackup="true" android:icon="@mipmap/redjet" android:label="@string/app_name" android:theme="@style/AppTheme"

Is there a max value for versioncode?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-30 08:04:35
We always have to increment versionCode by some arbitary number to publish it to google play. Is there limit to that value and what will happen if it is reached? defaultConfig { applicationId "my.app" minSdkVersion 15 targetSdkVersion 22 versionCode 65 versionName "1.05" setProperty("archivesBaseName", "myapp-$versionCode") } Update 08/11/2016 (UTC): The docs has been updated. Not the old MAX_INT value nor the 2000000000. Warning: The greatest value Google Play allows for versionCode is 2100000000 . Cross-post for visibility here. It seems there was a recent change in Google, making the

Android Build with Gradle and ProGuard : “The output jar must be specified after an input jar, or it will be empty”

前提是你 提交于 2019-11-30 08:01:24
I'm creating a build with different flavors with Gradle. It used to run quite good until now, until I wanted to enable Proguard . I enabled minifyEnabled for my Release Build and now I'm having an exception saying : " Caused by: org.gradle.internal.UncheckedException: java.io.IOException: The output jar [.../app/build/intermediates/multi-dex/dev/release/componentClasses.jar] must be specified after an input jar, or it will be empty. " Does anybody know what is causing this exception ? I basically want to enable ProGuard before I release my application. Here is my Gradle file below. lintOptions

Publishing Android Library (aar) to Bintray with chosen flavors

ⅰ亾dé卋堺 提交于 2019-11-30 07:54:44
I've juste added some flavors (or productFlavors if you want) to my project. The fact is that when I publish the library to bintray , all flavors are uploaded (which is great), but I'm unable to use them. The plugin used is the official one here . The uploaded aar: androidsdk-0.0.4-fullRelease.aar androidsdk-0.0.4-fullDebug.aar androidsdk-0.0.4-lightRelease.aar androidsdk-0.0.4-lightDebug.aar As you noted, the fullRelease is named as the classifier , see doc chapter 23.4.1.3 . I am searching for a solution to choose which flavors that I want to upload. I've already looked at bintray examples (

Program type already present: android.support.v4.media.MediaBrowserCompat$CustomActionCallback

核能气质少年 提交于 2019-11-30 07:54:13
I completely new to Android Development and can't seem to resolve this error: "Error: Program type already present: android.support.v4.media.MediaBrowserCompat$CustomActionCallback" This is my dependencies: dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'androidx.appcompat:appcompat:1.0.0-alpha1' implementation 'androidx.constraintlayout:constraintlayout:1.1.2' implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0-alpha1' implementation 'androidx.legacy:legacy-support-v4:1.0

IOException: Failed to find byte code when upgrade to Android Studio 3.1

爱⌒轻易说出口 提交于 2019-11-30 07:52:34
Yesterday, Google announced that Android Studio 3.1 is available in the stable release channel. So I give it a try. Before of that my project was build successfully but after I upgraded AS to 3.1 and Gradle build tool to com.android.tools.build:gradle:3.1.0 (it forced upgrade gradle wrapper to 4.4), it failed with this given exception: java.lang.RuntimeException: com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: java.io.IOException: Failed to find byte code for android/hardware/camera2/CameraManager$TorchCallback at com.android.builder

How to use findViewById() in robolectric

被刻印的时光 ゝ 提交于 2019-11-30 07:27:58
I simply want to test with robolectric if a certain view is visible in a fragment. My unit test looks like this: ActivityController controller = Robolectric.buildActivity(FragmentActivity.class); FragmentActivity activity = (FragmentActivity) controller.create().start().resume().visible().get(); F fragment = new MyFragment(); activity.getSupportFragmentManager().beginTransaction() .add(fragment, FRAGMENT_TAG).commit(); View view = fragment.getView().findViewById(R.id.my_view); assertEquals(view.getVisibility(), View.VISIBLE); I'm using the latest android gradle plugin 1.1.3, robolectirc 2.4

What should I set for compileSdkVersion, minSdkVersion, and targetSdkVersion?

徘徊边缘 提交于 2019-11-30 07:21:31
I am concerned about what should I set the compileSdkVersion , minSdkVersion , and targetSdkVersion to be. My concern first of all is that if I set the compileSdkVersion to be 23 which is the latest right now, will older device be able to run it? How do I exactly know what should my minSdkVersion be in order to make sure that phone running lower api or version be unable to access it (I don't want to set the minimum sdk too high because that would block phone that could potentially run the app)? How should I set my targetSdkVersion ? I set the compileSdkVersion to be 23 which is the latest