w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Difference between C# Test Project and C# Class library Project
The test project will, by default, have all the MSTest references added for you automatically. Also some default examples, such as a simple example test, is created for you. With the class project, you can build a test project from that too, but you manually have to add the MSTest references yourself. Not a major problem really, but the test project can save you time and hassle. EDIT: As noted in the comments, the big difference between the two project types is that, with a class project, you can choose whichever unit testing framework you like.

Categories : C#

java servlet project and android library project in eclipse - NoClassDefFoundError
First of all - I believe Java Web Project will not work with any of Android specific classes due to many reasons. If your MonitoringModel contains some Java code that you want to share between Android and Web application you can extract it to separate Java project and use a Link Source option in Properties->Build Path to link it to both projects.

Categories : Android

Double facebook sdk import, in my android library project and in target project
I faced the same problem, this is what i did. Hope it helps you too. Remove all the libraries in your project.(Properties->javaBuildPath->library(tab)->select dependancy folder->remove) Now go to libs and remove the library.(your project will show some errors, never mind) Finally import the library that contains the sub library.

Categories : Android

Eclipse: How to import git project as library for Android Project which has to be pushed to Bitbucket
If the library is a .jar file, you can simply paste it into the libs folder of your app. Android should automatically add it to the build path. As far as pushing/pulling from BitBucket goes, as long as you add the .jar file in git the library will be committed like any other file.

Categories : Android

How to refer to a resource not in the Library Project, but only in the dependent Application Project?
If it is only happening infrequently, you can try this: vv.setVideoURI(Uri.parse("android.resource://"+getPackageName()+"/"+getResources().getIdentifier("welcome", "raw", getPackageName()))); Not as performant as using the id, but it should work.

Categories : Android

How to call a drawable which resides in app project from library project in android?
You shouldn't do this. The whole point of a library project is that it is either self-contained or it is dependent on other library projects but not the main app project. You can have public methods in the library project that the app project can use to pass values but you shouldn't directly access variables from app project in the library project. If you do this, the library project would be dependent on the app project and would no longer be modular, thus defeating the whole point of making it a library project in the first place.

Categories : Android

split an existing iOS app project into static library and app skin project
The main app project can make use of your static library classes through exported header (.h) files. I would recommend reading a bit about them here: http://developer.apple.com/library/ios/#technotes/iOSStaticLibraries/Articles/creating.html And creating the static library here: http://www.icodeblog.com/2011/04/07/creating-static-libraries-for-ios/ As for providing the app-specific settings to your static library, it sounds like your static library might need to contain a ApplicationSettings protocol or similar, that can be provided to the static library for any calls that require it. Your protocol could define getters/setters for any known properties your application possesses. @protocol ApplicationSettings - (BOOL)isUserReallyAwesome; - (void)setIsUserReallyAwesome:(BOOL)awesome;

Categories : IOS

How to read project.properties and all paths of library project from it with Ant?
You can write a sinle property like android.library.reference=submodules/Switchbar,submodules/Volley,libs/ActionBar/library and use it in your build.xml. For example, you can use <for> or <foreach> to iterate through the list and execute codes on each item. You may be able to use it directly in some tasks as they support such kind of "comma-seperated list" natively (e.g. include and exclude of <zip>). If you want to keep the current way (write multiple properties with same prefix), you can use <script> to write scripts in your ant build file to deal with the properties. You can use ruby, python, Beanshell (Java), groovy and so on. You can also use this way to handle the single property. So, it's better for you to post more on your question: what is your "other

Categories : Android

Duplicate symbols (project using library using same library as project)
Problem occurs with your imports ie #import "A.h" #import "B.h" #import "C.h" In interfaces of each other.. Better way to do to avoid the scenario is not to import .h file in the interface class instead you can easily do @class A; @class B; @class C; in the interface, and import the respective .h class in the .m file. So it should look like this In A.h class @class B; @class C; @interface A : NSObject @end In A.m class #import "B.h" #import "C.h" @implementation A @end

Categories : IOS

HttpApplicationState outside of the Web Project (Class Library)
Using HttpContext.Current.Application you should be able to access HttpApplicationState in the outside classes. Update But I agree with John Saunders - business logic should not be aware of where it is called from.

Categories : Asp Net

How to debug a class library project?
Since your control lives in another process, you have to get your debugger attached to that process. Either manually attach to it (if it's already running), or change your debugger settings to launch the host process.

Categories : C#

Cannot inflate class after move from library project to jar
any Android project that has resources and uses the resource reference system cannot be packaged as a jar. It has to be an Android Library for the R.java file to be generated correctly and the resources to be resolved. i.e. @color/Transparent Reference: http://developer.android.com/tools/projects/index.html#considerations

Categories : Android

Reference Application Class from Project Library
I guess you should be referencing the other way round, objects from the library should be referenced from the application. Anyway, what you could do is to create an interface or a base class in your library and use that in the library code. Then in your main app you could write the implementation of the interface or a child class.

Categories : Android

Importing project class in static library iOS
If you only need to add few methods to the FCPlayerData you can use Categories to add those methods directly to the FCPlayerData. Look here for more on categories: http://krodev.wordpress.com/2012/09/29/objective-c-categories/ or here http://cupsofcocoa.com/2011/03/27/objective-c-lesson-8-categories/

Categories : IOS

DllImport from class library or web service project
You'll need to move the configuration into the web.config file for the web application There's some good advice on how to do that here: Custom section/collection in Web.Config

Categories : C#

Developing a Git library project that's also a submodule of another project
Having read various other SO questions, it seems apparent that there's no elegant solution for this. The steps I eventually took to solve this are: Assuming not done so already, clone the application repository that makes use of submodules. Import all projects into Eclipse workspace, including the submodule repository (or repositories). Note that the submodule repository is a repository within the main application repository, and it's not on a particular branch; it's a reference to a particular commit (detached head). In the Package Explorer, rename the submodule project that was imported. I gave it a name that relates to the application repo it's inside of. For instance, for an application project called ABCD, rename it from SomeLibrary to SomeLibrary_ABCD. Next, clone the library sepa

Categories : Android

Is it possible to add a JAR file of a library project and use its resources in another project?
JAR files package only the Java code you have, and not the resources. If you want to use the resources in your project, you will have to take the entire library project, mark it as a library and then add it to your main project as a whole.

Categories : Java

Calling the other Library Project from the Android Project
You can not call direct library project from your code. you can have two option: 1. add library project in your project(android->library->add library project) 2. create jar for that library project and add build path in your project after you can call.

Categories : Android

Class Shadowing in Java : shadow a class from current project with external project
Relying on the order in the classpath in order to shadow classes is just asking for classes. There too many factors you don't control. Without more information on your actual use case it is, however, hard to give any better suggestions.

Categories : Java

Importance of Web API Controller comparing with Class Library project?
A Web API Controller is a controller for a web service, which is very different from a Class Library project which you include in a project. A web service is something you communicate with, you don't include it as an assembly in your project.

Categories : Asp Net Mvc

C# class library project dependency injection bootstrap
How did libraries like the Patterns & Practices Enterprise Library or Spring.Net configured? Here is an interesting article from Chris Tavares about the subject.

Categories : C#

How can I load assemblies that are placed in the project (portable class library) folder?
I'm making the assumption that you are running the portable library in a Windows Store application (based on the assembly name you are trying to load). There are two places that store apps find their assemblies, either in GAC if it is a framework assembly or the Appx package if it is a user assembly. As "Portable.Store" (which I assuming is from my PclContrib project) is a user assembly, it must be loaded from the AppX package. To ensure that both assemblies end up in the AppX package, simply make sure that the Windows Store project containing the AppxManifest references both of them. That's it. If Assembly.Load still cannot find the assembly, check to make sure that the strong name you are passing to Assembly.Load is correct.

Categories : C#

How can I embed and use a .txt file as resource in a C# Class Library Project (VS2012)?
Most probably the problem is, that the access modifier for the resource file is default = internal, which means it is visible only inside of the dll. Go to the resources page and try to change it to Public:

Categories : C#

Access appSettings in web.config from Thread in Class Library project
Pass the TempXmlFolder into the thread. Don't rely on HttpContext.Current. Alternatively, pass the value of HttpContext.Current to the thread and calculate the value of TempXmlFolder later. You can pass the value using any way you want. Maybe a field or a local variable that you capture with a lambda.

Categories : Asp Net

Unable to include static library containing QObject class into Cascades project
Simple rule of thumb is to rerun qmake whenever you introduce a new class using Q_OBJECT, as it generates the moc files then. Try doing clean, then rerunning qmake, then building the project again and it should resolve it.

Categories : Qt

How do you ensure resources (e.g. styles) of a support library project (e.g. android-support-v7-appcompat), are added to your project?
Look at the "Adding libraries with resources" section of this document http://developer.android.com/tools/support-library/setup.html Basically, you import the resources in a library project called "android-support-v7-appcompat" that you reference in your app project.

Categories : Android

Can I use project libraries in the library project?
If I understood your question correctly, you can just include your dependencies in the library project and then let the library project export its dependencies. The main project then only includes the library project, but also can access its dependencies. This can change depending on your development environment, however. With Gradle, for example, you can safely add multiple libraries from Maven and it will automatically remove duplicates.

Categories : Android

How to convert a project into a library project - and then use it
This artical shows basics of how to create library project with a good tutorial AndroidLibraryProjects and We have the Android docs , which mention what constrains you should keep in mind while creating Library project here is the link Android Library Project doc

Categories : Android

Java reflection: How can I load a class from another project without adding that project or JAR to my classpath?
You need to implement a custom classloader, something like this Class<?> cls = new ClassLoader() { public java.lang.Class<?> loadClass(String name) throws ClassNotFoundException { byte[] a = read class bytes from known location return defineClass(name, b, 0, a.length); }; }.loadClass("test.MyClass");

Categories : Java

Migrations: purpose of the startup project
The start-up project is used to find the correct App/Web.config file and the output directory to use. Consider the following. You're DbContext exists in ClassLibrary1 which is used by WebApplication1. The settings that EF will ultimately use are stored in the Web.config of the WebApplication1 project. When using migrations commands, you would specify ClassLibrary1 as the default project and WebApplication1 as the start-up project. Also, if you were using relative paths somewhere inside your context or migrations, you would want them to resolve relative to WebApplication1's output directory, not ClassLibrary1's. Of course, if everything is in one project, you don't have to worry about the start-up project since it will always be the same as the default project.

Categories : Entity Framework

Must of referencing of third-party libs which used in a class library which is referenced by Windows Store App project
If you use classes from your class library which use SharpDX classes, then compiler of main assembly must know what this classes are, so it needs reference to SharpDX. It's common .net behavior.

Categories : Visual Studio 2012

Eclipse Build Error "A class file was not written. The project may be inconsistent, if so try refreshing this project and building it"
We are using Eclipse here too and have to handle a workspace with more than 200 plug-ins. Every now and then people have similar problems with their workspace and inconsistencies reported in a weird way by Eclipse. What people here usually do is (next step only in case previous step didn't help): - trying to ContextMenu->Team->Clean/Refresh the whole workspace - creating a new workspace and check out all necessary files from the repository - reinstalling Eclipse to a new directory From my experience after using the Eclipse IDE on a daily basis for many years, it doesn't make very much sense to waste too much time with these issues, unless they aren't solved by one of the steps above. It takes too much time to struggle with these things, while starting from scratch is done in an hour or le

Categories : Eclipse

entity framework migrations midway through project
My deployment had had migrations enabled (I found out after taking backup, don't remember running that but must've because I have a _migrationHistory table!!!!), unfortunately, and amateurishly, I had deleted the migrations folder from my dev code and not checked into source control prior to doing so.... So I: Backed up client database Restored the backup from step 1 on my local SQLExpress Pointed my application connection string at newly restored DB Opened package manager console Selected my DAL project as default project Ran "enable-migrations" This straight away picked up my previous, initial creation from database. This takes me back to before I messed around and deleted migrations folder from project!!! Thank you MS boys & girls.

Categories : Entity Framework

How to use jars from a Java Project in an Android project transitively over the included Android library?
I think you should be able to go to the properties of your Android library project, go to Java Build Path, switch to the tab Order and Export and select the java library so that it is exposed to the Android project that uses the Android library.

Categories : Java

How to use parent project's class from a child project
Perhaps I'm not understanding your question, but I think all you should have to do is click on the relevant file in the file window of XCode and then, on the right sidebar, click the correct checkbox under Target Membership. Then the files should compile along with both targets; as it stands your second target doesn't know where to find the files you wrote in the first. That should work (if I understand your question correctly, anyway).

Categories : Iphone

classes from android project library not resolved in android project
Recently, Google updated its tools and it introduced some strange behaviour when using library projects. I'm not sure you're dealing with the same problem, but try this: right click on your library project, choose Properties in the menu on the left, click on Java Build Path now click ont the Order and export tab make sure "Android private libraries" and "Android dependencies" are checked. Do the same for your application project. After these steps, clean both projects and maybe your problem is fixed ;-) good luck!

Categories : Android

entity framework code first migrations from seperate windows class library
Could it be that you're using "|DataDirectory|" in the connection string in the DAL project? Since "|DataDirectory|" is an Asp.Net folder and the DAL project is not an Asp project it probably doesn't recognize that as a directory and it probably doesn't exist thing the DAL project.

Categories : Entity Framework

Link to shared library from Android library project with ndk-build
First create a module that will compile your libA.so library as prebuilt shared library in your project B. include $(CLEAR_VARS) LOCAL_MODULE := libA LOCAL_SRC_FILES := path/to/libA.so include $(PREBUILT_SHARED_LIBRARY) Then, add this module to your main module of your project by: LOCAL_SHARED_LIBRARIES := libA I have never tried IMPORT_MODULE option in my project but this works in my case.

Categories : Java

Class Library project in ASP.NET reading from web.config and not app.config
A web application will use web.config. Keep your app settings inside that. A dll specic config file is not required. A windows application will use App.config while a web application will use web.config. If you use your dll in a windows or console application put the setting in app.config. Dlls will always use the config file of the application they are loaded into. If you want to have a dll specific config file, you will have to load it yourself.

Categories : Asp Net

Android:jar library won't work compared to project library
> Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.testphilippe.Jokerly" ... In page "Order and Export" your jar is not marked as "copy this jar into the android-apk" so the classloader cannot find it. Set the checkmark and "ClassNotFoundException" will go away.

Categories : Java



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.