Can't create a directory in the correct directory in AndroidStudio 3.0 - android-studio-3.0

Am reading the Android App Dev for Dummies 3rd edition. I've had no headaches till I reached page 92 where it asks me to
"...create the file
src/main/java/com/dummies/silentmodetoggle/util/RingerHelp.java"
The only thing is that I cannot find a way to create the directory "util" in the proper directory. I tried it many ways, including doing it manually within File Explorer, but that didn't show up in my project.
According the File Explorer the directory is in the right place. But according to AndroidStudio it is not (appears to be one level up).
It appears that there was a lower version of AndroidStudio when this book was published, yet I do appear to have the latest version of the book.
I feel as if I am asking a stupid question, I hope the answer is something obvious that is right in front of my nose.
Project structure:

Related

Linking to an external www-folder - Tools for Apache Cordova (VS 2015)

For a project I'd like to use an existing website as a base for a cordova app. My project setup looks as follows:
One Solution with two projects
A ASP.NET webservice project (with website aka html/js/css)
An tools for apache cordova project
I don't want to copy the html/js/css files from the website on every build. Instead, I thought I could get away with some kind of a link to the www-folder in the ASP.NET project. I tried several approaches:
Creating a filesystem link (tried 'mklink' with parameters /D and /J - /H is not working for directories
Editing the .jsproj file and add a tag to link to the other project's www-folder
The second approach didn't work at all. Just got some weird errors when trying to load the project again (saying something about file duplicates).
The first approach worked a little bit: It is working, when targeting the windows platform. It is NOT working, when targeting iOS.
When targeting iOS, everything is copied just fine to the platforms\ios folder (read, all the content of the linked www folder is copied to the platforms\ios\www folder). But it is not copied correctly to the remote build tool on Mac OS X! It really just copies the directory link as a file. Remotebuild then failes with a 'missing www directory in top level' message.
Any suggestions how to add a link so the content is copied (instead of the actual link)?
Is there a way to take detailed influence on the build process for specific platforms?
Is there a way to create a hardlink to a directory in windows? What are the drawbacks?
I'd really like to avoid copying the files on build (which would be simple enough with a prebuild script), because there's a high risk of loosing changes made while debugging.
I'm aware that setting a link is also not the best solution, since it has to be done per machine and can't be checked in to a version control system. So, if somebody knows of a better aproach to handle my scenario, let me know.
I work on the Tools for Apache Cordova in Visual Studio at Microsoft.
I'm sorry but VS-TAC does not support add as link. To prevent confusion we removed the option in update 3.
The best solution I can give you is to copy files from one project to another. Another user asked this question a week ago and came up with a hacky solution. Please see this for more information:
VS2015 typescript cordova add as a link
Sorry for the trouble and thank you for the feedback!

Can't open project: "One or more lines were too long and have been truncated"

I'm having some kind of problem with my project that me and my friend is working on. When I try to open the project that I've been working on it gives me an error message saying that "one or more lines were too long and have been truncated" and thus I can't see my code or GUI. When my friend opens the project on his computer (The project is on dropbox so it's the same file) there's no problem at all. I've googled but couldn't find anything. I just did a repair of RAD Studio but no luck. We have 2 forms and a unit that we use, the unit and the mainform isn't working for me but the second form is no problem.
Thanks!
Make a copy of your project directory.
Search your harddisk for XXXX.pas and XXXX.dfm
Hopefully there will be some temperary files that match - like "mylostform.dfm.~1307~" . copy the newest to your project directory, and rename them to "mylostform.dfm" and "mylostform.pas".
Kind regards,
Geir Bratlie
From the comments, you have Dropbox, and the Restore functionality is available, but using it would cost you a week's worth of work.
If I was in that situation, here's what I would do:
Copy the current file to somewhere else (My Documents, for example).
Use Dropbox Restore to get the old version that works.
Make a copy of this, because you're going to be modifying it
Ensure that you can open it in the IDE.
Use Beyond Compare to open the two files side-by-side. (If you don't have this, you really should!)
If they're completely different from each other, you have a serious problem. If not, you'll see the changes you've made. Start copying changes one at a time, and after each change, save and try to open it in the IDE.
At some point, you won't be able to. That's where your problem lies. Now you can fix it!

Links to games created by Windows when delphi projects create exes with specific names

I have a Delphi project called VR that produces an executable named VR.exe. To my dismay I discovered Windows (I am running Window 7 64 bit Ultimate) has added links to the start menu and under games: Search & Rescue: Vietnam MED+EVAC. The icons for the links are the default delphi app icon.
Did a bit of research and I found this post:
http://social.technet.microsoft.com/Forums/windows/en-US/a5919fc1-db3d-4f13-b241-d059df2bf11f/renaming-a-file-into-vrexe
How can I prevent windows from doing this?
Update: I have another project MM, which produces mm.exe. This one created a link to the Steam Dark Messiah Might and Magic Single Player.
Another update: We submitted a support request to Microsoft. They acknowledged it is a bug, however, they failed to provide a timeline for a fix.
Update: This is the answer from Microsoft:
I am writing to inform you that this issue is reproducible at our end and we have been reported regarding this in past as well. Since this is already identified as “By design” with our code and to this point we do not have a resolution on this, there’s not much I would be able to help with.
However, if you have any points that you would like to bring to our knowledge like how it is impacting business or any other concerns , do let me know.
I accepted Remy's answer.
According to MSDN, game apps are supposed to integrate themselves into Game Explorer, Windows should not be integrating anything automatically. But I can confirm on a Win7 Home system that renaming any app to vr.exe and then running it causes Search & Rescue: Vietnam MED+EVAC to appear in Games Explorer (there was also a very noticeable delay when the app is run for the first time, which I imagine is due to the recognition/integraton taking place).
After running the app, I found the following Registry key associated with that game:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\GameUX\S-1-5-21-991038988-4040401710-2535580036-1000\{2A051900-E642-4D69-8D4E-1B3A2FD42CCF}
It contains a reference to this file
C:\Windows\system32\GameUXLegacyGDFs.dll
I looked at the file contents with a resource viewer, and see it is full of RC_DATA resources containing GDF game definitions.
I deleted the Registry key, and now the game no longer appears in Games Explorer, no matter how many times I run the renamed vr.exe file.

Buttons not working when Dart project is moved to server

I'm a math teacher with some novice Java skills. About six years ago I made some applets so my students could practice word problems. As time went on, more and more of my students have had problems using the applets because of browser incompatibility (I think). So this summer I've been working to convert the applets into a Dart app. The entire project is two textareas and about eight buttons that either display a problem or its solution.
So far I've got it working just fine in Dart Editor. It compiled to JavaScript without an error or warning and runs well in JavaScript, also through Dart Editor.
I copied the files to my website using FileZilla, but when I access the app on the server via a browser (I tried Safari and Internet Explorer) the app looks correct but none of the buttons work. That is, nothing happens when they are clicked. I'm not sure that I have copied all of the correct files/folders. I copied everything to the server that is within the web/ directory. There are two HTML files, one in out/ and one in web/. Which HTML file should it launch from? And should I just rename that file to index.html?
I've got about 40+ hours on the Dart phase of the project but am about out of time to devote to this particular problem. I've put in a few hours searching for help and related examples online, but I think my questions are so basic that there is no information available.
Again, I'm not a web developer or programmer. Think 50 year old math teacher.
Since a Dart project contains symlinks to dependencies, you can't simply copy a project to a server and have it work. pub deploy is a command that bakes your application and bundles the files for copying to a server.
It's somewhat a early, but there's a description here: https://docs.google.com/document/d/13y7yCwq9GtPChXtd6t0YMcUtMJLZq2IVwq546Dve_No/edit

XNA 4.0 ClickOnce game does not run after installation

Okay, I have been looking all over to solve this problem before I actually broke down and decided to finally ask for my psecific problem. I am using ClickOnce installation and when I use the setup.exe to install nothing runs, not even on my personal computer that I know has all of the proper libraries and such. I'm not sure what I am doing wrong so it is difficult to explain the problem.
I have included dotNetFramework4.0 client x86 x64 , xna redistributable 4.0 and windows installer 3.1 along with my game and I have it set to install all of that with setup , also I have it set to download prereqs from same location as application. I've tried it on three separate computers , one that does not have XNA or VS C# installed and the same problem occurs.
Here is the problem , after I install the game nothing runs, I try clicking on the ClickOnce application file (the one with my game's icon image) and again nothing happens. The thing that really bugs me is that there isn't any errors or crashes or anything , it's almost like clicking on the desktop screen. (I looked at the properties of the "shortcut" that was installed with the game and the file size of the shortcut is like 300 bytes. Isn't that really small? I was thinking maybe there is a problem with a startup executable? I'm not sure though.)
I've tried tweaking some stuff in the Publish section of my project , such as un-checking the box that says "use .deploy extension files" (I don't know why, I've been grasping at straws here) I've been looking into some other installers such as NSIS but I don't know how to compile a list of files to include in other installers and I feel like that won't solve the problem anyway because I've gotten ClickOnce to work with me before.
On one computer there was an error report that said something about 'deployment and application do not have matching security zones.'
Game.application resulted in exception. Following failure messages were detected:
+ Deployment and application do not have matching security zones.
It's getting late so if I need to provide more information let me know.
ClickOnce can be a fickle thing. There are times that I've had errors occur that could only be solved by recreating an entire Windows user profile. Because there are so many different options for ClickOnce, it's going to be hard for me to diagnose your exact issue, so I can only offer what options I used to successfully install via ClickOnce.
Publishing Folder: local folder
Installation Folder URL: blank
Install Mode: offline
Application Files
Make sure the Publish Status of your game files is set to Include (Auto)
Make sure the Publish Status of the XNA libraries is set to Prerequisite (Auto)
Click Prerequisites
Microsoft .NET Framework 4 Client Profile
Microsoft XNA Framework Redistributable 4.0
Windows Installer 3.1
Do not check for updates
Everything else default under Options (publisher/suite name shouldn't affect anything)
Specify the version number
Publish Now
Install the game through the setup.exe provided in the publish location. I always distribute every file that is publishes. However, you can clean up old versions in the "Application Files" folder if you don't want the history to be distributed.
You can double check the "Application Files" folder to see if your version got published correctly (look at the files that were deployed and see if they match your project contents).

Resources