android-appcompat

How to install Repository com.android.support:appcompat-v7

一个人想着一个人 提交于 2019-12-11 08:10:47
问题 I have an error in my gradle script: In my app (gradle) I have: buildToolsVersion "25.0.2" How can I install the corresponding appcompat lib ? When tryping to add ... compile 'com.android.support:appcompat-v7:25.0.2' ... I get an error and the following picture : When clicking on the link, nothing happens. Can someone guide me to install the lib ? UPDATE Following screenshot shows, I obviously installed the support libraries, but then how can I get rid of the red line ? What about this ? I

What replaced appcompat-v7 in AndroidX

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 07:48:40
问题 After migrating a couple of my older projects over to AndroidX it as though three of my dependencies are deprecated: implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support:design:28.0.0' implementation 'com.android.support:cardview-v7:28.0.0' I haven't been able to find a replacement for these dependencies. Does AndroidX have an equivalent for these dependencies? 回答1: Use in the order: implementation 'androidx.appcompat:appcompat:1.0.2' implementation

Fragment doesn't show second time it's used

旧巷老猫 提交于 2019-12-11 06:17:54
问题 I have a single Activity architecture where I'm loading a PreferenceFragmentCompat inside another ViewGroup in the MainActivity . Custom navigation exists within the MainActivity so that you can load the ViewGroup with the fragment and navigate away from it all within the same MainActivity . The first time I navigate to the ViewGroup , the PreferenceFragmentCompat loads perfectly fine. However, when I navigate away from the ViewGroup containing the PreferenceFragmentCompat and then back again

com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed on android 3.2.1 SDK 28.0.3

亡梦爱人 提交于 2019-12-11 06:12:02
问题 REVISED: got a new error after upgrading to AS(3.2.1) and Gradle(4.6). Here is build.gradle code. Gradle property has " android.enableAapt2 = true" and wrapper property has "distributionUrl=https://services.gradle.org/distributions/gradle-4.6-all.zip" apply plugin: 'com.android.application' android { compileSdkVersion 28 buildToolsVersion '28.0.3' packagingOptions { exclude 'META-INF/DEPENDENCIES.txt' exclude 'META-INF/LICENSE.txt' exclude 'META-INF/NOTICE.txt' exclude 'META-INF/NOTICE'

Failed to resolve: com.android.support:appcompat-v7:22.2.1

跟風遠走 提交于 2019-12-11 04:00:02
问题 when I import an eclipse project to the AS,an error occurred: E:\studioWorkspace\YTHDBL\yTHDBL\build.gradle Error:Error:line (25)Failed to resolve: com.android.support:appcompat-v7:22.2.1 Install Repository and sync project Show in File open.dependency.in.project.structure Show in Project Structure dialog</a> Error:Error:line (24)Failed to resolve: com.android.support:support-v4:22.2.1 Install Repository and sync project Show in File open.dependency.in.project.structure Show in Project

ActionBar three-dot dropdown opens at the wrong place

蹲街弑〆低调 提交于 2019-12-11 03:49:07
问题 I've implemented an ActionBar with the com.android.support:appcompat-v7:22.1.1 library. Here you can see the code and my question: ActionBar with appcompat library v7 (ava.lang.IllegalStateException: You need to use a Theme.AppCompat theme) That works, but I have one last problem. After changing the ActionBar to the new library, the settings dropdown opens into the actionbar and not among it (see image) and the background of the settings dropdown is grey instead of white? How can I solve that

ActionBar with appcompat library v7 (ava.lang.IllegalStateException: You need to use a Theme.AppCompat theme)

杀马特。学长 韩版系。学妹 提交于 2019-12-11 03:05:25
问题 I want to implement an ActionBar with the Android v7 appcompat library to support the ActionBar for Android >= 2.1 My app starts with the MainActivity which contains a dark Actionbar, some information and a start button. The next activity is the MenuActivity which contains also the dark Actionbar and some ActionBar Tabs which you can swipe This is my manifest.xml with the DarkActionBar theme: <application android:icon="@mipmap/ic_launcher" android:label="Hello World" android:theme="@android

Material Design support below Lollipop - crashes

和自甴很熟 提交于 2019-12-11 02:47:26
问题 I've been trying to implement the Material Design theme, following these instructions. I'm not using ToolBar (must I?) ALL my Activities extends ActionBarActivity. Using getSupportActionBar() all across the project. I'm compiling and targeting to API 21 in gradle (minimun is API 15). My <application> tag contains android:theme="@style/AppTheme" Running the application on Lollipop device (with a specific v21 similar theme works). My styles.xml: <style name="AppBaseTheme" parent="@style/Theme

Updated appcompat-v7 to the newest version, get NoClassDefFound for AppCompatDelegateImplV23

谁都会走 提交于 2019-12-11 02:42:48
问题 I read on the CommonsWare blog that it's a smart idea to update appcompat-v7 to the newest version before the roll out of Android 6.0 so I just went ahead and tried to do that with my project in Eclipse. After updating the library (I simply removed the previous version and added the new one with resources), my (previously ActionBarActivity) AppCompatActivity does not start (the app crashes). This is the LogCat content: 08-20 02:55:58.417: I/art(28031): Rejecting re-init on previously-failed

Modifying style does not work well

跟風遠走 提交于 2019-12-11 02:39:59
问题 I'm changing the UI of my app to green colors. In the ActionBar, I use a ShareActionProvider to share data to other users, but this menu item doesn't get the same color as the other menu items. However, its dropdown listview has the correct colors. I'm running my app in GingerBread, so when I press menu key, a menu item appears but it also has the wrong colors. I have used Android Action Bar Style Generator, but there is something I'm missing. This is my code in /res/values: <resources xmlns