androidx

“package android.support.v7.app does not exist” error in androidStudio

元气小坏坏 提交于 2020-01-30 08:50:29
问题 i am just starting with android development using androidStudio i am following udacity tutorial where they asked us to copy paste some code and run it i am unable to run the cod after pasting i think the major problem is while importing import android.support.v7.app.AppCompatActivity; i have checked internet for solution to this problem including stackoverflow but it seems that it is different for each case i have tried to import import androidx.appcompat.app.AppcompatActivity; instead of

“package android.support.v7.app does not exist” error in androidStudio

别来无恙 提交于 2020-01-30 08:50:21
问题 i am just starting with android development using androidStudio i am following udacity tutorial where they asked us to copy paste some code and run it i am unable to run the cod after pasting i think the major problem is while importing import android.support.v7.app.AppCompatActivity; i have checked internet for solution to this problem including stackoverflow but it seems that it is different for each case i have tried to import import androidx.appcompat.app.AppcompatActivity; instead of

“package android.support.v7.app does not exist” error in androidStudio

核能气质少年 提交于 2020-01-30 08:49:44
问题 i am just starting with android development using androidStudio i am following udacity tutorial where they asked us to copy paste some code and run it i am unable to run the cod after pasting i think the major problem is while importing import android.support.v7.app.AppCompatActivity; i have checked internet for solution to this problem including stackoverflow but it seems that it is different for each case i have tried to import import androidx.appcompat.app.AppcompatActivity; instead of

Migration to androidX - can't import/find androidx.databinding.DatabindingUtil

血红的双手。 提交于 2020-01-30 04:42:08
问题 I'm working on an Android MVVM application. I just switched to the androidx libraries manually. This are the libraries in my build.gradle: implementation 'com.google.code.gson:gson:2.8.5' implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:1.0.0-rc02' implementation 'androidx.constraintlayout:constraintlayout:1.1.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0-rc02' implementation 'com.google.android.material:material:1.0.0-rc01'

error: duplicate value for resource 'attr/orientation' with config '' .aapt.v2.Aapt2Exception: Android resource compilation failed

折月煮酒 提交于 2020-01-29 06:08:42
问题 I've got this compile error! I checked similar problems on stackoverflow but all of them were about different errors & not " attr/orientation' with config '' ", but they didn't work for my problem! I'm using androidx library , kotlin ,Gradle 4.10.1 , I do these steps, but still no result: 1- Clean Project 2- Rebuild 3- Invalidate caches / Restart 4- made another attrs.xml file on the folder : res->values-v21 5-so many other ways... but all of them just failed! Any solution? 回答1: I find the

error: duplicate value for resource 'attr/orientation' with config '' .aapt.v2.Aapt2Exception: Android resource compilation failed

三世轮回 提交于 2020-01-29 06:08:04
问题 I've got this compile error! I checked similar problems on stackoverflow but all of them were about different errors & not " attr/orientation' with config '' ", but they didn't work for my problem! I'm using androidx library , kotlin ,Gradle 4.10.1 , I do these steps, but still no result: 1- Clean Project 2- Rebuild 3- Invalidate caches / Restart 4- made another attrs.xml file on the folder : res->values-v21 5-so many other ways... but all of them just failed! Any solution? 回答1: I find the

How To Add Tabbed Activity Into Navigation Drawer Fragment in Android Studio 3.5 - the latest version

情到浓时终转凉″ 提交于 2020-01-25 07:24:30
问题 Please how do I add Tabbed Activity Into Navigation Drawer Fragment in Android Studio 3.5 - the latest version. I am having issues with "can not resolve method by findViewById and getSupportFragmentManager". Is there anything I need to import, am using the latest version and androidx. And if I add implements FragmentActivity or any other activities to the class, it will throw exception closing the app. public class SendMoneyFragment extends Fragment { private SendMoneyViewModel toolsViewModel

BottomNavigationView with navgraph loading fragment again

白昼怎懂夜的黑 提交于 2020-01-24 21:20:55
问题 I am using BottomNavigationView with nav-graph Below is my code In MainActivity.class navController = Navigation.findNavController(this, R.id.mainFragment); bottomNavigation.setOnNavigationItemSelectedListener(menuItem -> { switch (menuItem.getItemId()){ case R.id.home: navController.navigate(R.id.exploreFragment); return true; case R.id.events: navController.navigate(R.id.eventsFragment); return true; case R.id.stories: navController.navigate(R.id.storiesFragment); return true; } return

Can't use android.support.v7.widget.Toolbar with android.useAndroidX=true

半世苍凉 提交于 2020-01-24 20:47:07
问题 in app/build.gradle: implementation 'com.android.support:appcompat-v7:28.0.0' in my activity I use import android.support.v7.widget.Toolbar Nice. It's work finde. But when I migrate to androidx I add this: android.useAndroidX=true android.enableJetifier=true As result now my activity not compile with error: import android.support.v7.widget.Toolbar; Cannot resolve symbol 'v7' Is it possible to use android.support.v7.widget.Toolbar together with anrdoidx.* package? 回答1: Since you are migrating

cardBackgroundColor and cardCornerRadius not working in AndroidX

守給你的承諾、 提交于 2020-01-24 10:33:04
问题 I'm struggling with CardView corner radius and background color with AndroidX libraries. I've defined my layout as below: <?xml version="1.0" encoding="utf-8"?> <androidx.cardview.widget.CardView 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" xmlns:card_view="http://schemas.android.com/apk/res-auto" android:layout_width="@dimen/retail_card_width" card_view:cardCornerRadius="@dimen