AAPT.exe crashed after added the Aursama kernal in Project - android

I am trying to integrate Aurasma kernal with my android application. I followed the instructions as given in the http://www.aurasma.com/partners/support/Aurasma%20Kernel%20Guidelines.pdf. The build fails with aapt.exe crashing in the pre-compilation phase.
The manifest file has the settings as - minSDKversion: 8 targetSDKversion: 14
Following are the libraries in my application:
android-support-v4.jar
facebookSDK.jar
FlurryAgent.jar
httpclient-4.1.2.jar
httpcore-4.1.2.jar
httpmime-4.1.2.jar
apache-mime4j-core-0.7.jar
myttjson-1.7.1.jar
scribe-1.1.0.jar
trace.jar
I found httpmime-4.11.jar and apache-mime4j-0.6.1.jar in aurasma kernal build path. Because of this, I got an error that there are multiple dex files. I removed these jars from my application's build path. The issue of multiple dex files is resolved, but Aapt crash remains.
Assuming that the problem could be limited to the Windows version of Aapt, I tried it on a Mac. After nearly the same time and steps, Aapt terminated with an error code 139.
i have changed the Windows > Preference > Andriod > Build > Output to Normal and Verbose but the Aapt crash remains.
Please help me to resolve this issue

i have resolved the problem,in my project style.xml for some of the styles definitions have android:id , this causes the aapt crash, after i removed this its working fine.

Related

Error when compiling with Gradle (can't find downloaded dependencies)

I develop an app generation system that is regenerating apps by command line Gradle compilation commands.
In my Windows Server 2008, I'm facing a problem after updating to the last Gradle version and Gradle plugin version.
When compiling I'm getting this errors:
C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-1\files-1.1\appcompat-v7-25.0.0.aar\e93435c34d5cae8b6677dcef529711a5\res\drawable-xxhdpi-v4\abc_text_select_handle_middle_mtrl_light.png: error: file not found.
C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-1\files-1.1\appcompat-v7-25.0.0.aar\e93435c34d5cae8b6677dcef529711a5\res\drawable\abc_btn_colored_material.xml: error: file not found.
C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-1\files-1.1\appcompat-v7-25.0.0.aar\e93435c34d5cae8b6677dcef529711a5\res\drawable-hdpi-v4\abc_textfield_search_default_mtrl_alpha.9.png: error: file not found.
and a lot more of errors like those...
I'm not sure why I'm getting this error, because the file is correctly downloaded and it's correctly located on that exactly direction.
It has a path length of 204 characters, so supposedly it's not surpassing the limit of 255 path characters on NTFS Windows file system.
It is possible to change the location where Gradle downloads it's cached dependencies? Is this problem caused by this or by other thing?
finally i solved this setting the environmental variable GRADLE_USER_HOME in windows to c:/gradle-cache
so definitively it's related to file path lenght
I meet this same error in windows jenkins
I solved this error.
gradle assembleDebug -g C:\gradle-cache
-g:
gradle -h
-g, --gradle-user-home Specifies the gradle user home directory
Path length cause failure.
I defined
"-Dorg.gradle.user.home=%GRADLE_USER_HOME%"
in gradle run parameters and it solved the problem.

Compiling Hello-Jni failure in eclipse only when opening the hello-jni.c file in eclipse

I have been trying endlessly to build the sample HelloJni sample project for the Android NDK.
How I set up the environment:
I followed the instructions of the getting started in the docs: android-ndk-r10d\docs\Getting_Started/html/index.html:
Downloaded Eclipse Luna
Downloaded the Android SDK
Downloaded the Android NDK: android-ndk-r10d
Set the NDK installation folder in eclipse in preferences window -> android -> NDK.
Imported the hellp-jni sample.
Right click on the HelloJni Project -> Android tools -> Add native support.
Cleaned and Built the project.
Ran on my device the HelloJni library (not the tests)
And the app is running and everything is WORKING and I can see the generated .so file per architecture in the libs folder of the project (for every architecture, for example armebi, mips, etc...)
Here is a Print Screen showing everything is working:
Now here comes the strange part...
The Problem:
If I open the hello-jni.c file for editing or viewing in eclipse, I suddenly see compilation errors and I can't build and can't run the project anymore...
Here is a Print Screen showing that after i open the file, I suddenly get compilation errors:
What I have already tried but failed:
Adding the Android Native Nature, then removing it by:
Deleting the .project file,
the buildCommand tag of: org.eclipse.cdt.managedbuilder.core.genmakebuilde,
the buildCommand tag of: org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
and removing the lines:
[nature]org.eclipse.cdt.core.cnature[/nature]
[nature]org.eclipse.cdt.core.ccnature[/nature] [nature]org.eclipse.cdt.managedbuilder.core.managedBuildNature[/nature] [nature]org.eclipse.cdt.managedbuilder.core.ScannerConfigNature[/nature]
removing the .cproject and all compiled files.
Then adding back the Android Native Nature.
According to this stackoverflow link:
Eclipse ADT - Unresolved inclusion jni.h
Failed
Once I got the error of (I am not getting it anymore): Unable to launch cygpath. Is Cygwin on the path?] java.io.IOException: Cannot run program "cygpath". So I Googled and I changed the build settings to give the absolute path of my NDK installation folder:
According to this stackoverflow link:
Unable to launch cygpath in android
Here is a Print Screen:
Failed
Changing the Used tools from Android GCC Compiler to GCC C Compiler
according to this stackoverflow link:
Android NDK build, Method could not be resolved
Here is a Print Screen:
Failed
Copying an eclipse Luna installation from a friend that has the project working for him.
Failed
I have been spending hours on this and I couldn't find any solution to why this is happening.
PLEASE HELP
This is a common problem when you try to edit a C/C++ file inside a JAVA workspace/perspective without the proper configuration. You can simply select all the entries in the Error Log and delete them.
FWIW, Eclipse seems to have issues with the r10d version of Android NDK. See https://code.google.com/p/android/issues/detail?id=97023. I suggest you try r10c instead #worksforme :)

Problems importing the android support library with resources

As soon as I finish importing the android support library project into my workspace (I am using eclipse ide), I receive this error message:
Could not not write to file: C:\Program Files\extras\android\support\v7\appcompat\bin
The library project appears in my workspace, however if i try a clean build:
Errors occurred during the build. Errors running builder 'Android
Package Builder' on project 'android-support-v7-appcompat'. Resource
'/android-support-v7-appcompat/bin' does not exist.
Here is the stack trace:
[2013-12-17 18:11:20 - android-support-v7-appcompat] Android requires
compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use
Android Tools > Fix Project Properties.
The error log also states that bin folder does not exist/cannot be written to.
Here are things I have tried so far and failed:
1. Clean build
2. Install then re install
3. Fix android properties.
I have not used any of the API from the support library.
Open the project properties in Eclipse. Choose Java Compiler and make sure the Compiler Compliance level is set to 1.5 or 1.6.

Project has no project.properties file! Edit the project properties to set one error

I am getting the errors:
Errors occurred during the build.
Errors running builder 'Android Resource Manager' on project 'DashboardActivity'.
java.lang.NullPointerException
and
[2013-09-02 17:55:31 - DashboardActivity] Project has no project.properties file! Edit the project properties to set one.
and
Description Resource Path Location Type
The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files UserFunctions.java /DashboardActivity/src/libary line 1 Java Problem
and
Description Resource Path Location Type
The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project DashboardActivity Unknown Java Problem
I have already tried cleaning the project and I get the same errors. Only the 'DashboardActivity' project is the one getting this error and my other projects work fine. In my properties Order and Export section there is a part that says "Unable to get system libary for this project"
I know there should be a proper android.jar file here but I don't see one.
Also, the android tools 'fix project properties' does nothing at all when I click on it.
I have the AndroidManifest.xml file as well.
Ever since I first went to clean my project it has created the file "proguard-project.txt" as well.
What can I do to fix this? Thanks in advance!
NOTE: now I can't acess the gen folder or bin folder (there is no little + for me to click on to open it) and now it's saying that R cannot be resolved to a variable) ???
Error while applying
Why don't you do this
Right click on Project Root folder > properties > Java BuildPath > Library Tab
Check whether any of library is missing (showing error with red cross)
if yes then add this library to your project
don't forget to CHECK it on Order and Export
Do one more thing
Right click on Project Root folder > properties > Android > set your Project Build Target
check any one target
Check your Android-sdk path from
Window > Preference > Android
I was also having these errors:
The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object.
and
The Project Properties Order and Export section has an error "Unable to get system library for this project"
I solved it by Right Clicking on the Project Root folder > properties > Android > set your Project Build Target and changed it to the highest target I could trust from working on other projects.
It has been 3 years since I had this project working. So I noticed when I was troubleshooting tonight, that the manifest did not have a targetSdkVersion, only a minSdkVersion of "8". So I had changed that to this:
After doing the above 2 things, all my errors were gone -- however (!) ... a bit later tonight, I was trying to export my project to an .apk. And Eclipse crashed. Upon re-opening it, Eclipse is super broken. I am about to do a re-boot my PC now - and thus need to finish posting this. I trust Eclipse will be back to normal. But the reason I am mentioning this is that I suspect I may need to re-install Eclipse as I have been getting other minor start-up errors when I open Eclipse. And the errors I had tonight in that app were very strange and unusual.

Adding android library project to an android project prevents Ant from building

I'm adding an android library project to my android app (in this case, Beintoo). It's not mine; It's an external library. However, it doesn't come with a build.xml. Building in Eclipse works fine, but when I attempt to build my app with ant, I get this:
BUILD FAILED
C:\Sandbox\MyProject\build.xml:110: The following error occurred while executing this line:
C:\Sandbox\MyProject\build.xml:41: The following error occurred while executing this line:
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:515: Invalid file: C:\Git\Beintoo-Android\beintoo-android-sdk\BeintooSDK\build.xml
It's perfectly true. The file is invalid, because it doesn't exist. I wouldn't know what to do to add it safely, nor if that's even a good idea.
I have learnt that I can't simply build the library project into a jar. How can I get my project to build in Ant with this library project?
Ok, so, Error 454's answer was close, but not quite right. Since r14 of Android Tools, every library project must have it's own build.xml if it is to be built by Ant, as noted here:
https://groups.google.com/forum/?fromgroups#!topic/adt-dev/Z2e3dY-3Ma0
Running android update lib-project (which, as Error 454 notes, is in the android-sdk/tools folder which should be in PATH) on the library project will add a generic build.xml, and allow the main project to build.
For library projects, you need to browse to the library project root and run:
android update lib-project -p .
The android executable is in the android sdk/tools folder which should be added to your path variable in your OS. Once you run this, the necessary build files will be generated and your ant build should succeed.
Similarly, if your root project doesn't have the necessary build files, you will need to browse to the main project root and run:
android update project -p .
Additionally to the two previous correct answers I had to add --target android-16 because I was getting an "Error: The project either has no target set or the target is invalid."
So in my case
android update lib-project -p . --target android-16
Did it. (replace the 16 as you need)

Categories

Resources