The import com.android.datetimepicker cannot be resolved - java

I've imported an existing Android project to Eclipse, but I'm getting errors on the following imports:
import com.android.datetimepicker.time.RadialPickerLayout;
import com.android.datetimepicker.time.TimePickerDialog;
I already have the android-support-v4.jar library added to the build path.
Could anybody help me to figure out what is missing?

Neither of those classes exist in the Android SDK. There is a TimePickerDialog, as others have noted, in a different package. There is a RadialPickerLayout in the Android source code, and you are welcome to try to use it.
Really, you should be talking to whoever wrote this Android project and asking them where they were planning on getting those classes from.

If you have added the datetimepicker library where you have the package com.android.datetimepicker palced, please add the following to main project's build.gradle dependencies section:
compile project(':library')
This worked for me. Please let me know your comments.

Related

Java library cant resolve package

I added a library with several packages one of which is "no.stelar7.api.r4j.impl.lor". When I go to import this package to use it in my code I am given an error saying it can't be resolved, I have tried deleting the library and re-importing it with no luck and need any help. There is another package in the library called "no.stelar7.api.r4j.impl", is it possible this is causing me errors?
Check if the library available for your current java version

How do I import a GitHub library into my android studio project?

I am trying to use this GitHub library: https://github.com/JonnyHaystack/build-prop-tools in my Android Studio Project, but can't quite figure out how to do so.
I've tried cloning the project, then importing it as a module, yet I am not sure what part of the cloned folder I am supposed to import.
After I import a new module, I know I will then be able to add it as a dependency, but I do not know how to get past this step. Any help is appreciated.
Click Github get from version control
Clone project

Package Structure In Maven

I have created a maven project on my Mac using Eclipse. My package structure comes in a folder and its hard for me to create a java class. Packages also do not show up.
How can I fix it? tried googling no solution? please help.

Errors on importing MoPub SDK on Android in Eclipse

I'm facing a lot of errors while importing MoPub SDK to my workspace. It shows over 5000 errors.
Could you tell me what I'm doing wrong? I've tried to import as Java Project, then as Android Project. I have set it as library, and referencing to it as a library from my main project.
Any help will be appreciated.
Thank you,
Wojtek
I've figured it out. After importing the project Eclipse made Java Build Path -> Source:
mopub-sdk/gen
mobup-sdk/src
But it should be:
mopub-sdk/gen
mobup-sdk/src/main/java
Simple Remove and then Add Folder... solve the issues.

EdgeType.DIRECTED not working

I recently figured out how to add the Jung libraries to eclipse, but now I ran into a new problem. I'm using the Jung tutorial and I can't seem to run the first tutorial, because the Eclipse IDE is saying that the .DIRECTED ,in the code, cannot be resolved or is not a field. How do I fix this?
edit: Yes, using that package worked! However, I'm surprised that the Eclipse IDE did not offer to import the package for me. Is this unusual?
Make sure to include all the required JUNG2 libraries into your Eclipse project. When you do that, Eclipse will give a few suggestions after you right-click on those yellow-underlined words. Choose the one(s) related to JUNG2 to remove the warning(s).
EgeType.DIRECTED must be imported from edu.uci.ics.jung.graph.util.EdgeType package which is under jung-graph-impl-2.0.1.jar

Categories