build.gradle

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,

Could not find com.android.tools.build:gradle:4.0.1 OR 4.0.0 OR any versions

我是研究僧i 提交于 2020-08-10 03:38:51
问题 Error : Could not find com.android.tools.build:gradle:4.0.1. Searched in the following locations: https://jcenter.bintray.com/com/android/tools/build/gradle/4.0.1/gradle-4.0.1.pom https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.0.1/gradle-4.0.1.pom Required by: project : Open File *** looks like google() and jcenter() are not working as expected.*** I migrated from android studio 2.3.3 to 4.0.1 and this error... what is my problem???? plz tell me if you need more

Could not find com.android.tools.build:gradle:4.0.1 OR 4.0.0 OR any versions

…衆ロ難τιáo~ 提交于 2020-08-10 03:38:01
问题 Error : Could not find com.android.tools.build:gradle:4.0.1. Searched in the following locations: https://jcenter.bintray.com/com/android/tools/build/gradle/4.0.1/gradle-4.0.1.pom https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.0.1/gradle-4.0.1.pom Required by: project : Open File *** looks like google() and jcenter() are not working as expected.*** I migrated from android studio 2.3.3 to 4.0.1 and this error... what is my problem???? plz tell me if you need more