android-studio

Cache It is currently in use by another Gradle instance

蹲街弑〆低调 提交于 2020-02-28 08:13:45
问题 I don't understand why this is happening. Gradle sync failed: Timeout waiting to lock buildscript class cache for build file '/Users/user/Documents/android-studio-pubble/App/build.gradle' (/Users/user/.gradle/caches/2.2.1/scripts/build_bqh4uod6cat7u5cm5qkoye2ky/ProjectScript/buildscript). It is currently in use by another Gradle instance. Owner PID: unknown Our PID: 909 Owner Operation: unknown Our operation: Initialize cache Lock file: /Users/user/.gradle/caches/2.2.1/scripts/build

Cache It is currently in use by another Gradle instance

两盒软妹~` 提交于 2020-02-28 08:13:09
问题 I don't understand why this is happening. Gradle sync failed: Timeout waiting to lock buildscript class cache for build file '/Users/user/Documents/android-studio-pubble/App/build.gradle' (/Users/user/.gradle/caches/2.2.1/scripts/build_bqh4uod6cat7u5cm5qkoye2ky/ProjectScript/buildscript). It is currently in use by another Gradle instance. Owner PID: unknown Our PID: 909 Owner Operation: unknown Our operation: Initialize cache Lock file: /Users/user/.gradle/caches/2.2.1/scripts/build

Create a Flutter project with Swift

浪子不回头ぞ 提交于 2020-02-26 18:28:33
问题 Flutter allows to support of Swift programming language. How can I integrate my Swift code file with Flutter project in Android Studio. There is no option to add/create a Swift file (in New menu) in Android Studio. 回答1: Flutter uses Dart language. Android - Java/Kotlin , iOS - Objc/Swift could be used to write plugins and platform dependent code. More details https://flutter.io/developing-packages/ When Flutter creates new project, it generates 2 native projects (iOS and Android), that would

Create a Flutter project with Swift

我的梦境 提交于 2020-02-26 18:27:11
问题 Flutter allows to support of Swift programming language. How can I integrate my Swift code file with Flutter project in Android Studio. There is no option to add/create a Swift file (in New menu) in Android Studio. 回答1: Flutter uses Dart language. Android - Java/Kotlin , iOS - Objc/Swift could be used to write plugins and platform dependent code. More details https://flutter.io/developing-packages/ When Flutter creates new project, it generates 2 native projects (iOS and Android), that would

With API 28 and “androidx.appcompat” library project says “AppCompatActivity” symbol not found

天大地大妈咪最大 提交于 2020-02-26 12:05:01
问题 I updated my build and target version to 28 (Pie) and replaced the relevant dependencies. Now my project says Symbol not found on AppCompatActivity . I have tried to Clean project Rebuild project Invalidate Caches / Restart But the result is the same. Moreover when I try Ctrl + Space after extends keyword in activity class there is no "AppCompatActivity suggestion. I tried to investigate if its present in libraries folder, it's present there. Now, what should I do to make it work? If there is

With API 28 and “androidx.appcompat” library project says “AppCompatActivity” symbol not found

一世执手 提交于 2020-02-26 12:04:06
问题 I updated my build and target version to 28 (Pie) and replaced the relevant dependencies. Now my project says Symbol not found on AppCompatActivity . I have tried to Clean project Rebuild project Invalidate Caches / Restart But the result is the same. Moreover when I try Ctrl + Space after extends keyword in activity class there is no "AppCompatActivity suggestion. I tried to investigate if its present in libraries folder, it's present there. Now, what should I do to make it work? If there is

Android recyclerview adapter with multiple viewtype using databinding

泄露秘密 提交于 2020-02-26 10:08:27
问题 Is it possible to create a multiple view type in my adapter.. like adding a view for my header then below the header is a list. code snippet for my adapter : public class StoreAdapter extends RecyclerView.Adapter<StoreAdapter.BindingHolder> { List<Store> mStoreList; public class BindingHolder extends RecyclerView.ViewHolder { private ViewDataBinding binding; public BindingHolder(View v) { super(v); binding = DataBindingUtil.bind(v); } public ViewDataBinding getBinding() { return binding; } }

Android recyclerview adapter with multiple viewtype using databinding

拈花ヽ惹草 提交于 2020-02-26 10:05:07
问题 Is it possible to create a multiple view type in my adapter.. like adding a view for my header then below the header is a list. code snippet for my adapter : public class StoreAdapter extends RecyclerView.Adapter<StoreAdapter.BindingHolder> { List<Store> mStoreList; public class BindingHolder extends RecyclerView.ViewHolder { private ViewDataBinding binding; public BindingHolder(View v) { super(v); binding = DataBindingUtil.bind(v); } public ViewDataBinding getBinding() { return binding; } }

How to build product flavors from Android Studio?

守給你的承諾、 提交于 2020-02-26 07:35:13
问题 I have defined some product flavors in my build.gradle. I am able to successfully build them using gradlew . I can't figure out how I do so from the Android Studio IDE. (My project was initially done in Eclipse then I've migrated to the Android Studio) 回答1: Build Variants appears as a vertical button along the bottom of the left edge of the workspace. If it's not visible, click the little rectangle icon on the lower left corner. 回答2: You can Choose the flavor you want to run on device or

Why does Android Drawable Importer ignore selection in AS 3.5 onwards

℡╲_俬逩灬. 提交于 2020-02-26 03:42:38
问题 After right-click --> new Batch Drawable Import and selecting any .png from the Select Image Asset(s) box, the primary Batch Drawable Importer box remains empty (ie: the selection was ignored!). First 2 lines of Event Log: java.lang.NoSuchMethodError: org.jetbrains.android.facet.AndroidFacet.getAllResourceDirectories()Ljava/util/List; at de.mprengemann.intellij.plugin.androidicons.util.AndroidFacetUtils.getResourcesRoot(AndroidFacetUtils.java:48) So apparently Android Drawable Importer is