android-studio

Use support library in android projects and library (Android Studio)

坚强是说给别人听的谎言 提交于 2020-01-06 07:45:17
问题 I'm using the new Android Studio, I'm looking for a way to use the support library from multiple projects. Basically I have a project that uses the ActionBarSherlock this projects requires the support library. So I added a reference as like in this question. Now I have the problem that my main project also uses the support library so I have it includes twice in some way. If I remove the library from one of both projects I'll get errors that some support library related classes are unknown

compileSdkVersion matches sdk version but “unsupported version of Gradle”

做~自己de王妃 提交于 2020-01-06 07:43:29
问题 With the following specs in thee app/build.gradle compileSdkVersion 25 buildToolsVersion "25.0.3" defaultConfig { applicationId "ir.iiscenter.shub" minSdkVersion 16 targetSdkVersion 25 versionCode 25 versionName "2.6.7" vectorDrawables.useSupportLibrary = true testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } And the sdk 25 (Android 7) installed I get the following error by running "Build APK" The project is using an unsupported version of Gradle. Please point to a

How can i fix this? “Method invocation 'isEmailVerified' may produce 'java.lang.NullPointerException'” [duplicate]

不问归期 提交于 2020-01-06 07:43:04
问题 This question already has answers here : What is a NullPointerException, and how do I fix it? (12 answers) Closed last year . I tried to solve it but I can not do anything, I always get the NPE even with the try and catch, I do not know what else to do, please some help, what is the correct way to remove the npe? What should I put? try{ if(user.isEmailVerified()){ Log.d(TAG, "onComplete: success. email is verified."); Intent intent = new Intent(LoginActivity.this, HomeActivity.class);

Cannot cancel fileDownloadTask on cancel Button click

只愿长相守 提交于 2020-01-06 07:19:08
问题 I am downloading many images from firebase one by one by download() function with the progress dialog. For that, I made on the list of FileDownloadTask . Now I want to cancel the download for remaining images on cancel button click for that I implemented the method in OnClickListener as shown in the code but It won't work and images are going to continue downloading. List<FileDownloadTask> downloadTaskList = new ArrayList<>(); protected void download() throws IOException, JSONException {

how to populate multiple data in a listview with more than one textview?

佐手、 提交于 2020-01-06 07:17:37
问题 I am new to android. I am working at a project and i have a question. How can i take data from a ArrayList<the_class> and populate them to a listview ? There is an xml file that contains 6 textviews that must be filled with the context of the class items. Thank you <LinearLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingLeft="10dp"> <LinearLayout android:orientation="horizontal" android:layout_width="wrap_content"

how to populate multiple data in a listview with more than one textview?

℡╲_俬逩灬. 提交于 2020-01-06 07:17:27
问题 I am new to android. I am working at a project and i have a question. How can i take data from a ArrayList<the_class> and populate them to a listview ? There is an xml file that contains 6 textviews that must be filled with the context of the class items. Thank you <LinearLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingLeft="10dp"> <LinearLayout android:orientation="horizontal" android:layout_width="wrap_content"

Why doesn't the layout design preview get displayed on my Android Studio?

为君一笑 提交于 2020-01-06 07:10:37
问题 I don't know if it's me or something but I can't place a simple text or a button in design mode in Android Studio If it helps, this is the code: <android.support.constraint.ConstraintLayout 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" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <Button android:id="@+id/button2" style="

Remove the last plotted line from Google Map Android

让人想犯罪 __ 提交于 2020-01-06 06:59:09
问题 I have the following code which adds a PolylineOptions object to a Polyline array list. The argument passed in is a series of points returned from a query to the Directions API. List<Polyline> polylines = new ArrayList<Polyline>(); public void drawPolylines(List<List<HashMap<String, String>>> result) { PolylineOptions lineOptions = null; // Traversing through all the routes for (int i = 0; i < result.size(); i++) { lineOptions = new PolylineOptions(); // Fetching i-th route List<HashMap

Error converting bytecode to dex: Multiple dex files, Android Studio 3.0

早过忘川 提交于 2020-01-06 06:55:53
问题 I recently upgraded to Android Studio 3.0, and while running the program I get the following error: Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/vuforia/TransformModel; Error:com.android.dex.DexException: Multiple dex files define Lcom/vuforia/TransformModel; Error: at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:661) Error: at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:616) Error: at com

Android Studio - Genymotion - VirtualBox Do not work

陌路散爱 提交于 2020-01-06 06:51:36
问题 I am a newbie in Android dev. My android studio worked well before, I am not sure why it happened like this a few days ago after my Windows 10 updated. -> In Android Studio, it shows no connected device and no debuggable process. -> In genymotion, when i try to run a device, there is a pop up like this -> In VirtualBox, as this pic I tried some ways such as change IP address in Virtualbox or check the "Virtualbox NDIS6 Bridged NetWorking Centre" but they could not fix my problems even I