Unable to execute dex: Multiple dex files define Lcom/actionbarsherlock/R$attr; - actionbarsherlock

i use ActionBarLibrary in a library, that I use in a my app
i got this message when i try to compil
[2013-01-28 16:09:46 - Dex Loader] Unable to execute dex: Multiple dex files define Lcom/actionbarsherlock/R$attr;
[2013-01-28 16:09:46 - comfree] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/actionbarsherlock/R$attr;

As asked here, I was facing the exact same error yesterday. I pinpointed the cause of the error to /bin/classes. If I deleted the /classes dir before running the app, the app would compile and run. Of course, when I tried to actually export the app, the /classes dir would come back and along with it the error.
The solution to my problem was to install the latest version of Eclipse. You will then need to install the latest version of the ADT but all the Android versions you have downloaded earlier for the other Eclipse installation will be detected and used for this one as well. When I export or run the app through Eclipse, the /classes folder does not appear now.

right click on project to go project property>>java Build path>>choose Order and Export and then Unselect all except android4.0 or what every you have then clean and build your project ,now error not come again..

The solution to my problem was that I deleted the jar files which I copy pasted in project's lib folder. I explicitly imported external jars in build path

Related

TeamCity WindowsAzure.targets causing errors in deployment

We are currently trying to setup an Angular 2 project that also contains a Cloud Service project in its solution. We have set up numerous Angular 1 projects containing Cloud Service projects and have had no errors. When trying to run the MSBuild step for the Angular 2 project, we get the following error on the TeamCity build server:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Windows Azure Tools\2.7\Microsoft.WindowsAzure.targets(2787, 5): error MSB3021: Unable to copy file "C:\TeamCityBuildAgent\temp\buildTmp\.NETFramework,Version=v4.6.1.AssemblyAttributes.cs" to "C:\SourceControlFolder\Apps\MyApp\MyApp.CloudDeployment\obj\Debug\Website\C:\TeamCityBuildAgent\temp\buildTmp\.NETFramework,Version=v4.6.1.AssemblyAttributes.cs". The given path's format is not supported.
The main problem seems to be the build attempting to throw the full C:\TeamCityBuildAgent.. path into the obj\Debug\Website folder.
My current MSBuild parameters are:
/p:Configuration="Dev"
/p:platform="Any CPU"
/p:OctoPackEnforceAddingFiles=true
/p:OctoPackProjectName=MyApp_Dev
I've tried the following solutions:
Making sure the latest Visual Studio Update is installed (for MSBuild)
Running the install tool to repair Azure Tools 2.7 on the build server.
Changing the debug configuration in the build.
Ensuring TypeScript 1.7.6 is installed on the build server (even though it's an Azure.targets issue) [https://github.com/Microsoft/TypeScript/issues/6215]
Updated the project to Azure Tools 2.9. The same error remains except it's failing on the 2.9 folder instead now.
Curious if anyone else has experienced this error and knows a fix. I'll keep this post updated as I try other solutions.
Update
It appears that what is causing this issue is this line within the .csproj file:
<FilesToIncludeForPublish>AllFilesInProjectFolder</FilesToIncludeForPublish>
This is specified for our build configurations to copy all files generated by the ng build to the output directory of the publish. What I don't understand at the moment is how this works on all of the devs' local machines but does not work on our build server. Will keep this posted as I find more info or any kind of workaround.
This ended up being the fix:
Instead of targeting the .sln in MSBuild, we specifically targeted the .csproj file. This fixed the build errors and allowed us to keep the FilesToIncludeForPublish tag inside.

Nodejs TFS Build Definition

Can anyone let me know how the build definition for a node.js application should look like? Also how to mention the mocha tests in the Automated tests?
First time when I tried to queue a build, I got an error saying:
Microsoft.NodejsTools.targets not found.
So I went and copied the NodejsTools folder with the .target and dll file in my build server. And I didn't see the error.
Now I get the below error:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets (132): Could not copy the file "obj\Debug\OstNodeJs.exe" because it was not found.
You need the node.js framework and the Visual Studio node.js Tools on you build server, too. You just copied the necessarily files and this may result in other problems.
For the executable copy problem you can try to add <Disable_CopyWebApplication>True</Disable_CopyWebApplication> in the project file. See here: Build on TFS wants to copy a executable from Node.js test project

Error while adding mp4parser library to a project in android studio

I'm trying to use mp4parser library in my project. My android studio version is 1.0.2. Here's what I've done so far:
I've downloaded mp4parser zipfile from the link: https://github.com/sannies/mp4parser
I've extracted the zip file to MyProjectName/app/libraries
Renamed the folder to mp4parser
Add this line of code to settings.gradle file:
include ':app:libraries:mp4parser'
Add this line of code to build.gradle (in dependencies block):
compile project('libraries:mp4parser')
Now I want to sync the project with gradle files. This error pops up:
Error:Configuration with name 'default' not found.
I don't have this problem with other libraries. Seems that its only mp4parser that I have problem with. How can I fix this?
If you're including the library as source, the best thing to do is to unpack it somewhere and import it as a module.
The error you're getting is cryptic but it means that the build system is looking for a build.gradle file at that location and not finding it (or it doesn't see an apply plugin statement in the file telling it what to do). I'm assuming that the library you're trying to use doesn't have a Gradle build script.
If you import the library using the Android Studio UI, a build script will be generated for the module and you should be good to go.

Visual C++ - cant see which external missing

I try to build my multiproject application in Visuas C++ 10 in release mode.
I get the next link error:
2> All outputs are up-to-date.
2>PidAppLib.lib(ThreadWin32.obj) : error LNK2011: precompiled object not linked in; image may not run
2>C:\infinite_memories_svn\projects\sw\NewPidTools\PidWriter\Release\PidLabler.exe : fatal error LNK1120: 1 unresolved externals
2>
2>Build FAILED.
How can I know which object unresolved?
ThreadWin32.obj is external lib which was downloaded from internet.
Ok.
I've solved the problem.
I have 2 libraries, let say a.lib and b.lib, and project, c.
a.lib uses b.lib so in librarian dependencies of a.lib I added b.lib, c uses a.lib so I added
it to dependencies.
It works in debug but in release I should also add b.lib to dependencies of c.
Strange but it solved the problem
I had this error in a large project I was refactoring. During the refactoring process I would occasionally compile individual source files to check changes I'd made without having to build the entire project. Depending on your project configuration this can result in .obj files being output in a different directory to where they would normally be output when you build the project. In my case the .obj files for source files compiled manually were output in the source code directory instead of the intermediate build directory.
A side-effect of this appeared to be that when building the whole project, source files that had been manually compiled might not be recompiled even if other changes elsewhere meant they should be (like a change that required recompiling the precompiled header file).
The solution for me was to manually delete all .obj files generated by manually compiling individual source files. Depending on project configuration executing Clean on the project might also work.

Error with cssparser-0.9.5.jar in Netbeans using richfaces/JSF

For some reason when I make minor chances to the title or anything linked to css I get the following error:
Deleting directory C:\Users...
C:\Users...\nbproject\build-impl.xml:1057: Unable to delete file
C:\Users...\build\web\WEB-INF\lib\cssparser-0.9.5.jar
BUILD FAILED (total time: 6 seconds)
Line 1057: <delete dir="${build.dir}"/>
I undid the changes but the error seems to persist.
Why would it want to delete the cssparser jar file?
What's the solution to the problem.
I am using Richfaces in JSF using Netbeans as my IDE, thanks.
By default, NetBeans does a Clean to the project, that means NetBeans will try to delete the compiled files and any libraries it has copied into the deploy directory. In Windows, NetBeans can't find the deploy dir and shows this error, specially when this dir is inside My Documents. I recommend you to change your project directory, or just performing Run or Debug, these commands will Compile, Build, Deploy and Launch your application so there won't be the Clean error.
For more info, see http://forums.netbeans.org/topic39444.html

Resources