android-studio

The layout <layout> in layout has no declaration in the base layout folder [error]

▼魔方 西西 提交于 2020-04-07 12:42:47
问题 After migrating from Eclipse to the new version of Android Studio 3.2, API 28, I am getting the following error on my app's layout: The layout in layout has no declaration in the base layout folder; this can lead to crashes when the resource is queried in a configuration that does not match this qualifier One of the layouts that I am getting this error is: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill

The layout <layout> in layout has no declaration in the base layout folder [error]

|▌冷眼眸甩不掉的悲伤 提交于 2020-04-07 12:42:27
问题 After migrating from Eclipse to the new version of Android Studio 3.2, API 28, I am getting the following error on my app's layout: The layout in layout has no declaration in the base layout folder; this can lead to crashes when the resource is queried in a configuration that does not match this qualifier One of the layouts that I am getting this error is: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill

Running React Native in WSL with the emulator running directly in Windows

余生颓废 提交于 2020-04-07 12:04:09
问题 I haven't done Android development in a while, so my knowledge of modern Android development is spotty. I'm trying to learn React Native. I use WSL as my primary development environment. Since it'll probably be a pain to set up the Android emulator in Linux/WSL, I want to run the emulator directly on Windows. However, I'd prefer to be able to run react-native run-android in WSL. How would I set up React Native to be able to run react-native run-android in WSL and run the app in an Android

Running React Native in WSL with the emulator running directly in Windows

荒凉一梦 提交于 2020-04-07 12:04:04
问题 I haven't done Android development in a while, so my knowledge of modern Android development is spotty. I'm trying to learn React Native. I use WSL as my primary development environment. Since it'll probably be a pain to set up the Android emulator in Linux/WSL, I want to run the emulator directly on Windows. However, I'd prefer to be able to run react-native run-android in WSL. How would I set up React Native to be able to run react-native run-android in WSL and run the app in an Android

Android Studio: What does the blueprint area do? What benefit is it?

六眼飞鱼酱① 提交于 2020-04-07 03:31:41
问题 I'm working through Android layout and I know there is this new(er) thing call Blueprint. I'm wondering what the Blueprint view offers. What I've Tried 1. Added Button and Moved It Around Via Constraints I don't see really any difference between the two design views (normal and blueprint). Oh, I did see one difference in the two views. You only see the outlines of the controls if you are floating above the normal design view ( image 1 below). If your cursor is not in the window you don't see

Android Studio: What does the blueprint area do? What benefit is it?

血红的双手。 提交于 2020-04-07 03:31:37
问题 I'm working through Android layout and I know there is this new(er) thing call Blueprint. I'm wondering what the Blueprint view offers. What I've Tried 1. Added Button and Moved It Around Via Constraints I don't see really any difference between the two design views (normal and blueprint). Oh, I did see one difference in the two views. You only see the outlines of the controls if you are floating above the normal design view ( image 1 below). If your cursor is not in the window you don't see

Can't run nor debug project but gradle build+install work

心不动则不痛 提交于 2020-04-07 03:30:28
问题 After update to Android studio 3.6 Canary11 (macOS) I cannot run nor run Debug variants of my project (Release variants working fine). When I try to run the project I've got error: A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade > Entry name 'firebase-abt.properties' collided But when I delete build directory (rm -rf app/build), I can run/debug project once time. After the first run, it is again with the same error with collision. I try clear

proguard problem after updating to android gradle plugin 3.5

微笑、不失礼 提交于 2020-04-07 02:56:05
问题 I save the json presentation of some objects as cache in my app. I had no problem after updating each release of the app and json objects was correctly converted to java objects. After updating to android gradle plugin 3.5 (Adding this line): classpath 'com.android.tools.build:gradle:3.5.0' When I create the release apk, It seems that it can't convert the json string to java objects and it seems that the obfuscated names has changed. When I revert it to gradle plugin 3.4.2, everything is OK.

How to change git repository using android studio

萝らか妹 提交于 2020-04-06 04:30:30
问题 I'm using git with android studio and I already sync other repository. But I hope to change a git repository like github. I think I need to disconnect already connected to the repository but I don't found this option. To do that, How can I do? 回答1: Go to your project directory and delete hidding .git folder like shown below you will be disconnected to git. 回答2: We can change the repository url. Just follow the steps. Right click on project folder From menu Choose “ Git ” Choose “ Repository ”

Remove unused variable declarations automatically - Android Studio/Inteiij

这一生的挚爱 提交于 2020-04-06 04:28:25
问题 Is there a way to remove all unused field declarations automatically in Android Studio/Intellij ? 回答1: Select Analyze > Run Inspection by Name... , type unused declaration and confirm with Enter . When the search is finished, select Unused declaration from the result tab, right click and select Safe delete : 回答2: As simple as that, just press ctrl+alt+shift+I and type unused declaration. You can also use this in removing other unused resouces, for example press ctrl+alt+shift+I and type