Questions tagged [android-studio]

Use for questions about using Android Studio, an official IDE by Google targeted at Android app development. Do NOT use for questions about programming for Android in general; instead use the Android tag.

0
votes
0answers
2 views

Duplication of first message key on view when setOnRefreshListener is called

The probelm occurs when i use the swipeRefreshLayout to load all messages from database. If i type in a message and send it without using swiperefresh it will not cause any errors, it will only print ...
0
votes
0answers
3 views

How to fix fetching data from sql server into each fragment in tabs without creating number of fragments?

I am creating tabs and displaying list of items from mysql server.
0
votes
0answers
9 views

how to show BigPictureStyle Notification in android when app is in background while using firebase notifiaction?

I am using firebase notification. When app is in foreground onMessageReceived is called and Notification is visible with image (BigPictureStyle notification ). but when app is in killed state ...
-2
votes
1answer
7 views

app crashing on startup after creating apk

i was trying a new application on android studio and when i tried to run it so i can see how it looks, it crashed on startup. E/AndroidRuntime: FATAL EXCEPTION: main Process: com.elasmar....
0
votes
1answer
22 views

App crashes when pressing a button without reaching click event

In my Android Studio app, I've designed a screen (not using XML, but using design mode). I've set the attribute of one of my buttons to be a public method within the class. This is my button ...
1
vote
0answers
8 views

why is my BLE scanner didnt spot any device although i have apply location request?

i'm kinda new here and right now i'm trying to set up a basic BLE scanner app but the app does not spot my BLE module (im using the basic code on android development page). i have try to look up ...
0
votes
0answers
13 views

Raect native JS Files bundler not working

I have a react native project and when I change the code in the JS files and run the app the Metro Bundler is not working! Metro bundler stuck like this tried to deleted android.index.js file in the ...
0
votes
0answers
4 views

Unable to detect adb version, adb output ( in windows 7)

When the I click run button in Android studio... target window shows no device is connected. but actually I have enabled "USB debugging" and created another virtual device also. but none of them are ...
0
votes
0answers
9 views

app not running after installation , unfortunately has stopped

I have developed one app, it's working fine in most of android devices, but it's not in some other devices. I'm getting:unfortunately (app name) has stopped. It happenend with 2 or 3 devices only. ...
-2
votes
4answers
31 views

AlertDialog OnBackPressed() Not Working Properly

I've written the following code for simple Alert Dialog but Alert Dialog doesn't show up. API: 26 @Override public void onBackPressed() { super.onBackPressed(); AlertDialog.Builder ...
0
votes
1answer
27 views

How to serializable/parcelable Pair in Andorid Studios

I am trying to start a new Activity from main, the new activity requires NO information from the previous activity however it will send something back to the main activity, but that I have yet to ...
0
votes
1answer
17 views

Android Studio 3.4 - Error transformDexWithInstantRunSlicesApkForAwsDebug

Getting following error after upgrading to Android Studio 3.4 transformDexWithInstantRunSlicesApkForAwsDebug Can someone explain what would be the possible case for above issue?
-4
votes
1answer
38 views

JAVA Compiler error: class, interface, or enum expected [on hold]

I have been troubleshooting this program for hours trying several configurations, and have had no luck Help meh, why this error, its only giving meh error while building Code:- import android.os....
-5
votes
1answer
78 views

How to run an android application APK on IOS? [duplicate]

I am developing android application in android studio. I want that my application can run on IOS as well. what should i do ? I searched a lot on internet but can't got right or reliable answer.
0
votes
0answers
11 views

Executing python code in onclick event listener in Android Studio

I have tried InputStream and getting the absolute path of the "freqJournal.py" which I'm trying to run on an event click listener. Do you have any suggestions or ways which I can run my python code in ...
0
votes
1answer
28 views

Android studio can't insert data into mysql database cpanel

I try to insert data from android app into mysql database on cpanel using web server. I test the code from postman, data inserted to the db, but when i try to use the app, data can't insert. then i ...
0
votes
0answers
14 views

Exporting STATISTICA generated code to android java application

I am trying to build an Android application, which uses neural networks. I've got nice accuracy with STATISTICA Automated Neural Networks software. As it has "Generate code" function, I tried to ...
1
vote
1answer
10 views

proguard-rules.pro does not seem to work with R8

I upgraded my Android Studio to 3.4 earlier today, and I am using the default shrinker R8 for the first time. I copied the contents of proguard-project.txt of a library project to its proguard-rules....
0
votes
1answer
13 views

Remove an MainActivity created by Android Studio

How can edit the manifest so the MainActivity is removed? I've been following some tutorials to learn to create android apps and I've got stuck in the Activity subject. When I create a project the ...
1
vote
0answers
30 views

Error related to resources_ap after upgrading to Android Studio 3.4

I upgraded Android Studio 3.4 today. I am no longer able to run the the app. I have cleaned the project, restarted Android studio many times. I have also invalidated cache to no avail. I am ...
-2
votes
0answers
15 views

How to fix app crashing on some android devices [on hold]

I cannot work out why my app is crashing on some devices and not others. It also changes the display on some where the card size and text is wrong. I have attached the error on google play from one of ...
-1
votes
0answers
13 views

How add array list switches in a simple listView?

This is the code the I try to show switches in simple listView nothing appear but if I set a simple textview the value is showed correctly. Can anyone help me? I've used a simple code for listview ...
0
votes
0answers
16 views

How to fix 'error: not well-formed (invalid token)' in android studio [duplicate]

A textView in my android studio layout causes compilation errors. The error disappears when i remove this textView According to the accepted answer in error: Error parsing XML: not well-formed (...
0
votes
2answers
22 views

Could not get the Download path

I am downloading a pdf file using URL with DownloadManager. The file is downloading successfully, with the provided link/URL. The status is also visible in notifications, and after downloading, pdf ...
0
votes
1answer
18 views

How to fix gradle build error A problem occurred configuring root project?

Every time I try to build a project this happens. Android studio version 3.4 Gradle sync fails at configure build For some reason it can not get resource at the url. But I can download the file from ...
-1
votes
0answers
10 views

Stacking Images

I am trying to overlay an image that has partial transparency over another image that would act as the background, this is so it background can be changed. I would really like the background(red part) ...
0
votes
0answers
15 views

Gradle keeps failing to sync when i try to add firebase on Android studio

I was trying to add firebase to a new project but I keep getting an error because Gradle failed to sync: PS; I'm new to SO sorry if my formatting was wrong Errors: Cause:org.jetbrains.plugins....
0
votes
0answers
9 views

Gradle won't sync with nxp nfc library

After moving to linux env (arch) I can't build my project based on NFC working with NXP library (Mifare cards). Building process fails on gradle sync. Android Studio 3.4 Gradle plugin 3.4.0 Gradle ...
-1
votes
1answer
25 views

Hi I want to know about android layout design, can you write all of the screen size value for smallest width?

I have project and inside there is layout resources but I wanna support all screen size, already I'm supporting sw330,sw480,sw720,sw240 , I need other size ? can you write I couldn't find developer's ...
0
votes
1answer
12 views

How can I convert Otaliastudios Frame object into OpenCV Mat object?

I am using com.otaliastudios.cameraview.CameraView component from otaliastudios Library. I need to convert some of the frames to Mat objects to process using OpenCV. How can I convert Otaliastudios ...
0
votes
1answer
24 views

Cannot Get SQLite To Load In Navigation Drawer Fragment

So I am nearing the end of my course on Android Studio and unfortunately ran into issues with connecting a DB to an app. Basically, by using a navigation drawer layout, I'm to display a simple ...
-1
votes
0answers
16 views

Why aren't the buttons and texts showing up on the xml file?

The problem comes from when I'm trying to interact with my design(only the gray area with android...ConstraintLayout appears ). I'm getting started with android studio, and I have a some experience ...
0
votes
0answers
8 views

Mediaplayer encounter problems, the music does not load or the music is jerking

I made an application to listen to music via an icecast2 stream. And then encounter problems, maybe the music does not load or the music is jerking. As with some mobile phones, the model that I tested ...
-1
votes
0answers
12 views

Unfortunately, “project-title” has stopped on device

This is my first time using Android Studio. After ruining my code it stuck. This the error I got : E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.androidnotification, PID: 25032 ...
0
votes
0answers
5 views

Block Personal profile so only work profile can be used

I am making a device manager app that blocks your personal profile for a set amount of time so only applications in the "work" profile would be able to launch to specific apps for homework. Is there a ...
0
votes
0answers
9 views

App freezes or softlocks after a while of redrawing a custom view

I wrote a custom view that draw a graph and I force it to redraw using invalidate every 20ms. Very inconsitently, after a while, sometimes the app stops responding to inputs. The graph will continue ...
-1
votes
0answers
56 views

Text appearance, inside TextView and CardView

When I use TextView to display a text, and set the background color for a example to grey, then the displayed text looks absorbed by this background color. So my idea was to add the TextView to ...
0
votes
0answers
12 views

Logging into and retrieving data from a website using a “post” request on JSoup

I am trying to create an App that logs into my schoool's grade servers and displays data. The website I am trying to log into is: "https://portal.mcpsmd.org/public/" I have written my code according ...
0
votes
1answer
36 views

“Manifest merger failed with multiple errors” after updating android studio from 3.2.2 to 3.4.0

org.gradle.execution.MultipleBuildFailures: Build completed with 1 failures. at org.gradle.initialization.DefaultGradleLauncher$ExecuteTasks.run(DefaultGradleLauncher.java:386) at org.gradle....
-2
votes
0answers
7 views

How to add sendMessage() function in Java?

i am using https://developer.android.com/training/basics/firstapp/starting-activity for learning but there is stuck for me that sendMessage() is not properly written by me so can you help me in this ...
-2
votes
2answers
28 views

How to auto crop after camera

I want to take a picture from camera then doing auto crop once image captured. Is there an example of source code? I feel hard to find the example
0
votes
0answers
28 views

Getting past a login page in order to webscrape using JSoup

Sorry in advance if I am going about this completely wrong, as I am very new to jSoup. I am trying to login to my school's grade website in order scrape grade data from it and display it in a program....
0
votes
3answers
78 views

Kotlin: Why should 'return' be lifted out of 'if'? (Recommended by Android studio)

The following code (simplified example): /** Determine if a is less than 15 and b is more than 15. **/ fun isFifteenBetween(val a: Int, val b: Int) { if((a < 15) && (b > 15)) { ...
0
votes
2answers
29 views

Building project: outOfMemory (Android studio 3.4)

I've upgraded Android Studio 3.x to 3.4 (with Grade plugin), and now, the build of my project is very very very long, and there is a final error (after 4-5mins of building): > Task :app:...
0
votes
0answers
17 views

Enabling ProGuard for a single module in a 2 module project

Assuming I have an Android library project (named X) which I use to create an AAR file for later use, can I have this structure below? Project X Module A proguard disabled ...
0
votes
0answers
18 views

Android settings have errors, Qt Creator 4.8.1

Here's the settings for Devices => Android, on Qt Creator 4.8.1: When I click on YES nothing happens. My sdk packages are as follows: And this is the list of SDK Tools: Is there a way to solve ...
0
votes
0answers
14 views

In android Studio Alt+Enter or Control+I for Implementation is not working

I update android studio with version 3.4. it was working fine but the problem with of implementation, for example, I have just used an interface in class and after that, I have to click interface for ...
0
votes
1answer
15 views

Getting different diagnostic result with flutter doctor command

I have started my first project with Flutter. I have reviewed some flutter documentation as well as checked some examples. I have created one sample project and while I am going to run this project ...
-3
votes
1answer
28 views

Full Screen Notification [on hold]

I want to make App Like Uber But I Don't know how to make full screen notification,When Driver receiver new Request a new Screen Pop up that will show timer ,accept , reject button. even when ...
0
votes
0answers
11 views

Android Studio 3.4 waiting for application to come online

Since upgrading to AS 3.4 I can no longer debug any of my apps. I have made no changes to any of the projects, I just upgraded AS. Now all I get is "Waiting for application to come online". When I ...