how to run the CWAC-Camera demo? - android

Eclipse will not run the cwac-camera-master demo. The project builds but there is no bin directory and the AndroidManifest.xml has the MainActivity as the category.LAUNCHER.
I have not edited the download per Mark's instructions. If I uncheck "is Library" then the outter project becomes Runnable but that doesn't have a Launcher.
I'm doing something wrong with the inner/outter project config. Can someone please point me in a direction?
Thanks
Jeff

There are three projects: the Android library project, a demo/ sub-project, and a demo-v9/ sub-project.
Download the ZIP archive for the repository and unZIP it somewhere on your development machine. Import the top-level project into Eclipse, then import the demo/ sub-project into Eclipse. Everything should line up for that. If you wish to import the demo-v9/ sub-project, you will need to modify that demo project to reference your own copy of ActionBarSherlock, which that demo uses for its action bar.

Related

How to import com.android.support:design:23.0.1 in eclipse

I am learning the android tab with swipe functionality using material theme. I have a sample tutorials from here and it is build from Android studio.
I am currently using eclipse for my project.
I am following the tutorial and i can't import the TabLayout from com.android.support:design
Below is the code,
import android.support.design.widget.TabLayout;
Showing the error, The import android.support.design cannot be resolved
I downloaded support:design:23.0.1 from here and imported to eclipse, even then the error appears.
Can any one tell me where to download and import the com.android.support:design:23.0.1 in eclipse.
Thanks
Install Android SDK 23.0.1
Import design library from sdk\extras\android\support\design into eclipse workspace
To mark the design project as Library, open properties -> Select Android ->Check Library
Now import this design Library to your Project from project properties.
This worked for me in Tab material design.
If the design folder is not found in the said location, try to locate it in sdk\extras\android\m2repository\com\android\support\design instead, especially for the later version.
I have also face same problem then find solution like this.
It work for me hope same for You.
First Step:- find .aar file for design-23.0.1.aar
E:\new sdk\sdk\android-sdk-windows\extras\android\m2repository\com\android\support\design\23.0.1
Second Step:- copy that file and rename it like design-23.0.1.jar to be extract this.
After unzip it you find classes.jar, res, AndroidManifest etc.
Third Step:- Create Library project in eclipse Named design and copy
classes.jar in libs folder
all res in res/
replace AndroidManifest.xml
and last add lib appcompat-v7 by right click on lib project -> properties-> Android -> add -> appcompat-v7
Most important do not forgot clean project and can be restart eclipse for refreshing eclipse.
And more deep details follow steps Guided by commonsware's blog
Create an empty directory that will be the home for the Android
library project. For the rest of these steps, I will refer to this as
“the output directory”.
Copy the AndroidManifest.xml, res/, and assets/ directories from the
AAR into the output directory.
Create a libs/ directory in the output directory. Copy into libs/ the
classes.jar from the root of the unZIPped AAR, plus anything in libs/
in the AAR (e.g., mediarouter-v7 has its own JAR of proprietary
bits).
Decide what build SDK you want to try to use. You might just choose
the highest SDK version you have installed. Or, you can use the
android:minSdkVersion and the -vNN resource set qualifiers to get
clues as to what a good build SDK might be. If desired, create a
project.properties file with a target=android-NNN line, where NNN is
your chosen build SDK. Or, you can address this in Eclipse later on.
Import the resulting project into Eclipse, and if needed adjust the
build SDK (Project > Properties > Android). Also, you will need to
attach to this library project any library projects it depends upon
(e.g., mediarouter-v7 depends upon appcompat-v7).
Good Luck!
And Special thanks to commonsware !!
A great fix to that problem is that you copy the sdk\extras\android\support\design\libs\android-support-design.jar file to "libs" folder of your project

Android Studio, Sample Code - Not working

There is sample code on the developer site that i wish to run.
When I import as a new Android Studio project, I'm not given any ability to run the code (disabled buttons).
I attempted to copy the source files over into the shell of a new project, but i than got errors that didn't make sense. reference to duplicate declarations in source files that had nothing relating inside them.
Is there an idiots guide on how to properly use android studio, or is it just this difficult?
In order to correctly import the project, you should follow the Samples guide as found in the developer docs.
To import a downloaded project:
Unpack the downloaded project package.
In Android Studio, chose File >
Import Project and select the root folder of the unpacked project.
Android Studio may ask you to choose the type of project you are
importing.
If this is the case, make sure to choose Import project
from external model and select the Gradle option.
Alternatively, if the Gradle option does not work, I would attempt to use the Eclipse option.
Open .gradle file when you import the project, not the folder of the proyect.

Cordova ant jar not available

Cordova 3.3.0 installed from fresh and PATH fixed with visibility to tools etc.
Build a new bare application
Add android platform
now it starts to go awry -
Following instructions to import to Android Development Tools ( Eclipse ) I get TWO projects created
HelloWorld and HelloWorld-CordovaLib
HelloWorld has errors as it can't see/does not have the the cordova.jar file ( assuming this from past experience )
HelloWorld-CordovaLibs is whats missing from the HelloWorld project all the source to Cordova
Assuming that I need the jar file I dig around and try running ant jar from within the android part of my project
Running ant jar fails -
Target "jar" does no exist in the project "HelloWorld"
which is an ant error telling me it doesn't know how to build target jar.
look at build.xml in the android directory confirms this - no section on "jar"
A bit more digging on the net and the Apache Cordova git repository seems to intimate that I should have another file build.xml inside a directory 'framework' with the jar target defined.
Ahhhhh - no framework directory anywhere.
Can anyone work out where this is all going wrong before I tear any more hair out?
I followed this guide to create a Cordova 3.3.0 project, import it into Eclipse, and successfully run it on a device from Eclispe: http://cordova.apache.org/docs/en/3.3.0/guide_platforms_android_index.md.html#Android%20Platform%20Guide
You are right that it imports "HelloWorld" and "HelloWorld-CordovaLibs". This is because of https://issues.apache.org/jira/browse/CB-5232, which makes Android now use the CordovaLib instead of the .jar for a variety of reasons (see the bug report.) You should import both projects into Eclipse (I'll change this in the documentation).
If you follow that guide you should be fine. You don't have to build a .jar anymore.
steps
1- after create the project i import both "hello" and "hello-cordovaLib"
2- i remove the reference to "hello-cordovaLib" from "hello"
3- build the "hello-cordovaLib"
4- restore the reference to "hello-cordovaLib" from "hello"
5- clean "hello" and run
In short .... The ide ( either eclipse or ADT ) needed the initial build of the sub project to allow the HelloWorld project to 'see' the HelloWorld-cordovaLibs project.
What solved my problem on HelloWorld project in my ADT is :
I cleaned both the HelloWorld and the HelloWorld-cordovaLib.
Right clicked on HelloWorld-cordovaLib ->properties->Android and verified
it the isLibrary is checked.
I right clicked on HelloWorld proj -> Properties ->Android -> The "is Library part" had Cordova with red check on it then I clicked on "Add" button and again added Cordova to the project which came with "green check" and then removed the red checked cordova.
Cleaned the projects and now its working fine.

How do I build these libraries from GitHub

I'm having a lot of trouble figuring out how to build a jar of the Showcase View library so that I can import it into my application.
I've searched all around but can't find a process for it. I tried importing into Eclipse but I can't get it in there since it isn't a project and I'm not sure what type of project to create from source with.
Any help would be greatly appreciated.
Easiest way is:
Create an empty Android Application project in your Eclipse workspace.
Copy files in ShowcaseView/library/ folder of github to your new project base folder.
Refresh project in Eclipse.
Goto project properties - Android and select "Is Library"
Clean unnecessary stuff and build.
It should be ready to add as dependency of your app.
Alternatively you can pick another library project .project file and copy it inside this library folder, edit it to match your new project name, etc... And then import in Eclipse. But this is more hardcore if you don't know what you're doing.

Cocos2d-x android can't resolved coscos2dx library

i am starting by macOSX xcode4.5 .
i tried to tutorials.
Using cocos2dx, it completes building of macOSX,
The problem occurred in android sources.
No contents of cocos2dxActivity are described.
so, org.cocos2dx.lib is not other files.
android is not running.
i use ndk-r8.
What will be a problem?
In cocos2d-x 2.0.3 ...Cocos2d-x Lib java files has been considered as a different project only
So import that project in the eclipse
Lets make it Simple
First Import the project in eclipse from this path - cocos2d-2.0-x-2.0.3/cocos2dx/platform/android/java
You will see libcocos2dx project in eclipse ...Keep this project open always otherwise your projects will give error on the syntax of library
Run create-android-project
Now Import the project which you have created and just Run (If you know the concept of isLibrary then that's how they are maintaining it now ..)
Also additional information to run build-native.sh from eclipse only ,
Right Click Project ->C/C++ Build
Uncheck Use Default Build COmmand
and add following bash ${workspace_loc:/YourProjName}/build_native.sh NDK_DEBUG=1 V=1
Good Luck ..If any question please feel free to ask
Change
import org.cocos2dx.lib.Cocos2dxActivity;
to
import android.app.Activity;
and change
extends Cocos2dxActivity
to
extends Activity
You can copy the folder (cocos2d-2.0-x-2.0.3/cocos2dx/platform/android/java) beside the proj.android folder of your game folder, then import it with the game in eclipse.After importing these 2 projects, open Properties of the game and then add libcocos2dx as library and click apply and build.
i have tries these and works for me
i figure out by myself..
Using cocos2dx 2.0.3 (2012-09-26),
eclipse source:org.cocos2dx.lib is not created.
(org.cocos2dx.lib is created cocos2dxActivity only.
and cocos2dxActivitiy is no contents described.
cocos2dxActivity:
package org.cocos2dx.lib;
mport android.app.Activity;
public class Cocos2dxActivity extends Activity{
}
)
therefore,
Using cocos2dx 2.0.2 (2012-08-30), eclipse build ok.
i can't understand what is problem...

Categories

Resources