android-studio-3.0

ContentResolver query method cannot be used, NoSuchMethodError

送分小仙女□ 提交于 2020-08-18 21:02:53
问题 I am creating an app that reads the phone contacts of your phone. However, for reasons that I don't know, I have a problem using the query method because of the api version that I used. It says that Call requires API level 26 (current min is 16): android.content.ContentResolver#query . Here's my code I used in the oncreate method. public void searchContacts() { ContentResolver contentResolver = getContentResolver(); Cursor cursor = contentResolver.query(ContactsContract.Contacts.CONTENT_URI,

Some conflicts were found in the installation area, while updating android studio 3.0.1

无人久伴 提交于 2020-07-06 10:26:47
问题 I am getting this error while updating Android Studio 3.0.1 some patch gets downloaded and following error comes, Some of the conflicts below do not have a solution, so the patch cannot be applied. Showing File : jre/bin/java.exe is Absent 回答1: If anyone is still having this issue, here's what worked for me. I checked a bunch of other responses but nothing worked & I didn't want to do a clean install. Not sure how it happened, but within my Android_Studio\jre\ was another jre version. So, I

Changing build variants in bulk in AndroidStudio 3.0+

依然范特西╮ 提交于 2020-06-25 10:32:47
问题 Quick history: I'm using AndroidStudio 3.0 my project has 100+ modules (multiple applications and libraries). all of them have same flavorDimensions and flavors. Now question: how to change flavors for all modules in bulk in AndroidStudio 3.0+ without changing each application separately? 回答1: Here is what I recently ended up doing: close Android Studio open a terminal cd to the base directory of your project replace all occurrences of <option name="SELECTED_BUILD_VARIANT" value="debug" />

New Flutter Project wizard not showing on Android Studio 3.0.1

别等时光非礼了梦想. 提交于 2020-06-22 05:28:24
问题 I installed Flutter following official document and also installed Flutter and Dart plugin on Android Studio. But, I can't see File>New Flutter Project wizard on Android Studio 3.0.1 I run "flutter doctor" command. See the below output. Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel beta, v0.1.5, on Mac OS X 10.13.3 17D102, locale en-TR) [✓] Android toolchain - develop for Android devices (Android SDK 27.0.3) [✓] iOS toolchain - develop for iOS devices (Xcode

Android Studio's git commit not seeing my modified files

我只是一个虾纸丫 提交于 2020-05-24 04:01:25
问题 I am more familiar with using git on the command line (MacOS, especially). However, I sometimes try to use the Android Studio VCS "commit", as it is sometimes slightly faster to use. The weird problem that I came across today is that Android's Studio git "commit" does not see my 4 modified files, whereas from the command line, git status shows clearly the 4 modified files. I have seen this Stack Overflow post and I have checked it is not for any of these reasons (like, not adding the file to

Android - Not able to get microseconds using java.time.Instant

浪子不回头ぞ 提交于 2020-05-14 10:14:33
问题 I am unable to get the microseconds using java.time.Instant (Instant.now()) from android. I am getting the date time without microseconds like 2020-04-10T12:43:40. 442Z from android But when I execute a independent java program, with the use of java.time.Instant (Instant.now()) I am getting the date time with microseconds like 2020-04-10T12:43:40. 442179Z It seems the issue is with java versions in android studio. Please help me to fix this issue. Note: I have installed Android Studio - 3.6.1

Android - Not able to get microseconds using java.time.Instant

情到浓时终转凉″ 提交于 2020-05-14 10:08:51
问题 I am unable to get the microseconds using java.time.Instant (Instant.now()) from android. I am getting the date time without microseconds like 2020-04-10T12:43:40. 442Z from android But when I execute a independent java program, with the use of java.time.Instant (Instant.now()) I am getting the date time with microseconds like 2020-04-10T12:43:40. 442179Z It seems the issue is with java versions in android studio. Please help me to fix this issue. Note: I have installed Android Studio - 3.6.1

Where is “Activity Manager State” in Android Studio 3?

拜拜、爱过 提交于 2020-05-11 05:22:56
问题 There was a very handy feature for debugging, that was present in Android studio 2.x, but currently is not there in 3.x. It was a bit hidden in the UI: Then it will prompt with detailed activity manager state: I know, that I can acquire that output with adb shell dumpsys activity top , I'm just curious whether it is possible to get the old functionality back? 回答1: As pointed out by Wojtek Kaliciński in a tweet: A bug is opened here. Update We apologize if this was inconvenient. The old

How to set click listener to LinearLayout using data binding

本秂侑毒 提交于 2020-05-10 18:44:12
问题 I am currently trying to set a click listener to a LinearLayout view in the .xml layout file using data binding. I have managed to get it to work well on other views like a Button or TextView , but for some reason it is not working with a LinearLayout . This is the bare bones of my attempts and I still cannot get it to work: <LinearLayout android:layout_width="match_parent" android:layout_height="72dp" android:clickable="true" android:focusable="true" android:onClick="@{action: