I tried many methods to fix Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE but until now, I can increase my intern storage memory.
The method I tried:
Right click the root of your Android Project, go to "Run As" then go to "Run Configurations..." locate the "Android Application" node in the tree at the left, then select your project and go to the "Target" tab on the right side of the window look down for the "Additional Emulator Command Line Options" field (sometimes you'll need to make the window larger) and finally paste "-partition-size 1024" there. Click Apply and then Run to use your emulator.
Go to Eclipse's Preferences, then Select “Launch” Add “-partition-size 1024” on the “Default emulator option” field, then click “Apply” and use your emulator as usual.
Open your .Android directory. Usually in your home directory. Then go to avd and then open the directory that has the name of the avd you would like to change.
Now edit the config.ini file and add the following line or modify the following line: disk.dataPartition.size=1024
This all worked for me in Linux.
I used my app to store in external storage by using this:
android:installLocation="preferExternal"
but then I received
Installation error: INSTALL_FAILED_MEDIA_UNAVAILABLE
Error
Installation error: INSTALL_FAILED_MEDIA_UNAVAILABLE
means that your device does not have SD card.
Error
Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE
means that you don't have enough space on device for your app.
You should do next:
Write android:installLocation="auto" and android itself will care where to install your app - internal or external memory.
Be sure that device has enough memory for installing (usually it is more then size of apk).
If your app really need much space - read this guide.
If you use emulator - setup sd card support:
Try with these options, with that configuration I'm able to install one app of 23MB:
Try uninstalling apps that are installed on emulator and not inbuilt. you can also change the size of SD card by editing emulator settings but then it will take time to run your app as that much memory needs to be converted into a mountable partition.
I have also had a similar problem when I run my app. In my Google TV emulator, it does not show USB storage for external storage. Try to increasing the cache memory and ram size in a emulator new hardware.
How to increase virtual memory of emulator:
\\emulator -avd "Emulator Name" -partition-size 500
After that, try to install your apk.
Related
Some days ago I change my hard disk, so I need to re-install Android Studio. When I clone my project again some icons don't work (others are shown well). Icons are in right folder (when I have mouse hover the icon's name i can see them) and they are equal (64x64 PNG).
Some previews of the icons appear, other not. So I can't start app because the icons that don't appear are null. I don't know what happened when I install again Android Studio, because app works fine before it.
I tried to add another icon but it also doesn't appear, I tried to create another project and use the same icon but don't work and I tried to invalidate cache and nothing.
You should check on an android phone if you can download and play the app. If the problem is only with the emulator - it does get buggy, so the regular reinstalling the emulator/android studios, restarting your computer, trying to install a different emulator might work.
Otherwise:
The relevant line to look at is:
android:icon="#mipmap/ic_launcher"
This means that the app is going to the 'mipmap' folder inside your directory, and looking for a file named 'ic_launcher' - to display it as the App icon.
You need to make sure this file name exists in the proper folder, and is in the correct format(this guide might help )
How to find the image location folder
If this doesn't help: remember that icons can be displayed at different qualities for different devices (hdpi, mdpi, xhdpi....) so sometimes if you want to make your own icon you need to make sure it fits the requirements (in the above guide)
Have you tried to check if all icons are in the project folder?
"Some previews of the icons appear, other not.", From this statement of yours, means the studio cannot locate it though you can manually see theme by your eyes. This happens sometimes in the studio.
The solution is simple "Just try to reload your image files(replace them with the same files), The ones the studio can't locate".
Also you may have your app is not able to locate an image file from a 'mipmap' folder for API less than 24, you just have to navigate your studio view from Android View to Project View and move your image file from a specified folder to default image folder. ie. from drawable<24> to drawable folder then relocate your file in your code.
Recently i have been working with a project that requires Java 1.1 version. But whenever i try to run the
jdk-1_1_8_006-win.exe file , I have been receiving a message as shown below.
Image showing error:
After clicking ok on that:
I have seen one answer in stack overflow like
Get the Java installer files.
Execute jdk-1_1_8_010-windows-i586.exe When the error dialog is
displayed, open C:\USERS(User Name)\APPDATA\LOCAL\TEMP\~EXB0000 (Do
not click the OK button at this time) Copy all files to another folder
Click the ok button Download the tool and execute it.
Download Is3Engine.zip (ReactOS's InstallSheild Engine 3.0) Extract
Is3Engine.zip (containssetup.exe) Move setup32.exe to the copied Java
installers Execute setup32.exe
But the issue here is I am unable to find an Folder called APPDATA in my PC.
FWIW, this isn't due to AppData not being there; if it wasn't, your system would break in all kinds of weird ways. It's hidden and system, because messing with it can break it, but it's still there; you can change Explorer's settings if you really want to see it.
This error is because 16-bit software can't run on 64-bit Windows, and out of sheer inertia, the use of 16-bit installers continued all the way into the early 2000s. Windows x64 has workarounds for a few common ones, like Installshield and NSIS, but anything other than that will instantly fail.
There's really nothing you can or ideally should do other than installing it on a VM of an older system that it was meant to run on.
I am new to android studio but have experience with Git. Every time I try to merge a pull request that a co-developer has made I get conflicts even when I have not made any changes to my code. The errors are different each time but the most common one is The system cannot find the path specified.
here is the list of files that have conflicts:
build_file_checksums.ser
buildOutputCleanup.lock
executionHistory.bin
executionHistory.lock
fileHashes.bin
fileHashes.lock
gradle_models.ser
javaCompile.lock
sometimes there are more files. I click on Accept Theirs for all the files and then I get build errors.
Please Note that I use an emulator where as my co-developer connects his phone with USB. I have to clear cache and sometimes delete scripts file as mentioned here android studio gradle refresh failed (The system cannot find the file specified) . This trick just worked once. I clean the project and invalidate cache and restart. This also worked couple of times. Many times I had to install a new emulator to solve this issue.
Here are few error message examples:
x:\AndroidProject12\build\intermediates\incremental\mergeDebugResources\merged.dir\values-pt\values-pt.xml (The system cannot find the path specified)
x:\AndroidProject12\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\android\arch\lifecycle\livedata\core\R.java
x:\AndroidProject12\build\intermediates\instant_run_split_apk_resources\debug\instantRunSplitApkResourcesDebug\out\slice_3\AndroidManifest.xml (The system cannot find the path specified)
Thank You
I have completed my app which runs perfectly and am now trying to export it using File => Export. When I do the keystore file gets created but the apk file does not. Eclipse get hung up after hitting the Finish button continuously pending (cursor shows loading icon). This last for up to 40 minutes when I decided to cancel and start again.
When I move the cursor around eclipse afterward the cursor still shows loading in certain panels, like package viewer and task. When I close eclipse and restart it I get the infamous "Workspace in use and cannot be create..." prompt. I, then, go to the meta folder and try to delete the .lock file to no avail, not even the program unlocker works. Task manager also cannot end the task (the CPU usage shows 0% but the memory shows a value and eclipse remains present in task manager).
The only thing I find that allows me to enter eclipse is to reboot my Windows 8.1 pc. Afterward, the same issue repeats itself. Any idea on what gives?
when you get to save file (destation APK file) click browers and you have to type .apk after it. eg filename.apk.
Why is my project structure not appearing on DDMS perspective when i run it in a real device?
This happen when you have the emulator using? You could check the Clean Project or Restart the Eclipse
The problem was that my phone is rooted. So, I can no longer see the data/data directory.
But as always, there is a way to do it. I'll show you.
Run the project
Go to the DDMS perspective in Eclipse
Run the windows prompt (Windows R + cmd)
Type "abd shell"
Type "su"
Type "chmod 777 /data /data/data /data/data/com.example.example /data/data/com.example.example/*"
Return to the DDMS perspective and you will see the data. Databases, libs and sharedPreferences
I found another problem. That is, when you try to pull out a sharedPreference or database using the eclipse feature od the DDMS, you get the "Failed to pull selection" error.
In order to pull things out of the rooted phone, you need to do that in the same way you get to see the files, that is, using the command prompt with the adb shell command.
The only difference is that when you type the root, you should get to the specific file you wnat. For example, if you are looking for a database (the most obvious thing you want to verify), you should put in step 6, this:
"chmod 777 /data/data/com.example.database/databases/database.db"
That's it.