I have two android projects. One is the login and membership screen and the other is my main project. I did both separately, in case it would be okay to combine them later, but I realized that I made a big mistake. When I tried to combine the two, it started giving errors all the time and I couldn't do it. Gradle files were probably missing, but I'm very confused. Can anyone help me how to do it easily?
Error:(1, 0) Plugin with id 'kotlin-android-extensions' not found
There is currently no easy option to "combine" two projects like to merge them without exceptions. But you can do the following:
The easiest way to combine two projects is to take the smaller project and copy all the files in /java /layout /drawable to the other project.
Then I would look up all files in /values and copy the values if you changed them.
After that you should look at the Mainfest and see wether you made changes there and transfer them. This will make most of the errors not come up because you just copied all the classes.
If you get the error anyway then go to your gradle files (build.gradle for project and module and settings.gradle if you use android studio bumblebee or newer) and check if there is any plugin or line you have in one project and not in the other and then add that accordingly.
Related
InstallShield must be the crappiest "industry standard" application in existence, for reasons too numerous to enumerate here. However, one of those deficiencies is something I'd like to be able to fix, and with my first foray into writing an extension for Visual Studio (currently using 2015 version).
InstallShield has created a .isproj type, to allow integration with Visual Studio. This allows a developer to create an installer that references the output of a project as the files to include in the installer (rather than having to manually select individual files to include). This works well enough as long as the .isproj is being built in Visual Studio, and in a solution that references the project for which you need the output.
However, I also have an automated build for my installer projects, that we run on a build server using MSBuild. When attempting to build this way, we were getting completely opaque error messages indicating that the project output references above couldn't be resolved.
As with all InstallShield errors, Googling for answers turned up nothing except for multitudes of other people having the same problem. So I decided to dig into the plain text of the .isproj to see what I could find.
As it turns out, the .isproj type is a just a regular MSBuild script, and it even has lines commented out that explain options that can be added to the project; one of those things that can be added is an ItemGroup containing ProjectReference nodes. Manually adding the nodes helped solve the problem. Command-line build now works.
However, I am dissatisfied with a) having to manually type this stuff in, b) having no visual representation of what projects are being referenced, and c) not finding out about a problem until the build fails. So, I would like to be able to extend Visual Studio to help me with this. Here's what I'd like to do:
1) Add a "References" node to the project in Solution Explorer that acts like the References node for any normal .csproj.
2) Restrict the available References to other projects in the the current solution.
3) Visually represent a project with missing references (e.g. by underlining the project name with a colored squiggly, as with errors/warnings), and potentially failing the build if missing (depending on whether I want to treat it as an error or a warning; TBD).
To these ends, I've downloaded MPF for Projects - Visual Studio 2013, which provides an SDK for creating a new project type.
However, before digging too deeply, I need to know if it's even possible to EXTEND an existing project type, as described above, as I obviously don't have InstallShield source code. Also, any links or guidance as to a starting point for doing so would be greatly appreciated.
Hi I wrote a project on Android Studio, now I just want to create a exact duplicate to it so I could try some experiments on the new copy without ruining the old version.How can I do that?
Someone told me just to copy the file in finder(I'm using mac). I did that, and managed to open the new version as project. But it is not working.I am sure I need to edit a few places as the file name has changed, but I don't know where are the places to edit, any idea?
Thanks !
Well it depends on your project. Is it a small one or a big one with huge memory?
If it's a small one and you have enough memory in your Mac, just copy the whole folder instead of a file and paste it somewhere else. Then you can do anything you want to in the new one.
If your project is huge and don't want to waste memory, I suggest you to use GitHub.
Just Follow this steps:
Clean renamedProject
Go to java folder and Refactor > Rename to renamedProject
Change app name in strings.xml
Change applicationID to renamedProject if not already changed.
Sync Project
Check out Detailed Steps in Official Book:
https://google-developer-training.gitbooks.io/android-developer-fundamentals-course-practicals/content/en/appendix_utilities.html#copy_project
To answer your question, you can simply locate project folder in finder, and copy it at different location with new folder name. Now open it in Android studio. This would create a replica of your project.
But better approach to achieve your requirement is GIT. You can refer following documentation for better git understanding.
Following some links here I tried to rename a project. I went to c:\path\to\AndroidStudioProject and renamed the folder there, then found the .idea file and changed that. Now the project loads but java files are missing! However, on clicking java (in the bar at the top), then com I can see them each with a small red j.
I then looked in module Gradle build where there were 3 files, one with the new name and 2 older ones which stated that they did not belong so I deleted them, copying the compile info into the new one. Naturally on doing a Sync Now I get a bunch of errors.
Why does this have to be such a complex operation? Can anyone assist?
After you rename the folder, open the project in Android Studio. From there, right click something that needs to be renamed (e.g., module, package names, etc.) and use Refactor->Rename from the context menu. Keep doing this until everything that can be refactored is.
You will need to manually change the value of applicationId in the app-level build.gradle. Obviously, things like #string/app_name will also have to be changed manually. I recommend making these manual adjustments from inside Android Studio rather than directly editing the files. That way you'll know immediately if you break something.
I have got thousands of files/folders inside a solution. For some reason I have to exclude them all and then include again in the project, to get the latest list of files.
The normal "Exclude From Project" in visual studio menu takes too much time. Is there a quick way to do it?
Thanks!
Put them all into one master folder and include that folder.
If some are files, you may also want to compile them and include the DLLs or the equivalent in whatever language you're using.
I have a solution with many projects. This is actually a solution that contains a mix of class libraries and various web applications. It seems that if my colleague makes a change to one of the web projects (or if I do) and then check it in. And then when either one of us gets the latest version project references become broken. They still appear in the references section with no indication of an error, but when you try to compile it cannot see the libraries.
To solve this I have to remove the references and add them back in. Any ideas on what may cause this problem?
Make sure that the paths are relocatable, that you both have the same paths on your PCs (i.e. that you have not used TFS workspace mappings to put different folders in different places), and that you don't move projects around or rename folders etc.
Even when everything is clean and tidy, Visual Studio will occasionally decide it can't find a file that's right under its nose, or that a file somewhere else on your system looks prettier, and it will break the reference. You just have to delete and recreate it in this case. But this usually happens once a month in a team of 10-20 people, and should not occur every time you check in.