Android Compilation: No rule to make target - java

I am trying to compile an android kernel from source for an ODROID-XU4 (http://www.hardkernel.com/main/products/prdt_info.php?g_code=G143452239825). I downloaded the source, added a few custom drivers & external programs, and now I am trying to create a git repo with all kernel source & custom source. Before I created the repo, my source compiled and deployed fine. After creating the repo, pushing my source, and then cloning it back to my machine, the source no longer compiles. Running make at top of the new source results in the following error:
Install: out/target/product/odroidxu3/data/nativetest/dalvik-vm-unit-tests/dalvik-vm-unit-tests
make: *** No rule to make target out/target/common/obj/JAVA_LIBRARIES/android_webview_java_intermediates/javalib.jar, needed by out/target/common/obj/JAVA_LIBRARIES/webviewchromium_intermediates/classes-full-debug.jar. Stop.
I believe the problem is with my .gitignore files. I think that pushing to the repo leaves behind some crucial files that are necessary for compilation, but I'm having trouble finding out which files are not included. Any suggestions as to what files might be missing?
For clarification, I have two source trees, one is the original (which compiles successfully) and one which is an exact clone of the original, but is missing files specified by the default .gitignore files.
Also, the android source I downloaded and have been modifying was from here: https://github.com/hardkernel/android.
Any help is appreciated.

Delete external folder in your AOSP root directory and replace it with the original one.

Related

Decompiling and recompiling frameworks.jar in android stock rom

I came across a situation where i have to put some debug logs inside some code methods of PackageInstaller.java in my stock ROM.
https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/content/pm/PackageInstaller.java
I found that file is deodexed in classes.dex file inside frameworks.java of system folder in the ROM folder. I came across that decompilation will give me the java files (not completely 100% accuracy in code content). So I expects= that these incomplete code base will make blocking in my stock ROM functionality.
So i thought of grabbing a seperate module from this will give me a 100% code base.
https://github.com/android/platform_frameworks_base
So the question is how can I make this git repo to build a new frameworks.jar file?
Compile the repo into a jar file, using usual compilation methods in terminal (CLI).
Or you could even try the docs part in the repo link. The HTML files in the docs folder will surely help you execute the repo.

IntellIj IDEA cannot find source files

I'm trying to attach sources for this library called FileDrop so I can view documentation. When I click Attach Sources... and select the directory with the source code, nothing changes. It still has the Sources not found message at the top of the class. However, in my external libraries section, if I manually expand the library jar file, I can view the original source in there. I think this is because the library jar has the full, uncompressed source in it.
The zip file of the library has this structure after downloading and extracting it:
filedrop-1.1
Example.java
filedrop.jar
FileDrop.java
So the source files do not have any package...not sure if that is part of the problem. The two .java files are also in the jar file. So when I create a library in IDEA, the jar shows up in External Libraries under the library I created, but the source does not.
In the Project Structure -> Libraries screen, it shows the jar file under Classes, and it shows the parent directory (filedrop-1.1) under both Classes and Sources, but it is apparently not detecting any sources within them. This is the screen where I've been trying to add the sources, and they show up here as expected, but apparently no sources are found.
This is IntelliJ IDEA 13.1.4.
The packaging of this library is extremely weird. The jar file contains two different FileDrop classes, one in the default package and another in the net.iharder.dnd package, which seems to be a newer version. It also contains two source files (Example.java and FileDrop.java), the second of which seems to be the source code of the old version of the class (the one in the default package).
The CVS repository at http://iharder.cvs.sourceforge.net/viewvc/iharder/filedrop/net/iharder/dnd/ seems to contain the new version of the code, so you can do a CVS checkout and attach the iharder/filedrop directory from the checkout as sources to the library.

Removing an unwanted directory folder from netbeans and fixing a "is already under version control"

I have two issues i would like to get fixed, yet in my attempt to fix the issues i have managed to descend down to an angry primate screaming and shouting at my pc.
Here are my issues (some of which cannot be solved by an online community),
Earlier today i thought it would be a great idea to create a folder called "res", res would be used to store images and wav files for a game i am making. Now, if the wav file i am testing is not inside this folder and the directory to the wav file is right it works fine, it looks like this ".getResource(fileName);". But when i do have the wav file in the "res" folder, i changed the directory to the following .getResource("res/"+fileName); i get the following
warning: [options] bootstrap class path not set in conjunction with -source 1.6
1 warning
as well as a nullPointerException pointing to all the stuff relating to sound.
So after being incredibly frustrated, i removed "res" folder, then the project stopped compiling as it cannot find "res", so i recreated res folder, keeping the wav file out of it which worked just fine. I then felt happy about it and thought, ya i'm done for a while, lets commit this to SVN.
On attempt to commit my work i get a "is already under version control" error for the "res" folder
so to recap this
i created a folder called "res" in my project folder (via netbeans)
i put a wav file into "res" and found it threw errors
i removed the wav file from "res" and it worked just fine
i deleted res folder and project refused to compile without this very important folder
i recreated res folder and then tried to commit my work to SVN and SVN doesn't want my children anymore.
I am now left with children i cannot put somewhere safe and an unwanted ghost in my house (folder in my project folder that wont do anything)
assistance, as always is greatfully accepted and welcomed.
With respect to the SVN problem:
NB tends to add or delete directories on SVN automatically (but not commit) and it might be confused after the delete/recreation.
I'd suggest using a different tool (SVN command line or TortoiseSVN, for example) to verify which operations does SVN are pending and try reverting operations on the res directory. If SVN marks res as existing then you might try veryfing that the directory is not already on the repository.
Also you might remove the SVN cache from your Netbeans directory (previously called %HOME%\.netbeans\cache\svn and now (NB 7.2) changed to %HOME%\Netbeans\Cache\7.2\svncache.
An extreme solution would be to make a new checkout and copy your changes from the old working copy to the new one.

Eclipse SVN always includes auto generated bin dir and classes no matter what I do

I am using Eclipse Juno with Subversive plugin.
I have a java project set to compile automatically which creates a lot of bin dirs
No matter what pattern i put in window-> preferences->->team->ignored resources, eventually i see the bin dir and all of it's sub dirs in the team synchronizing perspective as new uncommitted files.
I have tried the following syntax:
*/bin,**/bin, */bin/, */bin/*
No luck.
Also, I have noticed that sometimes if I close eclipse and start it again, the ignored files disappear from the team synchronizing perspective as required, but still, some bin dirs are still present. This whole thing is very inconsistent.
Any idea ?
I have forgot to mention that I am using two worksets, one is the subset of the other, this add buggyness to the whole process appearently
Try the "Subversive SVN JDT Ingnore Extensions". It is located on the Juno Update Site, under "Collaboration". Its description says:
The feature is useful for Java development because it allows to automatically interpret output folders as ignored resources.
Seems like exactly what you want. Also, it should work independently of the name of your output folders which is an advantage if you use Maven for example (in that case, your output folders will probably be called target and not bin).
I gave up and switched to Subclipse. Now everything seems to be working fine, or at least less buggy.

Eclipse run old version of program

I have a problem while runing my application in eclipse. I make some edits like this:
String res = "newvalue";
System.out.println(res);
But when I run the application I still receive "oldvalue" in output. After this I tried to delete main() function - and I run application and I see "oldvalue" in output again.
Maybe it's some cache in JVM, or smth. else?
UPD:
It's 15:35 on my clock now. But in /bin folder I see .class files with 14:33 timestamp. I change source files (.java), press ctrl+f11 in eclipse and files in /bin folder are still 14:33 ...
UPD2:
After cleaning the project I receive the following problem:
The project was not built due to "Could not write file: D:\projects\NelderMead\bin\ru.". Fix the problem, then try refreshing this project and building it since it may be inconsistent
SOLUTION
The problem was that eclipse can't write file to the folder with spaces and UTF chars in it's name. So, I copy project to the new clean workspace and it runs without problems! Thx all for help detecting the problem!
You're executing an older class files, the reason could be
a compile error somewhere else (see problems view)
or your changed accidentally the source path so that the new source no longer gets compiled.
Try to clean the project and make sure the new classes are compiled to your output folder.
The JVM doesn't have a cache for class files.
First, make sure the file is saved (there is no asterisk next to the file name in the tab). Usually files are saved automatically, but you could choose not to save files and never ask by mistake, the first time Eclipse pops up this dialog.
Then see what's going on in the Problems view. You might see something like project cannot be built due to the following reason. It may be because of compilation errors in the dependent projects.

Categories