Cannot open an existing project in Netbeans - android

I'm using Netbeans 7.0.1 in my computer, I've already created several projects in that same machine, then after installing/adding plugins for Android, I could not open any project in that same machine. How do I make my netbeans open my existing projects again? Do you think the installation./addition of plugins has something to do with the matter? Do I need to remove all the changes that I made? How?
And I forgot to mention, Whenever I try to "Open Project" it will show a window which displays the location of the projects, this gives me the idea to go to "My documents\NetBeansProject\ProjectName", however, when I click the project that I want (e.g GenReport) in the textbox (the label is Titled 'Project Name' ), this is shown --
unrecognized project;missing plug-in?

Try using create new project from existing resources.

As dumb as this may sound, take your project directory, Zip it up and then choose File >Import Project > From Zip. That should get you back into your files.

This happened to me because NetBeans did not have HTML5 plugin isntalled (after I got a new version of NetBeans). What do you know -- the error message was telling me exactly what was wrong!

Just use File>Open project, then browse to the root of your exisiting project. It will be detected as an android project as long as you have the nbandroid plugin installed.

Related

I can't find the Image Asset option in Android studio

I started learning App development in Android Studio, using the Flutter UI toolkit. Everything seems fine, however when i want to create a New Image Asset to edit my app's icon, i can't find it. When i right-click the android/app/src/main/res folder, it does not appear within New. I am following some older tutorials and they all have that option there.
This is what comes up:
My version of Android Studio is:
And my version of Flutter is: 2.8.1 (Dart 2.15.1)
How can i fix this, or are there any alternatives for modifying my app's icon?
Does it work for you? If that doesn't work, try right-clicking the drawable folder and selecting "New" -> "Image Asset".
Try to do the following:
Right click on res directory -> Choose Mark Directory as -> Resources root
If it is not working, try to change file view to Android:
I got it to come up when I right click on the root node of the project (a flutter project) and selected flutter -> Open Android module in Android Studio
Then I was able to right click the res folder and clicked on new -> Image Asset
Ah, I've seen this before as you're using Flutter. Despite all the answers, I'd recommend you to right-click the android/ folder from your Flutter app root and select Mark as... > Project Root, then close and reopen the project in Android Studio.
If Android finally recognizes this as an Android project, it will take a long, long time to download some of the project's dependencies (in which some of them are already downloaded through flutter pub get and flutter run/build. After it's ready, the project files will be finally available for you, including the option to launch the Image Asset Studio.
Update To Latest Version Frist.
Android Studio Dolphin | 2021.3.1 Patch 1
Visit https://developer.android.com/ And Download Manually And Install.
After You Can Find Res/New_resources_deirectory/midmap
It's Very Simple.
#Android_Studio
For Flutter users: If you created the Android project via flutter create, make sure to open the Android Studio project in the android subfolder, not the one in the root folder. Then, Android Studio should automatically run gradle. Once this has finished (which can take quite some time on the first run), the Android Studio UI should automatically switch to the "Android View", and the "New > Image Asset" option should become available for the res folder. No need to manually mark anything.
Just make sure that gradle runs through, otherwise the real "Android View" won't be available, even if it is selected.
I have faced same issue and this suggestion really helped me. Hope this will help you too.
https://stackoverflow.com/a/66773774/20910266
To me the key point is this:
"don't open the whole project of flutter using Android studio just open the android folder found inside the flutter project with Android studio, so the Android studio can treat it as a Android project rather than flutter project, which will give you all Android features like the one ur looking for #image asset studio".

Exported Eclipse Android project won't run from Android Studio

I followed googles instructions and exported a test project from Eclipse by using the
Export -> Generate Gradle build files
opened up Android Studio and imported. After getting my support libraries working properly my project would compile with out any errors. My problem started when I tried to run the app on my device. When ever I try to run the app it directs me to use an AVD, never giving me the option to select my device. I obliged, created a new AVD but to no avail only to get build failed error. (I'll add the exact error when I can) NOTE: I can see my device is connected by clicking on "(6)Android" and the bottom left of the screen. I do see all logcat messages in verbose. I added android:debuggable="true"to my manifest but still nothing.
Confused I created a new project directly from Android Studio, hit run and bingo,...it gave me the option to use my device to run it or an AVD. Selecting either results in a successful launch of the dummy "Hello World" app. I think it may have something to do with build variants as my imported project doesn't specify "debug" vs "release" while the Android Studio generated project does.
Anyone else experiencing this?
I found the answer to my own question. Bit of a double whammy. Before installing Android Studio I updated my SDK via Eclipse (as recommended/required by google). Turns out by doing so a few items in my current projects got disconnected. ie. build paths, dependencies, ect. (you now have to place external Jar's in the src/libs folder)
Here is what I did to fix it.
In Eclipse, Preferences -> Java Built Path ->"Order and Export" tab. Make sure items are selected
If you have external Jars, manually copy and paste the jar in the libs folder of the project. (I did this in my Finder)
confirm the project launches via Eclipse
If it runs, export the project again by "Generate Gradle build files" (confirm overwriting existing files, if any)
5.Open Android Studio and re-import the project. Again, confirming overwriting of any existing files.
6.Next to the run bottom at the top of the screen click on the drop down next to your project name. Click "Edit Configurations..." and select "show chooser dialog" if not already selected.
clicked ok to exit,..and PRESTO!!! I finally have a successful project migration.
Hope this saves someone else time.
Cheers!
Yeah i have experienced similar stuff on Eclipse, its quite buggy. Since Android studio is based on it i would expect everything. Still the best solution to everything is to reload project, refresh project or restart IDE.

How to create a new PhoneGap Android project in Eclipse "Juno" on Mac?

I recently reinstalled my OS, and used to have a PhoneGap / Android project. Now I want to use it again, so I reinstalled Eclipse and the ADT plug in. So far so good. Now the instructions say:
"Choose New > Android Project"
However, Android Project doesn't show up under new projects, like it used to.
http://www.adobe.com/devnet/html5/articles/getting-started-with-phonegap-in-eclipse-for-android.html
I downloaded phonegap-2.6.0, but perhaps it isn't connected to Eclipse... what do I do at this stage to get Android Project to show up?
If there is no 'Android Project' under the menu it is not about PhoneGap it is maybe about ADT, are you sure you installed it correctly ?
And, also you can create Android Project with PhoneGap by using 'command line', then you just go to the same menu:" New > Project " then choose Android Project with existing source choose the path you created before by command line and that's it.
edit1: Make sure you locate true directory for 'android-sdk-mac_x86'
edit2:this is how you create Android project by using Terminal
/path/to/cordova-android/bin/create /path/to/my_new_cordova_project com.example.cordova_project_name CordovaProjectName
I had a similar problem. For me, Eclipse wouldn't respond when I clicked Finish when importing source from a phonegap project.
I later found that I had mentioned an incorrect path to the android-sdk.
Check if that is your problem.
If it is, here is how you change it:
In Eclipse IDE, click on the Window menu and then Preferences.
A pop-up will be opened.
On the left pane, click on Android (click on it, not on the + sign beside it).
In the field SDK Location, click Browse and point to the location of your android-sdk.
You are done!
Hope that helped.
EDIT:
I am using Eclipse Juno, but the options must hopefully be pretty much the same for other versions too. Please comment if this is incorrect.

Can't checkout an android project in STS 2.9.1 and Subversive on Windows 7

The problem
I have a strange problem with SpringSource Tool Suite 2.9.1 Release and Subversive plugin, running on Windows 7 Home Premium x64. I'm trying to checkout an android project from an SVN repository.
Here's what I'm doing:
File > Import > SVN > Project From SVN
I fill in the path to my repository and check the HEAD revision
I click Finish
The project is found and the default option is Check out as a project with the name specified. I leave the name alone Set the Depth field to Recursively and again, select the HEAD revision.
I click Finish
A progress bar appears for a second just to show an error message:
Checkout operation for 'https://(.....)/Android' failed.
svn: Cannot create new file 'C:\workspace-sts-2.9.1.RELEASE\AppName \.svn\lock': System can not find the path specified
When I retry and follow the steps from 1 to 6, another dialog appears. It says:
This project already exists in the workspace
or there is a data folder in the checkout destination.
It allows me to select a folder to overwrite. When I do that, a similar but different error message is shown. It says:
Checkout operation for 'https://(...)/Android' failed.
0x0000000f: The folder 'C:\workspace-sts-2.9.1.RELEASE\AppName \.svn' is locked by some external process. Please unlock the folder and try to check out the project again.
What I've tried
First, I opened the SVN Lock view to see if there were any locks created by the IDE. There were none.
I restarted the computer, hoping it would solve the problem of any application locking the file but this does not seem to be the case.
After that, I created a new workspace in a different location and tried to check out the project in there. The result was the same.
Then, I attempted to change the version of SVN Kit. The situation persists in:
SVN Kit 1.2.3
SVN Kit 1.3.5
Native Java HL 1.5.4
Native Java HL 1.6.12
I thought that changing permissions to the directories of my workspace was worth giving a try. It didn't do the trick either.
Finally, I checked out the project in a different location, using Tortoise SVN and imported it into my workspace. I could run it (though some build path settings seemed to be missing) but it's not a solution. I can't possibly imagine working on the project simultaneously with a couple of people without the ability to commit/update/view history/resolve conflicts in my IDE.
I was advised to install a separate version of eclipse with its own set of tools and a different workspace for this application alone but it doesn't seem like a good idea. I'd like to keep it all in a single IDE. I'd also prefer to avoid reinstalling the whole thing as I don't feel like configuring all the other tools (mostly spring and android-related) from scratch.
Has anybody seen a situation like this? How can I get it working?
It's uncear to me whether this is a subversive problem or an SVN problem. I would try checking out from the command line (you must install SVN command line tools to do this, but I'd recommend having the tools around as a backup anyway).
Checkout from the command line and then import into STS using File -> Import -> Existing projects into workspace. Once in the workspace, you can select the project -> Team -> Share project to get svn support on it.
Rename the project and check out again , It must be a problem where u are trying to checkout the project which already exists with same name in the Package Explorer

How do I make a basic App Engine Connected Android Project?

I'm new to this, so please bear with me. I simply want to get the basic App Engine Connected Android Project to work in eclipse.
I first downloaded Eclipse 3.7 and the Android SDK. I installed the ADT plugin through eclipse. I configured eclipse to point to the sdk and created an android project. I added some widgets, messed around with SMS messages, and ran it on my phone. Worked like a charm.
Then I decided it was time to work with app engine. I downloaded the Google plugin for eclipse from within eclipse using this link http://dl.google.com/eclipse/plugin/3.7. I also downloaded the Google App Engine Java SDK from that link.
Ok, here's where it gets more fun. I created a new app engine connected android project and named it "TestProjectThree". I then clicked "Debug as->local app engine connected android project". On the console I got a url, but on my phone I got a black screen. I then noticed that there was nothing in the android/gen folder, so I did a clean build of both projects. Suddenly, it gave me 10 warnings.
"Cannot fully validate context since domain type com.testprojectthree.server.HelloWorldService is not available.
You must run the ValidationTool as part of your server build process."
I googled the problem and found this link http://code.google.com/p/google-web-toolkit/wiki/RequestFactoryInterfaceValidation.
I began following the instructions. I tried to enable annotation processing, but it was already enabled. I tried to add the requestfactory-apt.jar to the factory path, but it was already there too.
Apparently now I need to run something called an Annotation Processor. I've never used Maven before but I right click on my android project->configure->convert to Maven project. I do a clean build and a POM file appears. I then copy all of the XML from that link to the line right above the /project line in the POM file. I copy the second bit too because I'm using indigo. Clean and build again. New error.
"/TestProjectThree-Android/gen already exists but is not a source folder. Convert to a source folder or rename it."
No idea what that one means either, but I see right click gen->build path->convert to source folder so I click that too. Clean and build again. NO ERRORS!! YAYAYAY!!!
Debug as local app engine connected android project. Got a black screen on the phone, and some sort of error in eclipse. “Source not found”. Looked for a more detailed error message but the console just has the app engine url on it and logcat looks empty.
I went back to the link about the validation tool and read all the comments. A lot of people seemed confused. I have no idea if I did it right, or did any of it right, and am very lost now. Please please please help me!!!
This sounds very similar to a problem I had, although not exactly.
I think the code generated by the AppEngine project that is used by the Android project is either not generated correctly, or needs a refresh.....and clean doesn't do it.
Try this:
First, make sure the requestfactory-apt.jar was in the "Factory Path" of "Annotation Processing" in the "Java Compiler" section of Project Properties.
In AppEngine project.
Properties-> Java Build Path, Source section. Select the ".apt_generated" entry and then "edit…" and rename it, by putting a "1" at the end of the name (or whatever).
Project -> Clean
then in Android Project
Properties-> Java Build Path, Source section.
Select the "apt_generated" source folder that is linked to the ".apt_generated" source folder in the AppEngine project.
"Edit…", then in the first line "Linked Folder Location" navigate to the NEWLY named folder in the AppEngine project (the one with the "1" at the end……)
Then Project -> Clean
Then build & run your Android project, it should now have newly generated RequestFactory code from AppEngine project and validate OK at runtime.
It's possible that closing and opening projects and cleans were also required.
Use parse. I tried using AppEnging for my app's backend, but parse seems to take care of a lot of backend jobs and makes life extremely easy https://parse.com

Categories

Resources