In my android studio deployment target screen is not coming after I updated my gradle. When I click on run button nothing is coming only one msg is showing on down message bar is "run selected configuration". I am stuck here like two hours tried with version changing of gradle and all but still facing the same issue. Please if anyone has any solution to this, help me.
I found the answer to my question, actually, my adb.exe file was not showing the SDK-platform tools. That's the main reason why deploy target screen is not working. Now I uninstalled and install again platform-tools. It is working fine now.
Related
When I launch emulator in Android Studio through AVD, it keeps on having this annoying popup "unable to locate avd".
I'ved removed platform tools and reinstall it under SDK Manager->SDK Tools->Android SDK platform-tools so that its a new avd.exe but it doesnt help.
I am really clueless now how, I would like adb prints coming from the emulator to debug. How can I solve this ?
FYI, I am developing flutter on Android Studio 4.0
I had the same issue as you were facing, I have Researched the Whole Internet but found nothing useful. So, I somehow figured out the problem and fixed it, The problem is at
app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
Whenever we create a new project due to some reason the Module SDK is not set up automatically. Thus the ADB manager was throwing an error 'Unable to locate AVD', which is not that fatal as the error/warning is not stopping us from launching /starting the emulator, but it is so annoying to see that pop-up box. So here is my simple and quick fix.
Solution:
Click on the project folder, tap the dropdown icon just beside it.
Now Navigate to the path below.
> android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
Now Click on the file GeneratedPluginRegistrant.java to open it.
Once it is open, At the Top you will notice a bar that says 'Module SDK is not defined',
Now right against it, you will also see a hyper-text named 'Setup SDK', Just Click on it.
That will open a Pop-up Box with the title 'Select project SDK'.
Now select the Android Platform API and then click OK. After that being done Restart your IDE.
Your Problem will be Solved. And you will also notice that Emulator Opens up way faster than before.
NOTE:
The Above Steps has to be performed with every new flutter project.
I have attached some screenshots just follow them.
The Problem
The Below image represents the annoying Popup-box that you encounter while launching the AVD which we are going to fix.
Step 1 : Close the AVD window
Step 2: Navigate to GeneratedPluginRegistrant.java
Step 3: Look for Module SDK not Defined
Step 4: Against to Module SDK click on Setup SDK hyper-text.
Step 5: Select any Android SDK version
Step 6: Click OK
Step 7: Restart Android Studio IDE.
After Restart you wont see the Annoying popup box anymore.
I have also Uploaded a Youtube Video for you. Check that out as well.
https://www.youtube.com/watch?v=19ESTnrmYJY&feature=youtu.be
This may seem very basic but start with a full system restart,
Where did you install the SDK's & AVD(Default Directories).
Do you have the same issue when you plug in your own Physical Device.
Ensure you have enabled USB Debugging for step 2.
If possible walk us through the installation steps so we can identify any possible errors you may have made
I've had the same issue and it took a while to figure out what's wrong, but in the end, it was a storage problem, just check if you have couple of gigs (at least 5gb) of free space left where you have your avd installed. That fixed it for me.
Try this.
Copy platform-tools address and paste it in environment variable in path.
C:\Users\viram\AppData\Local\Android\Sdk\platform-tools
hope this works.
I will answer this myself as this was how it was solved.
open a native android project, and then adb works.
This looks like a bug in flutter.
When I try to run my app (my first test) for the first time, the green button shows up but the emulator does not run my app, it only works (the emulator) , and when I try again the green button( RUN) does not work.
Anyone can help ?
In my case I tapped on the "Make Project" button (the hammer icon) and then the run button worked
I know this is an old question but some other people can still have the same issue.
I was getting the same error, and a log message somewhere said me adb wasn't found. After reinstalling platform-tools it got solved.
So try opening SDK Manager from Tools -> SDK Manager, go to SDK Tools tab and uncheck Android SDK Platform-Tools. After applying changes install it again.
Invalidate cashe and restart worked for me
Have you made sure you unlocked the emulator? By unlock I mean like how a phone screen is locked, the emulator does the same thing.
Background to problem and how it all started:
I suddenly and without warning had errors related to plugins. Specifically, firebase services and firebase testing plugins not enabled. Result, could not open my project.
After lengthy research and struggle I was finally able to enable these plugins (along with others)through a miracle and opened my project BUT a new problem has now emerged.
Now the run app button for the emulator is greyed out. If i try to go to the top and click on: RUN APP ==> the "run green" button is also greyed out here (along with "debug" and "Run with coverage".
When I open a recent project in Android Studio in a new window the emulator run button is visible and I can open the Emulator without any problems. It's only suddenly this one project. It's been working just fine until now.
I updated Android Studio just prior to this as it requested it. I am using Android Studio 2.2.1.
Any suggestions highly appreciated, thanks in advance
For anyone else that has this problem the solution is found on Youtube at below link. Thanks to the uploader of this video. Saved my day!
youtube.com/watch?v=o1ApErUGZ_M
Its weird but it worked.
Just deselect and select again those two plugins .
Click Ok.
It will prompt for restart. Click Restart.
It works!
I have recently updated my ADT and it is now ADT_V20. I have also updated my SDK platform tools as well. But I am not able to create new Project through Project wizard from Eclipse.
I have Eclipse Helios latest version. and It was working well with old ADT versions.
In the project wizard I have reached upto Install Dependencies screen, where "Next" and "Finish" buttons are disabled. I have tried to "Install/Upgrade" new version as shown in the wizard and that process is completed successfully . Still I am not getting "Next" or "Finish" buttons enabled.
This same thing happens on the other PCs as well.
Could anybody please help me ?
Thanks
Looks like you can get around this issue by uninstalling the Support library from the SDK manager, then reinstalling at the prompt in the wizard. I had the same problem you did, and this solution worked for me.
Source: http://code.google.com/p/android/issues/detail?id=33859
In the new Android Project Wizard on the second screen where is says "Select whether to create an activity, and if so, what kind of activity"
Simple un-check the Create Activity, A new Blank Activity will be enabled to be created. -
Click Finish.
They might push a fix for the issue you have highlighted soon.
I have come across some more issues related to Ant build.xml not able to find "com.android.ant.NewSetupTask" due to this upgrade to ADT20
After installing ADT version 20, I have this problem creating a 1.6/API 8 project now that the newer (version 20) SDK is installed.
Would one of the experts try creating this even WITHOUT the 'activity' please?
I cannot complete with the blank activity checked (due to the missing API 8, which tries to install the already installed API 9 when asked to update), NOR can I complete with NO activity selected.
In the latter case, i.e., uncheck the create Activity box, the Finish button appears, creates the project partially, but not one that will build (as the older versions would do even with an old API.
Also, there is no actual indication that the "Finish" has worked -- you must look over in the browse pane to see the new project even though the dialog remains.
If any of the above did n't solved your problem please do one thing, try DELETING org.apache.log4j_1.2.17.jar from eclipse/plugin directory !!!!
In MACOSX, with Eclipse Helios IDE, this solution didn't work for me. I solved the problem uninstalling the components by the SDK tools and installing them again by the same SDK manager. I tried to reinstall the components by the same new project dialog, but didn't work for me, my only solution was that, uninstalling and reinstalling from sdk manager.
I hope this solution works for you :)
My solution is that I found out that Android Support Library was not installed on my computer (I didn't even have an Android folder under extras/. I ran the SDK Manager as Administrator, selected this and installed it. Then I tried creating a new project and I got the same error. I clicked Install/Upgrade and the Finish button became enabled. The next time I created a new project, I didn't get this error.
In my case the app had been created, but I didn't see it as it was completely obsqured by the welcome splash screen. When I didn't see it, I tried to create the app again, and it was failing to finish silently. Only when I ventured to close the splash screen did all become clear.
Im Very new to android development.
Im following this guide: http://www.vogella.de/articles/Android/article.html#overview
for some reason, any change in my application is not reflected unless i restart eclipse.
It doesnt matter if i uninstall the app using ADB, the emulator itselt.
I clicked "refresh" and run numerous times but not avail.
I completely changed the layout everytime but I had to restart eclipse itself (not the adt) in order for it to reflect changes.
Am I missing something here? thanks.
Eclipse 3.6.2 on Windows7 64bit
Right click on the project name in Eclipse, select Run As.., Android Application. Then you should see a pop up window showing the running Emulators. Select one from the list, and click Ok.
Also make sure your app doesn't have any compile errors, as that could definitley screw things up.
After trying to run, check the Eclipse console and it should say "Uploading yourapp.apk to Device..." or something. And it should launch the app on the Emulator. Look for any errors in the Console as well.
I had the same problem and worked around by changing or removing android:id attribute of a root element (typically viewgroup). I have Eclipse SDK 3.7.0 running Win7 64bit
Hope this helps