Building Android 4.3_r1 on Ubuntu 16 LTS Errors - java

I am looking for help with the Android AOSP setup for a project. I am trying to build Android 4.3_r1 from source on Ubuntu 16.04.3 LTS (Xenial) , I have installed all the dependencies and the oracle Java 6 . The build runs well until one point where I get the following error :
******************************
You have tried to change the API from what has been previously
approved.
To make these errors go away, you have two choices:
1) You can add "#hide" javadoc comments to the methods, etc. listed
in the errors above.
2) You can update current.txt by executing the following command:
make update-api
To submit the revised current.txt to the main Android repository,
you will need approval.
******************************
Tried removing the current.txt ,redoing the steps from scratch , make update-api also still facing the same error.Any help would be appreciated .

So after trying out several fixes it did not work out for me, so i reinstalled java and the AOSP to get it to work.

Related

Flutter: (location plugin) build issue due to java sdk

I am using flutter location package ^4.1.1 and this is the error message I am getting.
My flutter doctor results show that I am using JDK 1.8..
So my question is, do I need to configure the java source in my flutter project, in the build.gradle or some other place in order to make it point to my current version of Java? In my build gradle I did see a dependency implementation of kotlin pointing to jdk7. Tried changing that to jdk8 but didn't work.
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"}
I've done a ton of searches on google but couldn't find anyone in the same predicament as me which is why I finally gave up and had to make an account here to ask for help. Just a side note, I am using vscode for developing this project as part of a flutter course. Thanks in advance for the help.
[RESOLVED] Turns out the issue was not on my side but the developer's version of the package. He has released a patch fix to that package ^4.2.1. 3 days wasted trying to fix this issue on my end but all's well that ends well I guess. Hope this helps someone else facing the same issue.

ADT Eclipse SDK troubles - No DDMS found

Please help me, I'm having serious trobules with Eclipse for the second time.
I'm following a guide and in these last days my Eclipse used to work fine (and was heavy 600 mb), now after the updates I did recommended by the guided, it downloaded a lot of things for hours and my folder now is 12.6 GBs (and it's pretty uncofortable since I'm on a not too large SSD).
The problem is that the old ADT worked, after the update every project gives errors, like there is no Android SDK.
The console gives me this error
[2014-11-18 22:37:33 - DDMS] DDMS files not found: C:\Users\Ruggiero\Desktop\Ruggiero\android_dev_environment\sdk\tools\hprof-conv.exe
If it can help you, when I run Eclipse it shows me this error message
Now, the most obvious thing would be "just press Check for updates".
When I do it, it says me there are no updates.
So I go for "Install new software" and after I go to the link (official Google link) and try to install the updates it gives me this error
error2 http://s7.postimg.org/h5r1gaa63/eclipseerror2.png]
Please do not flag as duplicate as I already searched on the web and StackOverflow too and even if I found similar troubles, no one was equal or really close to mine.
I had a similar problem. The only way I could make it work was to completely uninstall Eclipse and Android SDK and reinstall again.
There are likely workarounds for this, but I think I suggest just downloading a fresh Android bundle (with all the correct updated software), and install it fresh.
I have had experiences where something goes wrong in the tools update, and found the simplest way to correct is to uninstall my existing tools and start fresh. It is easy to install the bundle, and you will know you have all the correct packages and software installed.
You will spend a bit of time trying to debug your install, it will be quicker to install a fresh instance.
I self resolved by switching to Android Studio IDE

Eclipse - All tools & API's Installed R still not autogenerating

I am using Eclipse on Ubuntu 12.04. I have created a new Android Application Project, gave it a default name. It's being compiled with 4.4. I have created this project in my workspace. Right from the get-go I do not have R generating when I do have EVERY single install-able package installed.
Every single "solution" I have seen as far as this topic goes had to do with Build Tools not being installed or xml issues. I have tried removing dependencies, purging eclipse, and reinstalling. After re-installing, I re-install all packages, but it still is not generating R.
I am new to Android Development, and I am at a serious loss for words. Whatever further information I need to provide let me know. I am really looking forward to getting started but this is obviously holding me back.
Side Note: I have also tried cleaning the project, restarting eclipse, and restarting my computer.
EDIT: This has to be some setting outside the development environment. I downloaded android-studio and I STILL get that R cannot be resolved to a variable. Seriously at a loss...
I figured it out. After installing a different IDE and the same results occured, I figured it had to be something with the system. I did not realize the fact that I was on a 64bit OS would have caused a conflict, but I guess it did. After following the steps provided by stackoverflow.com/questions/14421171/… I was able to successfully create a new project that created the r file...

Attempting to create new Android Application with adt tools in Eclipse. R.Java missing, even after clean and rebuid;

Having a problem creating my new android application. I create the new project and I get the error that R cannot be resolved to a variable. I don't import (as I seen not to do on other threads similar to this). I clean and rebuild but R.Java never appears in gen. I've tried a few things but to no avail. Might this be a problem with the version of ADT tools I downloaded or is there something else wrong?
EDIT: This is on windows
Your project fails to generate R file only when your project fails to build. 99% this is due to an error in your XMLs.
Double check your recently changed XMLs for errors.
Check your xml file ,solve the error,Restart project and perform cleaning again. If that doesn't help then follow following steps:-
1. Delete the project.
2. Create New project.
That will resolve the issue
I have just worked through this problem, so I can provide the answer that worked on my system, which is Ubuntu 12.10 64 bit. I found that the following three libraries needed to be installed: libncurses5:i385, libstdc++6:i386, and lib32z1.
The first two libraries are required to run adb. You can test if they are needed by going into /tools or /platform-tools and running adb. If you get an error saying the adb file is not present, but in fact, you can see that it is present, then one part of the problem is that you need these two libraries: libncurses5:i386, and libstdc++6:i386. You can install them with
sudo apt-get install libncurses5:i386 and
sudo apt-get install libstdc++6:i386.
That will get adb working. But I found that this wasn't enough. To automatically generate the R.java file when creating a new project you also need a third library: lib32z1. It can be installed with
sudo apt-get install lib32z1.
That worked on my system, I've listed the guides that I found helpful in a blogpost. If you're building on a different platform it would be helpful if you would clarify the platform that you are developing on.

Java/Eclipse - No more R file ever

I'm on Eclipse for hours now and I didn't found a solution yet for my problem even after many searches on internet: I have no more R.java file on my projects.
On just created or on my old projects, i don't have R file anymore and I tried so many solutions (uninstall, re-install Eclipse, clean my project, check all my XMLs, fix problem with android tool and so on ...)
Please someone can tell me what to do in this case?
Hey If you just updated to ADT Rev 22 :
I had the problem too. There is a new component in the Tools folder called "Android SDK Build-tools" that needs to be installed.
Step 1
Open the Android SDK Manager
Step 2
Select the newly added Build Tools and install. (If problem stays then go to Project Properties => Java Build Path => Order and Export and check Android Private Libraries, then clean and build project.
It may be necessary to repeat the process, restart the SDK Manager after the update and make sure it looks like this (all tools installed):
More info:https://groups.google.com/forum/?fromgroups=#!topic/android-developers/rCaeT3qckoE%5B1-25-false%5D
Perhaps in Project Properties -> Java Build Path -> Libraries you don't have:
Android 4.2.2 (or other version)
Android Dependencies ?
If so, then right click project - > Android tools -> fix android properties
and see if this library showed up.
Thank you all for saving me! I've spent the whole afternoon on search this error.
Finally, my project works.
By the way, I also encountered one problem which i wanna share with you:
After upgrading, even if my project has not errors anymore. During runtime, it seems it couldn't find the classes from the jars placed in \libs.
Go into Project=>properties => Java build path= > Order and Export.
Please make sure all your jars are checked.
If this problem occurs suddenly in a well working project,
the first step is to find whether the problem occurs only in the current project or in all other projects.
if all other projects in the current workspace are working then 90% problem is with XML / mainfestfile/resourse file that you edited recently.
This error is not shown as red mark we have to find out what we have done recently in these files.
try this
sudo apt-get install lib32stdc++6 lib32z1 lib32z1-dev
it solved my problem
Close your eclipse and after refreshing system, try to open Eclipse again. I think you are using Emulator along with the eclipse. It may be because of the low Memory problem (RAM) of your system. I used to face the same problem when I use Emulator
whenever there is any mistakes in any of the xmls the R goes missing when a build or clean happens so check for any xml errors in your project unless you fix it you cant get back your R on clean or build. fix the xml files and perform a clean you will have the R generated. Also check in File->properties->Builders and see if everything is checked
I was using Eclipse Indigo and nothing I tried worked. I ended up downloading Juno SR2, reinstalling the ADT, and now everything works again.
Reinstall everything and it'll work.. i.e. go back to Google SDK or w.e. you're using and download it.
Update it to latest in SDK Manager.
Go into Eclipse-Project-Prefs-Java build path-order/export TICK EVERYTHING.
problem: No R file get generated.
guess: Try cleaning project if it is old one. Else create new project with no R get generated and with no compile errors but this: no project.apk
In this case you have to check your SDK for the built-tools. May not be installed after updating SDK.
Thus download them if not download here, then put them under directory: SDK/built-tools folder. Lastly, and most important, is to Run the SDK As Administrator. This guarantees refreshing SDK with all packages appearing in it.
Install the SDK-Built-Tools or any missing packages according to the above link and you're done.
hope this helps.
Try one thing, create a new Android Project and transfer all those files which are in the previous project. That worked for me.
In my case there is error due to "&" inside strings.xml file(but error not shown) for declaring string for a array type. Now the problem has been solved as I changed "&" to "and".
So, please make sure that you do not have such silly use of symbols, and clean the project.
I have had the same kind of problem, however Rechecking all XML files in the Resources folder was helpful in my case. I found syntax error in my XML files. Cleaning and building the project again can be helpful sometimes too.
I had the dreaded not more R.java.
Some of the things I've used in the past:
Clean / rebuild (the first thing we all try)
Restart eclipse (optionally reboot pc/mac)
Update both SDK/ADT eclipse plugin to latest version
Create new eclipse workspace and import project
Enable Verbose AAPT build output Eclipse menu>Preferences>Android>Build
Port project to Android Studio / Gradle (this helped my actually see the AAPT error i was getting Error Code:138)
Delete recent XML changes - Ultimately I found deleting recent menu.xml files I'd added and commenting out where they were referenced fixed the issue and I finally got R.java.
I got the error recently and had found no fault in any layout or value file. After a lot of tries I add another Activity and the R.java was build and the error disappeared. I don't know why this occur, but it takes me hours.

Categories

Resources