I want to use CastComponaionLibrary but I'm using Eclipse and not Android Studio.
So I created a new project and copied all CastCompanionLibrary sources into it.
I also added references to:
android-support-v7-appcompat
android-support-v7-mediarouter
google-play-services_lib
In this new project I get these compilation errors:
The project was not built since its build path is incomplete. Cannot find the class file for android.support.v4.app.ActionBarDrawerToggle$DelegateProvider. Fix the build path then try building this project
The type android.support.v4.app.ActionBarDrawerToggle$DelegateProvider cannot be resolved. It is indirectly referenced from required .class files VideoCastControllerActivity.java
any ideas?
Thanks!
First, you don't need to include v4 library since that is part of the v7 libraries, so remove that. Then follow the instructions in this G+ community post
I don't know why but I solved this problem:
In android.support.vX -> Properties -> Java Build Path -> Projects -> Add
Choose the related project/s to the android.support.vX
Press OK
Do the same and remove the project/s added
Related
I just got some kind of error when trying to using Action Bar Compat support library to my project, I don't know what's wrong, because I have followed the instructions from this link > http://developer.android.com/tools/support-library/setup.html
So, this is the screen shot of the error ..
I also encountered such problem. My error was:
The container 'Android Dependencies' references non existing library 'C:\development\adt-bundle-windows-x86-20140702\workspace\appcompat_v7\bin\appcompat_v7.jar'
To solve this, I went project>properties>java build path>libraries>add jars>appcompat_v7>libs>, then I selected android-support-v7-appcompat.jar. After this, I went to project>clean. This fixed the problem. Hope you find my hint helpful.
As in the instructions you mentioned, please make sure to follow this step to add .jar files instead of directly go to Properties > Java Build Path > Libraries to add them.
In the new library project, expand the libs/ folder, right-click each
.jar file and select Build Path > Add to Build Path. For example, when
creating the the v7 appcompat project, add both the
android-support-v4.jar and android-support-v7-appcompat.jar files to
the build path.
I just had this issue, when creating a new project. After following the instructions from the link you provided, close your project, then close Eclipse, restart Eclipse, open your project then clean and build your project. This did the trick for me.
These days I used the latest android support library 21 and got the same issue.
I followed the answer of #dazilli,but do not work.
Just now,I updated the JDK from 6 to 7,then it solved the problem.
First of all cleanup a library project and build project check library project has bin files after that clean your project its work for me
andriod platform must be android 5.0 and set 'target=21'
make sure download Extras
In my case the files were in appcombat_v7/lib folder, so what i did is right-click the .jar files (there will be two files select android-support-v4.jar) and then select Build Path>Add to Build Path. What it does is that it adds this file to the Build Path (i.e it will add this file to the "bin folder") which will solve the problem.
i dowloaded from here:
http://sourceforge.net/projects/redpin/files/release-3.1/RedpinAndroid.zip/download
i am using win8, ECLÄ°PSE eclipse-standard-kepler-SR1-win32
i imported project and googled this problem. I tried project > clean section , it didnt work.
and also i tried properties > java build path > add library > jre system library for adding redpind library , it didnt work either. how can i solve this problem? thank you.
errors is:
The project cannot be built until build path errors are resolved
Project 'RedpinAndroid' is missing required Java project: 'RedpinCore'
these are classes
this is properties>buildpath
this is error page
This project depends another project named RedpinCore, so in order to build this, you need to reference the place where RedpinCore project resides, so that your project can find needed class definitions. Instead of this, you can remove this dependency, and add this jar to your classpath. The same classes can also be found in this.
Right click on your project Build Path/Configure Build Path...
Under Projects tab, right click on this project dependency and remove it.
Then copy the jar to your project and add it to your classpath.
I am using appcompat_v7 library and facebook sdk in my project and both the library have android-support-v4.jar.If I delete any of the jar the corresponding library is not working and having both jars is not allowed.
What should I do? Kindly help me out...
The conflict is due to different versions of the jar.
Make sure you have the update support library from the android sdk manager
Copy android-support-v4.jar to libs of both the projects. The jar can be found #
android-sdk/extras/android/support/v4/andorid-support-v4.jar
Clean and build your project
remove android-support-v4.jar from FACEBOOK SDK and add android-support-v4.jar as external jar facebookSDK properties -> java build path -> libraries -> add external jar (i had remove this problem like this )
Try removing the dependency library from both appcompat_v7 and your project. To do that got to build path=>configure build path. Then select the dependency library and click on remove.
Add the support library by Android Tools=>add support library.
Do this to both projects.Then you are good to go
Its really simple
Just right click on your project as well as on the library project >android tools >Add support Library.
This will update your support library to the latest which solves the problem.
This question is ask many times while everyone are start-up android development in learning stage.
I think everyone has same environment of android but they configure differently according to projects.
I had same issue while creating new project every time and i found solution on below.
I added library appcompat_v7 into project and remove jar android-support-v4.jar from lib folder of my new project and blink ERROR was gone.
Add appcompt_v7 library project
Remove android-support-v4.jar from project lib folder
Wow error was gone
Best way to fix this issue is to look out for both jar files path. If you have "appcompact folder" in your eclipse then look into libs folder. In libs folder you have jar files.So, It's better to remove jar files from your application folder. Then at the time of compilation it will take jars from "appcompact folder".Don't keep jars in your app folder which leads to "Jar mismatching error". Error is mentioned below:
Found 2 versions of android-support-v4.jar in the dependency list,All versions of the libraries must be the same at this time.
Path: /home/vinny/workspace/appcompat_v7/libs/android-support-v4.jar (Keep this jar as it is)
Path: /home/vinny/Downloads/Demo/libs/android-support-v4.jar(Remove this Jar )
Jar mismatch! Fix your dependencies
Note : Remove jars from this path "Path: /home/vinny/Downloads/Demo/libs/android-support-v4.jar" T(Application's folder path)
Safdar Akrami is right, but also to do it on facebook SDK project!
Just right click on your project as well as on the library project >android tools >Add support Library.
This will update your support library to the latest which solves the problem.
if you have problem with the other projects that depends of facebook SDK project, you can fixed in this way:
Fix Project Setup
Add project "appcompat_v7" to build path of FriendpickerSample for example
Try removing the dependency library from both appcompat_v7 and your project. To do that got to build path=>configure build path. Then select the dependency library and click on remove. Add the support library by Android Tools=>add support library. Do this to both projects.Then you are good to go
I need help with a project dependency issue in the Android SDK.
I have the following projects:
"Sync" (a Java only project)
"Agonis" (an Android Library project)
"Dragonis" (an Android application project)
Agonis has a project dependency on Sync, and Dragonis has a project dependency on Agonis, like so:
Dragonis->Agonis->Sync
I have correctly used the Properties->Android->Library dialog to add Agonis as an Android Library. I have exported the Sync project in the Agonis build path setup:
http://i.stack.imgur.com/GsQIR.png
In the Dragonis project, I see both Agonis and Sync in the "Android Dependencies" virtual folder:
http://i.stack.imgur.com/EhH8L.png
From here, I would expect everything to just work, but it doesn't.
I can start the app, but as soon as I instantiate a type from the Agonis project (com.mob.agonis.AgonisServer), I get a NoClassDefFoundError. If it matters, the Agonis type I am trying to instantiate extends a type that is in the Sync project (com.mob.sync.Server).
I tried cleaning all the projects, and using Android Tools->Fix Project Properties on both Agonis and Dragonis to no avail.
Am I overlooking something?
Put the jar library in the folder libs and add it to the java built path.
Right click on the file -> Build Path -> Add to Build Path
Hope it helps.
I figured it out.
The Sync Java-only library was compiling to 1.7 Java byte code. Android only supports converting Java 1.6 byte code to DEX.
Scroll to the top of the console, kids.
You can solve this through the command line tool. You could create/update the Dragonis and Agonis android projects - one as an application and other as library. See http://developer.android.com/tools/projects/projects-cmdline.html
You can easily set up the dependency from D -> A using the command line tools as shown in section called referencing a library project. At this stage, a build of D automatically triggers a build of A.
Now modify the build.xml of A - to include a dependency on : build and copy Sync.jar at the pre-compile stage (look inside build.xml to find the placeholder). The build and copy tasks can be done by starting a sub ant process using subant. See http://ant.apache.org/manual/Tasks/subant.html
At this stage all your dependency work properly on command line if you trigger ant build. Now you can also use eclipse by importing the android project Dragonis from source.
From the project properties of "Sync" set the "Java Compiler"-> "JDK Complience" to 1.6. Rebuild and enjoy!
I'm building an Android app which uses a library that is defined in another Eclipse project (same workspace). All is working fine, but now I added a jar file to the library project's build path. In Eclipse I exported the jar file to make it visible to dependent projects of the library (Build Path -> Order and Export -> mark the jar file). Still Eclipse (ADT) complains that the import cannot be resolved.
I have set up a test project for the library as well, and there the imports are visible after exporting the jar file as mentioned above.
Is there anything I forgot to configure?
Regards,
Martin
ADT doesn't seem to pick it up automatically :-/
Manually configuring the main project's build path to rely on the library project's jars worked for me.
Build Path -> Libraries -> Add JARs -> {Library Project}\libs\myjar.jar