621 questions
0
votes
1
answer
72
views
Properties doesn't write with FileInputStream?
I made a simple to-do list application with Java. It's a Maven project. It uses a SettingsStorage class to load and write stuff on a file settings.properties. The program normally loads the default ...
0
votes
0
answers
47
views
Incorrect calculations from java file, using File object
public class Driver {
public static void main(String[] args) throws Exception {
Scanner scan = new Scanner(System.in); //what is this?
System.out.println("Enter file ...
1
vote
0
answers
751
views
Why do I get Operation Not Permitted for Files.setPosixFilePermissions?
I have a java function in my springboot application where I am trying to set 777 POSIX permissions to all the folders and sub folders in my NAS path.
@Async
@EventListener(...
0
votes
1
answer
49
views
How, when serializing, not to write an object to a specific file, but to create a new file in the selected directory always with a new name?
I am trying to serialize an object in java and subtract the given object from that file. But what I need is that I do not select a file for serialization, but that during serialization this file is ...
5
votes
1
answer
1k
views
What the purpose of the R.txt file inside aar?
Sometime I can see a R.txt file in some .aar (and in such case there is also a non-empty ./res directory in the aar). What the exact purpose of this R.txt file? Also sometime I can see some AAR with a ...
1
vote
1
answer
3k
views
How to reduce PNG/JPEG file size in spring boot
I want to reduce the file size while saving the image.
Please, take this code for reference.
And how to reduce the file size.
public void saveImage(MultipartFile image_one, MultipartFile image_two, ...
0
votes
2
answers
168
views
handle 1gb data file to read words and calculate max length word?
i wrote this code but its going to fail on 1gb size file.
public class TestFiles {
public static void main(String[] args) {
int minLength = Integer.MAX_VALUE;
int maxLength = ...
0
votes
0
answers
268
views
Comparing identical files do not match
I am using Azure File Storage to upload files into Azure storage. While running an integration test, I download the file and compare it with the original it doesn't match. Sharing a sample code below
...
0
votes
1
answer
157
views
App build failing after Android Studio 4 update
Shows the following error- C:\Users\shubh\AndroidStudioProjects\BitsandPizzas\app\build\intermediates\compile_and_runtime_not_namespaced_r_class_jar\debug\R.jar: The process cannot access the file ...
1
vote
1
answer
426
views
How to resolve identifier expected error in Resoure file
Getting error like below
out/target/common/obj/APPS/MtkSystemUI_intermediates/srcjars/android/arch/core/R.java:13911: error: <identifier> expected
public static final int 1=0x7f0d0000;
...
-1
votes
1
answer
87
views
what is the important of build.gradle and R.java file in Android Studio?
"Gradle: Execution failed for task ':Results:processDebugResources'
Running /home/mydata/Desktop/android-studio/sdk/build-tools/android-4.2.2/aapt failed.
R.java file is empty, I don't know wheather ...
0
votes
4
answers
310
views
package.R cant be resolve
Context: I just created a react-native project, and I'm working android native side.
The fact is I cant import resource from my package like import my.package.R.
Autocompletion only allow me to import ...
1
vote
1
answer
763
views
Playing two sounds in sequence with SoundPool
Actually, I want to play all the sounds in raw folder in sequence. When I click the button only the first one is played. I will be grateful for your help . This is my code:
public class MainActivity ...
2
votes
2
answers
1k
views
Cannot resolve symbol 'R' after updating android plugin version (gradle version) to 3.3.0
I changed my android plugin version to latest i.e. 3.3.0 and after syncing the project, the reference to R class has been lost and turned into red saying 'Cannot resolve symbol 'R''.
1
vote
0
answers
334
views
Error: code too large in Generated R file for library module
Our app has got more than 12K entries in the generated R file and it is working fine as an android application project.
Once we convert that to an android library project and it is throwing "error: ...
1
vote
0
answers
76
views
Encoding error on Android Studio (R.java file) after rebuild
Recently i have imported an android studio project from some repo. The project initially was being coded in linux/ubuntu enviroment with no problems. Now i want to work in windows, but build is giving ...
0
votes
0
answers
46
views
Android recoder voice and it catch a java.io.FileNotFoundException
I want to recorder voice,and mix the mp3 file
but it could not find the file
I had add the permission by uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE".
that is my code
...
-1
votes
2
answers
643
views
R.java error in Android
When I run my project I get the following error
Error:(3433, 37) error: ';' expected
Error:(3433, 42) error: identifier expected
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
...
0
votes
0
answers
53
views
Android studio FileNotFoundException for R.java [duplicate]
I'm getting following exception while running project.
Execution failed for task ':app:*****'.
> java.io.FileNotFoundException: D:\*****\R.java (The system cannot find the path specified)
Tried ...
0
votes
1
answer
205
views
How to force the return type to be a variable of a specific class?
I have the following method.
public abstract String getIntent()
And the following class
public class Intents
{
public static final String SUCCEEDED = "SUCCEEDED";
public static final String ...
1
vote
1
answer
193
views
How to Access my App's R.java file through My SDK library file?
I have a app and sdk, my sdk want to access my app's R.java file(because i need some views ID).when i try to import my
app package name along with R, like this import com.packagename.R;its does not ...
0
votes
1
answer
476
views
Gradle build finished with 3 errors
I am working on Android studio for quite a while and few days back I encountered a weird problem.
While working on an app implementing a database, I clicked on run app to check, then the build ...
0
votes
0
answers
824
views
How to manually merge all the /res values.xml?
I need to build myself the r.class (via Aapt.exe). For this i must first "merge" all the res files of all the libraries. For exemple the appcompat-v7 contain theses res :
res\values\values.xml
res\...
0
votes
0
answers
509
views
How to include R.java in a custom android build?
I'm trying to add an application to a custom android build, but it is unable to understand resources like Theme.AppCompat.Light.DarkActionBar and colorPrimary and colorAccent, which leads me to ...
0
votes
1
answer
504
views
Android androidTestCompile espresso-core causing FileNotFoundException R.txt
I'm trying to add
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
To my gradle file but I get a error:
Error:Execution failed for task ':app:...