How to import org.opencv.android.JavaCameraView? - java

I'm trying to use OpenCV 2.4.10 for Android in Eclipse.
But my example project cannot compile because of Eclipse can't find the org.opencv.android.JavaCameraView package.
See the picture please
http://prntscr.com/5wt2ek
How to fix this problem?

Have you add the OpenCV?
Like explained here:
Add OpenCV library project to your workspace. Use menu File -> Import -> Existing project in your workspace.
Press Browse button and locate OpenCV4Android SDK (OpenCV-2.4.9-android-sdk/sdk).
See more information:
http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.html

Related

Cannot run the code sample

I just download the sample file in Android Developers site (https://developer.android.com/training/multiscreen/index.html), then open this using Android Studio.
But I found the run button is disable and I can't find any way to execute this (just like this http://chuantu.biz/t5/34/1474269694x3394677986.jpg).
Any one can tall me how to run this file in Android Developers?
Try to set "app" or similar on here:
UPDATE1 (Maybe it's the problem)
That project it's not a new gradle project then maybe you imported wrong, you must import the project as "Import project (Eclipse ADT, Gradle...)"

In-App Billing Android and bug

Good evening, everybody.
I'm trying to debug the In-App Billing project. The sourse which I use, is
https://github.com/blundell/SimpleInAppPurchaseV3
I'm facing the problem from time to time:
Suddenly the project in file Log.java gives two errors:
1. The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files
The error shows near the first symbol of the file.
R.java cannit be resolved! And gen-folder doesn't recreate! No errors in xml-files.
IabHelper.java shows the error: The import com.android.vending.billing.IMarketBillingService cannot be resolved
So if delete com.android.vending.billing/IInAppBillingService.aidl file and recreate it (by copy-paste) nothing happens.
What am I doing wrong?
I think your problem is just the latest update of the SDK.
Test the following operations on two projects :
In the project properties (eclipse) -> java build path -> order and export make sure that all your jars in the libs folder are checked.
And "Android Tools -> Fix Project Properties"
And "Project -> Clean"
If your problem persists try this:
Remove your project
Close eclipse
Import your project again
I hope you have helped!
Try this one.
1) project properties-> java build path-> order and export
make sure you have checked true all files that I have listed below:
Android Private Libraries,
Android Dependencies,
your all jar and libraries you have added.
2) check your SDK manager you have updated all required versions for
--> Tools: SDK Tools, SDK platform tools, SDK build tools.
--> Android 4.2 or what ever you are using, Google Map and SDK Platform should be updated latest.
--> Extras: Google Play Services,Google play billing libraries
also make sure you have not imported wrong variables or any class.
Hope it will help you.
Simple solution.
Rename your package name from com.android.vending.billing to com.android.vending.billing2.
Refresh project.
And after that again rename to com.android.vending.billing. And it will work.
In Android Studio click "Make Project" after adding "IInAppBillingService.aidl" file to your project. Then Android Studio can import "IInAppBillingService" class after press Alt+Enter on IInAppBillingService class.

How to import android open source library?

I tried to use Android-PullToRefresh in my project.
I am used to importing library by "File -> New -> Other... -> Android -> Android Project from Existing Code" in Eclipse, but this time, it said that "Select at least one project" when I choose the "library" folder in that project.
What is the correct way to import this library? Please help. Thanks!
If your workspace having the project with the same activity name as the activity in your library, this time also it will show select atleast one project. check if you work space contains any
If you are trying to import a library into Eclipse, then you may refer to this post Adding a library/JAR to an Eclipse Android project
If you are trying to import the project, then you select the entire project folder.

Eclipse: Tons of Errors in Android Application

I imported my current Android Project to Eclipse on my (Mac OS) device via SVN.
The code shows up alright, but Ecipse shows tons of errors (see screenshot) which do not appear on the device I first used - I am not very experienced with Eclipse but I guess some libraries were not imported?
I installed the current JRE(1.7), Eclipse, the Android plugin which also installed the current Android SDK (4.1).
Any clues?!
Place the sdk path in Window->Preference->android.
And then Click apply.
If you already do it. Then right click the project and goto Properties->android->select android version
Right click on Project -> Android Tools -> Fix Project Properties
Go to menu -> Project -> Clean
For that go to each java file import all required packages or try CTRL + SHIFT + O
then resolve all errors in RES folder.
Then it will generate R.java for you
then import yourpakagename.R; where ever required.
remove import android.R;
hope this will help you

Import java project into eclipse

I just downloaded a Google App Engine sample Java project. I am trying to import it into eclipse. If I chose file/import/existing projects into workspace, and navigate to the appropriate directory, it doesn't find any projects. I'm speculating this means that dotmatrix is not an Eclipse project. How can I import it?
Thanks.
Project you are trying to import doesn't seem like Eclipse Project.
You can still use this project in Eclipse as Java project by following these steps:
Open Java Perspective in Eclipse.
Right Click in Package explorer pane and select New >> Java Project.
Give appropriate name to your Project and click the option that says "Create project from existing sources."
Select root dir of project downloaded and click finish.
Note: You may need to configure source folders, library and other build paths to complete setup.

Categories