Android Studio Edit Configurations doesn't display my app - android

I want to run my app, but the run button is disabled. When I go in Edit Configurations where I should see "Android Application-->app" I only see the Defaults. Everything was fine 2 hours ago, but I kept working on my project and when I wanted to test it I noticed that I can't. What may have caused this and how do I solve it? I tried to search for a solution, but I couldn't find one.

Close any emulator if open and then reopen your project, maybe it shows.

Related

Android, Gradle lock file issue

Android Gradle Lock File Exception
I am working an Android project and i am using Kotlin for development , İ did some changes and closed the project and other day when i come and open the Project again , i got issue like this
Could not create parent directory for lock file C:\Program Files\Java\jdk-19\wrapper\dists\gradle-7.4-bin\c0gwcg53nkjbqw7r0h0umtfvt\gradle-7.4-bin.zip.lck
I have searched lot of site and i found nothing ,
There was a same question in the Stack Overflow but answers doesn’t work so i create again for,
If you have time and could give me some solution or ideas , i will so glad , thank your time
Enter this menu
then in the SDK Location menu as shown in the screenshot
you press the place where there is a red line
When you enter this menu, select the location where all versions of Gradle are stored, then in the "Use Gradle From" field, select what is in the screenshot
I figured out ,
the solution is run as administrator ,When you do it problem goes away

Xamarin Android deployment not using the latest code?

I'm creating an Android app in Visual Studio. When I create the aligned APK to side load on my device (from the Tools -> Android -> Publish Android App), it installs and runs, but doesn't seem to have the very latest changes. The series of events I've experienced is as follows:
Installed a version of the app on my device
Updated a color on the login page and set the application theme (among other things)
Re-installed the app
Saw the new theme but not the new color on the login page
Made a random text change on the login page as a test
Re-installed the app
Saw the color change but not the random text change?!
Any suggestions on what I might be doing wrong?
I have experienced similar issues, my go to for fixing this issue has been the following
Clean all projects.
Build all projects (especially the project containing the xcml files).
Delete (remove application) from the device.
If for some reason this doesn't solve the problem, typically a full restart of Xamarin Studio or Visual Studio does.
I have a similar weird problem where old code from only a single project doesn't get updated. All other projects do get updated/deployed. It only happens on a single emulator, only in Debug mode, and only for that one project.
Cleaning+rebuilding the entire solution did not work. However, telling VS to rebuild the individual project does.
Why doesn't rebuilding the solution rebuild the project? I have no freakin' clue, but I can consistently reproduce this issue and workaround.
In my case, I had a similar problem with connected device, and no one proposed solution like Clean\Rebuild\Restart\Reinstall\etc could help me.
At the same time on the AVD everything worked perfectly, latest code deployed ok.
I found that asked issue depended on selected settings in the [USB Developer] section on the connected device (mine was Xiaomi smartphone). Because some vendors provide us with too many security settings...
What I found, you have to turn on both USB Debugging & USB debugging (Security settings), and turn off MIUI Optimization (it's true for Xiaomi vendor, but you can check your device for similar options). Hope this helps.

How to deploy an app to mobile after adding AndroidManifest.xml to Project

My problem is, that I can't seem to deploy my app to my phone (galaxy s4) or the emulator anymore, after adding the AndroidManifest.xml to the project.
I have been working on this app for 1 or 2 days, never had a problem testing it on my phone. I wanted to add the App Icon and change the app display name and found out that it had to be done over the AndroidManifest.xml file. So after finally finding where to add it in the QtCreator, I added an Icon and changed the name. When I click deploy, it loads and then the bar turns red, without ANY error messages or nothing. It just goes red full and then goes away. Even the warnings from build are not even showing.
I hope you guys can help me, this is my first question, so if I forgot any information or asked the question wrong, please let me know :)
You need dirqml2sdk debugger libaries (if your OS is windows). You can download it from here.

absolute beginner opening my first app in eclipse, what file to open

Hi I know this is a real silly question but I am following the instructions to create an app for android. Im currently here... http://developer.android.com/training/basics/firstapp/running-app.html
Ive already set up my first app as per instuctions, Ive enabled debugging on my phone, but now Im unsure what file to open in eclipse before clicking "Run as"-> "Android Application".
Any help would be great thanks
You don't need to open or close any file(s) for running the app, just make sure the project you want to run is selected in the project explorer on the left side. But I assume that you only have one project at this time so everything should work as expected
EDIT
If you want to test your app on a real device from Eclipse, make sure the required device drivers are installed. You can go to Run -> Run Configurations -> target and check if your device is listed. In case that is not, some drivers are missing.
Select your MainActivity and click run. It will prompt a box where you can choose weather you want to run in device or in emulator.
To run in real device See my post. It will help you.

Android Emulator Debugging, Code will not Update

I'm having a troubling problem testing some code for and Android app. My app has two parts, and activity where the user changes some settings, and a broadcast receiver that responds to SMS messages, both in the same package.
Here's the problem, I first implemented some simple code to test out the broadcast receiver and the activity, and both worked fine. But then as I tried to refine the code, I noticed the emulator wasn't picking up any of my changes. Event went so far as to uninstall the app from the emulator and try again, no luck. Then I added some extra Toast popups to my receiver, nothing, still running the old code. I know its running the old code because its sending out an SMS using a string constant that is no longer in the current code, so it should be impossible that it respond with that value.
Here's the kicker that has me confused. For fun I made a change to my activity. Ran the project from Eclipse and that change showed up! Tried to test the receiver code again, runs the old code that doesn't even exist anymore!!
How in the world can half the package update, and the other half not?
Can anyone help me out 'cause I'm about ready to lose my mind.
I had a similar problem. Changes made to classes imported from another project didn't get picked up by eclipse, but those made to classes in the current android project were.
Making a change to the current android project (inserting a blank line and deleting it) seemed to make eclipse pick up all the changes made and upload the app to the emulator.
I had this problem too, Now I found a working solution. Just follow these steps:
Run your project normally.
When emulator started, run your project again (DO NOT close the first emulator)
Then the updated application will be uploaded into emulator
I can't really be sure what happened but creating an new emulator image appeared to solve the issue.
I don't know why it happens but it's a problem I have all the time.
What I typically do is
Close the emulator
Close Eclipse
Reopen Eclipse
Clean the projects (in Eclipse, select Project -> Clean... -> Clean all projects)
Rerun the emulator
Annoying as hell but seems to work for me.
I'm having this problem too. It mostly happens when errors are entered into the code. The strange thing is if I go back to the original code, Eclipse doesn't revert to the original code. One thing that seems to help is to temporary delete the contents of a file, save, and rebuild, and then enter the contents back into the file, save, and rebuild.
How is one supposed to debug in such an environment?

Categories

Resources