Android 10 (Android Q): How to unzip file due to External Storage Changes (without android:requestLegacyExternalStorage) - zip

Can the Android 10(Android Q) download the zip file and extract the zip file?
I really have no idea. How do I unzip the file without using Environment.getExternalStorageDirectory()
without adding this android:requestLegacyExternalStorage="true" in AndroidManifest.xml
Please HELP.

Solved the problem by changing Environment.getExternalStorageDirectory() to getExternalFilesDir(null).getAbsolutePath()

Related

Android Studio Won't Open After Installing Plugins Supporting .csv Files

I had imported a .csv file in Android Studio, which after opening suggested me to install plugins supporting *.csv files. After the installation, I have not been able to load the IDE. I get the splash-screen but the program is stuck.
I have tried uninstalling/reinstalling the IDE, but the issue persists. Some solutions on stackoverflow suggest finding the CSV plugin folder and then deleting it, however, I cannot deduce which folder that is. I have also compared the plugins folder with a vanilla installation of AS on another computer.
Today I had same problem. I solved it with removing plugins from folders listed bellow. To be honest I am livid that something like this can happen.
General solution:
I went to this pc and searched "csv". then I went throught list of all results and found that android studio plugins are stored in following folders:
C:\Users\${user}\AppData\Local\Google\AndroidStudio${version}\plugins
C:\Users\${user}\AppData\Roaming\Google\AndroidStudio${version}\plugins
First I removed just CSV folder, but that wasn't enough so I deleted also RanbowCSV and all folders which were created at time of first occurance of the problem. I think that should be enough, but I was angry so I deleted everything from those folders.
I also went to folder:
C:\Program Files\Android\Android Studio\plugins
There I searched "csv" and deleted found file "csv.py".
Hope that helps to anybody who gets baited to installing csv plugin as did I.

How do I access the directory of my NSIS Installer inside a Zip File to extract that Zip File?

I want to extract a ZIP File with the .exe inside.
I want to execute the .exe inside the Zip to extract the Zip File.
Already tried it by executing: ZipDLL::extractall "$EXEDIR" "$DESTINATION"
I think that does not work, cause the .exe is stored in the TEMP Folder when opened, so it cannot find the.Zip file
So how do I extract that Zip when executing the .exe from inside the Zip?
Thanks for answers!
Your question does not make a lot of sense, you should just put the files inside the installer and not have a zip file at all.
Even if it made sense, it is not possible because where a exe is executed from when you double click it inside a zip file depends on the zip program you are using and there is no way of getting the path of the zip it was extracted from.
If for some reason you want to be able to update the files inside the zip file without rebuilding the installer you can use a cab file instead. The CabX plug-in supports extracting from cab files appended to the installer exe.

How to hide .gitignore files while committing in Android Studio

Currently i am using Android Studio version 2.2.
Once we add configuration file into .gitignore file of project root directory and then make any changes to ignore files, Still it shows these changed file while committing.
So how can we avoid these files from showing up while committing.
I have tried removing ignore files file from Setting->Version Control->Ignore Files , And restarted the Studio.But is doesn't work.
I have tried to removing previously cached file from git rm -r --cached .
And then re-added the gitignore files and added the project again.
But still all the git ignore file shows while committing and leads to problem by mistakenly selecting them.
Anyone who have faced this please guide to remove these git ignore file while committing in Android Studio.
Have tired this but didn't get any help.
You need to remove (or "ignore") these files from version control.
One option is:
Close Android Studio;
Remove the files that you need to remove from vcs (probably something like rm -rf .idea/);
Commit your changes;
Make sure that all files that you want are on your .gitignore;
Reopen Android Studio;
Now he will create all files that he needs to execute, such as .idea folder, but you don't need to worry because now they are out of version control.

Installing Emacs Emulation keybindings -- Invalid VSIX package

I'm trying to install the extension for Visual Studio 2012 that allows emacs key-bindings.
I'm following through the steps here:
Emacs Keybindings in Visual Studio 2012 or 2013
I'm up to step 5:
Run the vsik file as administrator. This is required so the extension
can write Emacs.vsk into the program files folder. I wasn't sure the
best way to do this so I ran a command prompt as admin and then
executed start emacsemulations.vsik from the prompt.
So, running emacsemulations.vsix from an administrator command prompt,
I get the following error "This VSIX package is invalid because it does not contain the file extension.vsixmanifest at the root."
I'm not changing any of the file names inside the package.
I'm thinking this may have something to do with how windows zips up the file -- I'm able to recreate the problem simply by unzipping and rezipping the EmacsEmulation.vsix file without changing the contents of the vsix package.
If anyone has any suggestions on how to fix, or even better, the actual updated vsix file itself, I'd be very grateful!
The issue you have relies on the way you are zipping your file, what you should do is zip all files inside the folder you created (in this case, "EmacsEmulations") when you unzipped it.
Step into the EmacsEmulations folder.
Select all files.
Add to .zip
Rename the .zip output to EmacsEmulations.vsix
I'm trying to get this extension to work too, so good luck!

jd-gui stops working when I try to save all resources

I opened a jar file in jd-gui but when I try to save the all resources it stops working. I don't know where to look for the logs of jd-gui.
How can I save all the decompiled source files?
I met the same problem, and resoled it as below:
unzip the target jar file.
remove unnecessary folder
zip the remaining class files into a new-small jar file.
download the jd-cli project from here: https://github.com/kwart/jd-cli/releases/tag/jd-cli-1.2.0
use jd-cli to de-compile the jar , and with the log option, e.g.
jd-cli target.jar -od jar_result -g ALL
check the output log and find out which block.class file block the de-compile proccess. if there is, then remove it from the target.jar and then re-run the jd-cli again. You can manually copy/paste the block.class source code from jd-gui.
Open "jd-gui.cfg" with a text editor. "LastUri", in section "Decompilation", contains the name of the CLASS file causing the crash. A workaround is to open the JAR file and remove or change extension of this CLASS file.
Regards.
It seems a bug. I solved it simply trying to export sources to other folder ($home -using debian-)

Resources