android-support-library

AppBarLayout child doesn't collapse when scrolling

两盒软妹~` 提交于 2019-12-05 04:59:30
问题 I have a AppBarLayout which contains an horizontal RecyclerView among its children. The sibling of the AppBarLayout is a ViewPager (which contains a vertical RecyclerView ). Here is the XML: <android.support.design.widget.CoordinatorLayout android:id="@+id/coordinatorLayout" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height=

patch support library using Android Studio

筅森魡賤 提交于 2019-12-05 04:43:13
问题 I've moved my project to Android Studio a month ago, and I'm glad I did, despite the need to switch to a new (and more powerful) build system (gradle). One thing I'd have known in Eclipse, but I can't figure out how to achieve now, is patching the support library. I know that it does not sound like a good practice, but a couple of code lines are driving me crazy, and the solution would be to simply modify it to solve my problem. I've tried to modify the code in the sdk's ".\extras\android

Upgrading Android SDK causes java.lang.VerifyError crash

孤者浪人 提交于 2019-12-05 02:43:05
Since upgrading my Android SDK, I get a java.lang.VerifyError crash booting my previously working application. Looking at the logs, there are a few new issues leading up the crash that were not there previously: Could not find method android.support.v4.content.LocalBroadcastManager.getInstance, referenced from method com.myapp.android.App.setOAuthLoginState 04-12 19:43:10.249: W/dalvikvm(9508): VFY: unable to resolve static method 251: Landroid/support/v4/content/LocalBroadcastManager;.getInstance (Landroid/content/Context;)Landroid/support/v4/content/LocalBroadcastManager; 04-12 19:43:10.249:

@IntDef annotation and return value from other's code that cannot be annotated or how to temporarily disable annotation from affecting the code?

百般思念 提交于 2019-12-05 02:00:11
I am using IntDef from Android Support annotation in my code (but my question is wider in scope so please keep reading :) like this: public class UiLockMode { @IntDef({DEFAULT, NONE, VISIBLE, TRANSPARENT}) @Retention(RetentionPolicy.SOURCE) public @interface AllowedValues {} public static final int DEFAULT = 0; public static final int NONE = 1; public static final int VISIBLE = 2; public static final int TRANSPARENT = 3; } Next, I got some other methods annotated with it like this: protected void setLockMode(@UiLockMode.AllowedValues int lockMode) { ... At that point is all fine and nice but

rendering error; couldn't resolve @id/search_edit_frame

非 Y 不嫁゛ 提交于 2019-12-05 01:37:57
I am having an error that says couldn't resolve @id/search_edit_frame I don't know why, I tried the File>Invalidate Caches> Just Restart and restart android studio also tried to change the render version all of my supported api.. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" myapp="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.v7.widget.SearchView android:id="@+id/svSearch" android:layout_width="match_parent" android:layout_height="wrap_content

Android Studio 3.1 - Exception in plugin Android Support

走远了吗. 提交于 2019-12-05 01:10:32
I have updated to the latest version of Android Studio (3.1) and I get the following error when I try to run my app. It was working with no problems before the update. I have also uninstalled Android Studio and downloaded the latest version from the official website. Nothing has changed. null java.lang.NullPointerException at com.android.tools.idea.run.tasks.InstantRunNotificationTask.<init>(InstantRunNotificationTask.java:64) at com.android.tools.idea.fd.InstantRunBuildAnalyzer.getNotificationTask(InstantRunBuildAnalyzer.java:188) at com.android.tools.idea.run.AndroidLaunchTasksProvider

Failed to resolve: com.android.support:customtabs:[26.0.0,26.1.0] [duplicate]

不羁的心 提交于 2019-12-05 00:55:47
This question already has an answer here: Android studio default project fails: Error:Failed to resolve: com.android.support:support-v4:25.2.0 3 answers Failed to resolve: com.android.support:cardview-v7:26.0.0 android 24 answers I have these two errors: Failed to resolve: com.android.support:custom tabs:[26.0.0,26.1.0] Failed to resolve: com.android.support:support-v4:[26.0.0,26.1.0] Now Android support package disturbs over network(starts from 25.4), so your project's build.gradle file should include that: allprojects { repositories { jcenter() maven { url "https://maven.google.com" } } }

appcompat-v7:27.1.1 conflicts with play-services:11.0.1

巧了我就是萌 提交于 2019-12-05 00:38:36
I am working on a new app. Presently I am trying to add dependency. implementation 'com.google.android.gms:play-services:11.0.1' When I do I get a gradle compile error on implementation 'com.android.support:appcompat-v7:27.1.1' saying: All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 27.1.1, 26.1.0. Examples include com.android.support:animated-vector-drawable:27.1.1 and com.android.support:mediarouter-v7:26.1.0 Any ideas how to best resolve this issue? Gradle file apply plugin: 'com.android

Why Android Studio is forcing to use Androidx from Android support library?

无人久伴 提交于 2019-12-05 00:12:21
Working on a React Native project but out of sudden it stopped working & started giving an error: Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory). Suggestion: add ‘tools:replace=“android:appComponentFactory”’ to <application> element at AndroidManifest.xml:7:5-117 to override. I know Google has done with Support Library class

Code Analysis Error (Unexpected namespace prefix) after upgrading Android Support Library 23.2.0

蓝咒 提交于 2019-12-04 22:57:12
I upgraded to Android Support Library 23.2.0 and added vectorDrawables.useSupportLibrary = true to my build.gradle, so that I have vector drawable support for apis lower than 21. (See here for details). I also replaced android:src="@drawable/ic_create_black_24dp" with app:srcCompat="@drawable/ic_create_black_24dp" in every Imageview that uses vector drawables. The app compiles and works perfectly fine, but code analysis reports: Error:(56, 9) Unexpected namespace prefix "app" found for tag ImageView Why is this the case? Why is it compiling although I am getting errors? EDIT: I have added