I am new to development am building my first app. As I am getting closer to completion of the project I will need Android Studio... I have installed but it simply fails to launch. I have searched my options on various sources.
Fixes I have already tried:
Added disable.android.first.run=true in the idea file
Did a clean installation
Installed the latest version of Java
Did all of the above again as Admin just in case
Set the JAVA_HOME and JAVA_JRE and cmd %echo% came back with the correct path
There is one thing I noticed. When deleting the Google folder in my Roaming the program runs again but once I pick "Do not import settings" then the program creates this folder but pops the error.
I would post the error message but the error window comes blank.
Thank you in advance for any and all help!
Related
I cloned a project from git and built it in android studio without any problems but I don't have (Run app) in android studio and also when I run run-android I get this error:
Failed to launch emulator. Reason: No emulators found as an output of `emulator -list-avds`
but I can run my emulator from AVD manager!
I did every solutions that I found with search but they didn't work for me
For me, the reason was one of the following:
Gradle sync was in progress
Gradle sync had failed
For the second case, go to your top-level or app build file and click Try again or Sync button on the notification shown at the top of the file.
You could also just try to sync the IDE with Gradle with either of these buttons:
I faced a similar error. I was trying to import a built apk to profile it and ran into the scenario where the run button was grayed out.
Ultimately what worked. I went to File > Manage IDE Settings > Restore default settings.. and redid the android studio setup.
Note: Doing this will RESET the entire Android Studio and redownload everything.
1- Give the SDK path (to find the emulator path), Usually in User\YourUsername\AppData (is hidden by default)\Local\Android\Sdk. in File->Project structure, SDK location. Also the Java\Jdk path for (JDKs) and the path "...java\util\concurrent" exist
Do not reset the IDE Settings (because you need to reinstall a lot of things and it will not solve)
2 possibility - from File->Setting->Tools->Emulator to check the Launch in a tool window
3 possibility -
I think I'd tried everything to fix it but failed.
I've downloaded eclipse from here: http://www.eclipse.org/downloads/packages/eclipse-android-developers-includes-incubating-components/neonr
It's the latest eclipse package made to work with android app developing.
AND
I've downloaded and installed Android Sdk from:
https://dl.google.com/android/installer_r24.4.1-windows.exe
https://dl.google.com/android/android-sdk_r24.4.1-macosx.zip
That's right, both windows and mac versions.
My Android sdk looks like this.
And I created a new android application project, and I just open a pre-made layout xml file and as soon as I save a change I got this.
'Running Android Lint' has encountered a problem.
Failed
Detail:
Failed
java.lang.UnsupportedOperationException
So, here is the big question, how to fix android lint? Or at least point me the right direction, I've tried this on a PC and on a Mac, same problem.
Update: I know android studio and I've used it alot. Let's just say I have my reasons to pick up eclipse and make it work again.
It can be solved by turn off lint error check.
Click Window in Eclipse, select Preferences. Select Android -> Lint Error Checking on the left, and uncheck following checkboxes:
1.Run full error check when exporting app and abort if errors are found 2.When saving file check for error
For ref please check the screenshot I have attached:
I just updated from android studio 0.9 to 1.0 and now when i try to run my app everything goes well up to the point where it asks "choose device", then i select my note 4 and then issues error "Local path doesn't exist."
I am using 64bit windows
Also clicked on "Sync Project with Gradle files". The problem is still there!
App:
Waiting for device.
Target device: samsung-sm_...
Uploading file
local path: C:\MyApp\app\build\intermediates\classes\debug\app.apk
remote path: /data/local/tmp/com.example.MyApp
Local path doesn't exist.
Error Log:
11:32:40 AM Gradle build finished in 5 sec
11:32:43 AM Unexpected Error
Local path doesn't exist.
Local path doesn't exist.
The project may need to be synced with Gradle files.
Sync Project with Gradle files
Looks like an issue with APK_PATH, which for some reason can't be found..
You may try following the solutions from here or here.
Also, you may try updating your Gradle plugin to the latest version and rebuilding the project.
Did you import the file from an Unix system? The path slashes are different in each one. Try correcting the paths to match your current system.
I had got the same error.
And I cleaned and rebuild the project and
Project -> Clean Project/ Build Project
Synced the project using Gradle
Click on "Sync Project with Gradle files" in Event Log
And you should be good. Worked for me.
Check the Run/Debug Configurations you have.
Click on the icon that has the Android robot written app then click on Android Configuration. When you click on "app", you will see to the right, at the bottom there is "Before launch..." Make sure in the input box below that it says "Gradle-aware Make". If it doesn't, click on whatever it says and click the pencil icon just above it (it is for editing). In the dialog box that pops up, remove whatever command is there (sometimes it is to unistallAll before reinstalling the new updated apk) and click "Okay". When you come back, you will see the input box now has "Gradle-aware Make" which means when you build your app, it will just install it on top of what is there.
I had this issue because I was unistalling everything before installing the new apk but I once cut the process in the middle of this process after it unistalled but not reinstalled. This meant the next time I ran the app, it wanted to unistall but could not find the apk as it has been deleted before. Changed back the configuration like above and it worked.
My android project was compiling well but suddenly it stopped launching. Then I tried to launch other projects from Project Explorer and all project threw same exception:
An internal error occurred during: "Launching Project". java.lang.NullPointerException
But console always shows everything is normal.
Android Launch!
adb is running normally.
Performing com.mmcolrev.LoginActivity activity launch
Here's screenshot of error.
If anyone face this problem, first keep in mind that error is not in your code but due to some internal issue in eclipse ADT. I don't know exact problem but luckily found way to solve it. If you ever encounter this error follow steps below:
Exit Eclipse.
Go to Android workspace.
Locate .metadata folder(make sure you set hidden folder visibility on).
Delete .metedata folder.
Start Eclipse(you will notice project explorer is empty, don't panic) and import all your projects.
Removing Gen/R.java and restarting eclipse, worked for me.
This is a cause of AVD is not picked because you might delete it or it is not picked up correctly ... in other words deployment target is not specified or it has some problem in picking up a device.
To Resolve this:
Right click your project and choose "Properties"
From "Run/Debug" Settings, Highlight over your application name then hit "Edit..."
In "Target" tab, you have to choose a virtual device to be picked automatically under option named "Automatically pick compatible device..."
to avoid such prompt you could choose the first option "Always prompt to pick device" that will ask you everytime to choose or pick a device inside which you want to run your app.
If it still not working restart Eclipse
One cause of this issue for me was that I had been updating my Android Tools with the installer. It was running in the background doing all its updates. I had forgotten about it since I had told it to do the work in the background. Then realized it had finished its work and needed a restart after the installation.
Once the upgrade / installation was done and the IDE was restarted, the Eclipse environment went back to behaving as normal.
I had the same issue.
Non of my project in the workspace would run and I would get the same message "An internal error occurred..." and details would just say something about a Nullpointer. This happend after I did some updates and all projects in the workspace started giving the same issue.
It took me some time to find the problem:
When I go to configuration of the project (Run Configuration...) I could see that "Project" in the configuration settings was empty. So my update removed the projects from the configurations. Once I put back the project in the configuration again problem was gone.
In my case, it was because I was running it with Debug As -> Android Native Application, while the emulator was closed (I debugging on the emulator, not on a real phone).
I needed to first start the emulator using Debug As -> Android Application, after which Debug As -> Android Native Application will work.
Close the emulator and the error re-appears. My conclusion is that Debug As -> Android Native Application won't work unless the emulator is already started.
I had this error with an NDK project (eclipse mars, loaded an ant project) everytime i tried to lauch on the device (google tango yellowstone) using Debug As -> Android Native Application. Note, that i switched the device and changed a dependent library since the last successful build.
When i tried Debug As -> Android Application i got this message:
Re-installation failed due to different application signatures. You must perform a full uninstall of the application. WARNING: This will remove the application data!
Do you want to uninstall?
clicking OK here solved the issue, so Debug As -> Android Native Application also worked again.
I had the same issue all of a sudden. This only happened when I ran in Debug mode, and for me what fixed it was... Run -> Remove All Breakpoints. Then I could add them back, and it ran in debug mode fine.
To resolve this issue, I just remove the old JRE System Library and point to the new JRE System Library.
Got the similar issue after update the project able to procced.
Right click on the project -->Maven --> Update Project
In My case issue was java version in updating it to correct (11->1,8) and doing maven update helped me
ISSUE : Error: Could not find or load main class com.pluralsight.fundamentals.FundamentalsApplication
Caused by: java.lang.ClassNotFoundException: com.pluralsight.fundamentals.FundamentalsApplication
ANSWER:
Open cmd (Command prompt)
Check java version (java -version)
Open POM.xml and check java version there
You are getting this error, that means java version is mismatched.
Change the java version in POM.xml (example: if java 11 , add it as 1.11 in pom.xml file)
Example: <java.version>1.11</java.version>
Update Maven by right click on the on the project in eclipse
Now it will work and the error will be vanished :)
eclipse is working fine with importing a project which already exist. But i am facing problem while am creating a new project in the android.
And then am trying to change the path in the properties of the project which i have created then it is showing some kind of error and screen shot of it is
Can any one help me in this.
Assuming your d: drive is an actual hard drive you have the android-sdk in, and not some DVD/CD drive you tried installing the android-sdk from.
You should click on your new android project folder, right-click and click on "close unrelated projects", then the right files will get generated correctly (re-initiate a manual rebuild if you have to).
The problem was that Eclipse was trying to rebuild all the projects you had in your workspace, a number of which already contained errors in them. Not only those other projects were clogging up your error log, but when an error is detected by the packager/builder, the building process gets stopped entirely.
Now just in case this wasn't your only problem, do Help > Check updates
After that, click on the menu Window > AVD Manager and something
and make sure that you have the latest SDKs and AVD updates already installed.
Also be aware that Pulsar is not the recommended version of Eclipse for doing Android development, although this probably wasn't what was causing your problem.