I am new to Android Studio.I like the IDE very much,it has got some nice set of features and has a rich look and feel, however I have some issues with the IDE. I recently created a Cordova application in android studio.I created an HTML file called index.html under assests/www folder.I included my jquery-1.11.3.min.js inside index.html file.I have the habit of checking whether the file jquery-1.11.3.min.js has been correctly included inside HTML file.In eclipse I use cntrl +click to check whether the js file path given is right.But when I use the same thing in Android studio,even if the path is right,it is showing like 'Cannot find declaration to go to'.Please help me on this.
Related
Stericson have a new Metamorph App.
It uses xml theme control files instead of the old thm files.
danation from the ModMyMoto forum has made a program, that updates the thm file to the new xml format.
It works very very well.
Please at all themers:
Use the Pro Version, use the new Metamorph with xml. Upgrade your Morphs with the xml files. Its not many work for you, but you can help us themers and users if you do this.
Download
http://www.4shared.com/file/5l0E6t76/ThemeControlFileUpgrader.html
Original Post at ModMyMotoForum
http://www.modmymoto.com/forums/showpost.php?p=3917253&postcount=10
Thanks, danation, thanks stericson! Great work!
Ummm, do you themers not use the pro version?
Only a question. I think, this app from stericson is every buck worth!
I've upgraded my themes all for Metamorph xml files.
Now all themes have an xml AND a thm file, so everybody could use them.
Today is the day.
I hope, you themers out there have changed your theme control files to the new one (*.xml)
Today, stericson has released the new Metamorph free version which supports only the xml file.
Please update your themes. We dont want to have some chaos in the theming community, isn't it so?
Stop getting angry at Stericson for moving Metamorph into a safer environment for the user (giving more information as to what is being changed).
HTCClay put it best:
@Stericson you can't update...where do you get off making things better? How dare you...
Click to expand...
Click to collapse
This utility is VERY easy to use and will convert any .thm file to .xml in seconds.
JAguirre1231 said:
This utility is VERY easy to use and will convert any .thm file to .xml in seconds.
Click to expand...
Click to collapse
Thanks I've updated it, in case anybody still needs some converting to do. This is the final version, unless there are any bug fixes needed.
Included in the download is an executable JAR file that will work on any operating system that has the Java Runtime Environment installed (version 6 or later.) Windows, Mac, and most Linux Distros will be able to run this program.
An equivalent EXE file was also added for the convenience of Windows users.
Original download location at M3 is here.
Download from XDA here.
-1.3-
* Drag and drop directories - All .thm files in the directory and all subdirectories will be converted. Other files are ignored. You can convert all of your themes at the same time
-1.2-
* Drag and drop feature added (I borrowed some public domain code found here.) Tested on Windows 7 and Ubuntu. Should work on Mac and Kubuntu as well.
* Option to disable dialogs
-1.1-
* Fixed bug that always warned about duplicate files
* When errors are found, it finishes writing all valid data before terminating.
-1.0-
* Ignores single blank lines
* Captures notes after double blank lines
* Adds functionality to enter in header information
* Prevents file overwriting
* Puts framework at the bottom no matter where it is in the .thm file
I'm still not clear on how you actually *use* this converter. Could someone post a step-by-step breakdown? Right now, I have the thing sitting on the root of my SD. Do I need to move it to the Android Themes?
No, not using with your mobile phone.
Copy it to your pc.
Open the Programm and take your *.thm file you want to convert to an *.xml file.
Thats all.
In Windows Phone 8 Runtime component (C++/CX) we can use fopen or CreateFile2 to create/open a file. For example
Code:
fopen("hello.txt", "w");
You see, I don't explicitly specify any path. And I can't figure out where this hello.txt resides? It can't be in Installed Location, and it isn't in Local Folder. Where is it?
Well, you could try the following:
_fileno() to get the integer file descriptor from the FILE*
_get_osfhandle() to get the Win32 HANDLE from the fd
GetFileInformationByHandleEx() to get the file name from the HANDLE.
I *think* those are even all supported on WP8, though I haven't checked except for the last one.
APIs like GetFullPathName() would make it easy, but may not be supported. CreateFile2 would let you skip the first two APIs in that list, if it works.
I inspected the WP8 .vhd file, and saw that my file was created in the Install folder. It looks like native code does not conform to the rule (Install folder is read-only location)
Whaaaaaat?!? That's... um. Serious. I'll look into it.
onmyway133 said:
I inspected the WP8 .vhd file, and saw that my file was created in the Install folder. It looks like native code does not conform to the rule (Install folder is read-only location)
Click to expand...
Click to collapse
Are you sure it does not create it on the root of the isolated storage space? That's rather unexpected to have the file in a read-only folder...
The install location is read/write to the app.
What
the
hell?
I can send test code if anybody wants, but it's easy enough to check yourself. You don't even need native code to do it, the .NET APIs work well enough.
I am somewhat confused.
mcosmin222 said:
Are you sure it does not create it on the root of the isolated storage space? That's rather unexpected to have the file in a read-only folder...
Click to expand...
Click to collapse
You can create a simple project to test this. In the C++ WP Runtime Component project, just use fopen or CreateFile2
Then use Hyper-V manager and Disk Management to easily inspect the WP .vhd file (I'm using Emulator)
You can use some things like IsoStoreSpy to see that the newly created file does not reside in the Local Folder (in WP8, they rename Isolated Storage to Local Folder)
I wrote a small app to test it; I can share the source if you want. It's really simple. I used the native APIs to create the file and write to it, then used the managed APIs to confirm it was there and read it, then used the native APIs to delete it, and the managed ones to confirm it was gone. Very simple. I then used the managed APIs to create the file myself (await Package.Current.InstalledLocation.CreateFileAsync("hello.txt")) and it worked.
Have you tried to create a xap file in the Install folder and reboot?
My 8X is freezing after creating a xap...
@spikedviper: No, I haven't tried anything like that. I don't seem to have write access from my app to the folder where pre-installed / OEM XAPs reside.
I did try editing the manifest; I was able to edit it with no problems but changing the capabilities didn't *do* anything, so I'm pretty sure it's still only parsed at install time.
hm...so what is the default path if no path specified?
looks like it stores it here: ms-appdata:///Local/ anyway check out "Data for Windows Phone" at msdn
Being new to Java, Android OS and Android Studio, I am a bit overwhelmed by all the information and hope I am asking the right questions on the right forum. I am developing an application where the user creates and edits files of a specific format. I want to include example files in my deployment so that the user can play with them right away. Now my questions are:
How do I include those files with Android Studio?
How do I define/create a directory for these files?
What would be standard locations for this directory which allow the user to access the files with a file manager?
frank-floripa said:
Being new to Java, Android OS and Android Studio, I am a bit overwhelmed by all the information and hope I am asking the right questions on the right forum. I am developing an application where the user creates and edits files of a specific format. I want to include example files in my deployment so that the user can play with them right away. Now my questions are:
How do I include those files with Android Studio?
How do I define/create a directory for these files?
What would be standard locations for this directory which allow the user to access the files with a file manager?
Click to expand...
Click to collapse
I've not yet made the transition to Android Studio, but in Eclipse there's a folder called /assets in the project structure. That folder gets built into the root of the APK. You can then access files in the /assets folder with the AssetManager.
Android puts tight controls on your access to devices resources. Each application has a default location for files that it can manage. You can retrieve the default working directory through the app Context. Check out Context.getFilesDir(). The application has the necessary privileges to read and write files to that location.
The crucial thing about internet search is keywords. The one I didn't know is "assets". Together with "android studio" I found a wealth of valuable links. Thanks for the help!
I'm running Android Studio 1.3 (I think it was the latest version) in a 4GB RAM pc, I've searched about how to make Android Studio take less memory so that I can run it better in my low spec pc, so far I've found the following questions in the website StackOverflow:
***android-studio-is-very-slow***
and
***android-studio-takes-too-much-memory***
In those question people suggested to low the memory value in the `Xmx` attribute from `750m` to `256m` in the studio.exe vmoptions file the folder `/Applications/Android\ Studio.app/Contents/bin/studio.vmoptions` I looked in the offcial documentation here: and there it says that is not recomended to edit those files, they advice to create a custom file, but I don't know how to do this.
Questions:
1) Should I create a whatever.exe vmoptions file in that folder with the change? and what should I do with the original file? and how android studio would know to read from my custom file instead of the original file.
2) In the official documentation says that edit that file but it says that that file is in this path `%USERPROFILE%\.{FOLDER_NAME}\studio.exe.vmoptions and/or %USERPROFILE%\.{FOLDER_NAME}\studio64.exe.vmoptions` but I can't find the file in that path, instead i founded in this path `/Applications/Android\ Studio.app/Contents/bin/studio.vmoptions`.
What I did before asking:
Before asking i tried to edit this file `/Applications/Android\ Studio.app/Contents/bin/studio.vmoptions` but it says that this file is already opened by another program or that it can't be saved.
I did this with android studio closed and I pretty sure that this file it's not opened by another program.
I trying to use Gstreamer on Android via Xamarin.Android(in the Visual Studio), so I built this sample project(github.com/jaroslavas/Gstreamer-Android-example) on the Ubuntu, took the compiled libtutorial-5.so and libgstreamer_android.so libraries and added them into the Xamarin.Android project as AndroidNativeLibrary's. When I try to use libgstreamer_android.so using DllImport, then all going ok, but when I try to use libtutorial-5.so (of course using DllImport), then I get:
DllImport unable to load library 'dlopen failed: could not load library "build/obj/local/armeabi-v7a/libgstreamer_android.so" needed by "libtutorial-5.so"; caused by library "build/obj/local/armeabi-v7a/libgstreamer_android.so" not found'.
Click to expand...
Click to collapse
This error occurs because libtutorial-5.so depends on the libgstreamer_android.so. libtutorial-5.so trying to find libgstreamer_android.so library in build/obj/local/armeabi-v7a/libgstreamer_android.so location.
But of course these two libraries are located in the lib/armeabi-v7a directory and even if I replace all two libraries or just libgstreamer_android.so in this location, then I still have this error.
So how can I change path of the library on which my first library will depend in the Android Studio or just in the .mk files(on the .so building stage)?
Hi, lib not found may cause by:
1. Lib is not exist.
2. Lib that declare in Build.gradle that is different that that you load in java class
3. Function name is not follow the form (the dot. in package name of java class is replaced by "_" in c++ function and class.
4. Clean project and rebuilt it. If you not clean, old lib .so will not be deleted.
5. Check if you declare create in android.productFlavors{}