android-support-library

All android support libraries must use the same version specification

拥有回忆 提交于 2020-01-15 07:35:07
问题 I dont know where I went wrong, but this keeps me saying All com.android.support libraries must use the same exact version specification (mixing versions can lead to runtime crashes.) Found versions 24.0.0,23.2.0 Examples include com.android.support:animated-vector-drawable:24.0.0 and com.android.support:cardview-v7:23.2.0 my build.gradle is apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion '25.0.0' defaultConfig { applicationId "com.example.project"

android.support.v7.widget.Toolbar VectorDrawableCompat IllegalStateException when using support lib 24+

末鹿安然 提交于 2020-01-15 04:50:10
问题 I've started a new project in Android Studio and configured my gradle build settings. When I add an android.support.v7.widget.Toolbar to a layout, I get the following error when in design view. Keep note that this error only shows up when previewing with an API less than 21 (specifically APIs 16 - 19). Everything works fine when I preview with API 21 - 24. I have looked at a number of solutions and tried them, but none have solved the issue. One thing I tried doing was adding this to my

Fragment (supported library) doesn't see activity in onActivityCreated(), after screen orientation changed

早过忘川 提交于 2020-01-15 03:27:05
问题 I'm using Android support library v13. There is a strange thing I couldn't understand. When creating new activity, I load fragment as: Main activity layout: ... <FrameLayout android:id="@+id/fragment_1" ... /> In onCreate() of main activity: mFragment = (FragmentActivity) getSupportFragmentManager().findFragmentById(R.id.fragment_1); // if screen orientation changed, no need to create new instance of fragment if (mFragment == null) { mFragment = ...; // create new instance of fragment

getSupportFragmentManager() undefined in Fragment

本小妞迷上赌 提交于 2020-01-14 14:48:30
问题 i'm getting error on getSupportFragmentManager() that "this method undefine in Fragment", while creating slider menu with sliding tab i prepared code as bellow.. public class HomeFragment extends Fragment { Toolbar toolbar; ViewPager viewpager; ViewPagerAdapter adapter; SlidingTabLayout tabs; CharSequence Titles1[] = { "Home", "Help", "Contect" }; // int Titles[] = { R.drawable.ic_content_copy_black_24dp, // R.drawable.ic_refresh_black_24dp, R.drawable.ic_share_black_24dp }; int NumOfTabs = 3

getSupportFragmentManager() undefined in Fragment

久未见 提交于 2020-01-14 14:48:26
问题 i'm getting error on getSupportFragmentManager() that "this method undefine in Fragment", while creating slider menu with sliding tab i prepared code as bellow.. public class HomeFragment extends Fragment { Toolbar toolbar; ViewPager viewpager; ViewPagerAdapter adapter; SlidingTabLayout tabs; CharSequence Titles1[] = { "Home", "Help", "Contect" }; // int Titles[] = { R.drawable.ic_content_copy_black_24dp, // R.drawable.ic_refresh_black_24dp, R.drawable.ic_share_black_24dp }; int NumOfTabs = 3

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException

女生的网名这么多〃 提交于 2020-01-14 05:48:04
问题 I'm new at android. I'm trying to add Google sign in feature in my app but when i add 'com.google.android.gms:play-services-auth:17.0.0' in build.gradle file, i got this error: Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: androidx/versionedparcelable/CustomVersionedParcelable.class Kindly suggest solution, i spend whole day but cant get solution. Build.gradle code

AppCompat SearchView icon can't be GONE

眉间皱痕 提交于 2020-01-14 04:49:16
问题 I'm using android.support.v7.widget.SearchView and i need to make this search icon GONE. I have custom ActionBar layout with SearchView: <android.support.v7.widget.SearchView android:id="@+id/search" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="gone"/> initialize SearchView : searchView = (SearchView) findViewById(R.id.search); AutoCompleteTextView searchText = (AutoCompleteTextView) searchView.findViewById(R.id.search_src_text); searchText

AppCompat SearchView icon can't be GONE

给你一囗甜甜゛ 提交于 2020-01-14 04:48:46
问题 I'm using android.support.v7.widget.SearchView and i need to make this search icon GONE. I have custom ActionBar layout with SearchView: <android.support.v7.widget.SearchView android:id="@+id/search" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="gone"/> initialize SearchView : searchView = (SearchView) findViewById(R.id.search); AutoCompleteTextView searchText = (AutoCompleteTextView) searchView.findViewById(R.id.search_src_text); searchText

Conflicting versions of the support library because of the Firebase library

♀尐吖头ヾ 提交于 2020-01-13 10:15:12
问题 After creating a new project in Android Studio, I added Firebase and Firebase-messaging to the project, as described in the manual. However, after Gradle sync, the IDE displays an error: All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0-beta01, 26.1.0. Examples include com.android.support:animated-vector-drawable:28.0.0-beta01 and com.android.support:support-media-compat:26.1.0 Without Firebase

Fragment setuserVisibleHint true but getActivity returns null

强颜欢笑 提交于 2020-01-13 09:58:33
问题 I've been doing some logic inside of a fragment's setUserVisibleHint() method. I was always checking if isVisibleToUser is true and then used getActivity to return the activity. This was working well (100% of the time) until I updated the support library to the latest( support:appcompat-v7:24.2.0 ). Now getActivity always returns null. Are there some changes to the support library that explain this behaviour? @Override public void setUserVisibleHint(boolean isVisibleToUser) { super