I am trying to build the OSMAnd for Android via Eclipse and Android Studio via this official build instructions at:
https://code.google.com/p/osmand/wiki/GradleCommandLineBuildEnvironment
I am getting following error message:
It is in regards to net.osmand:OsmAndCore_android:0.1-SNAPSHOT classes not available.
Can anyone point how to fix this?
Official URL does not provide anyone to ask for help either.
I success to build OsmAnd in android studio.
You can follow this step to check out OsmAnd on Github:
In Android Studio's "Welcome to Android Studio" page, select "Check out project from Version Control" .
In "Clone Repository" page, clone from github's OsmAnd : https://github.com/osmandapp/Osmand
In "Import Project from Gradle" page, select "Use default gradle wrapper (recommended) "
After import project, in "Project Window" should have 11 projects clone from github.
Download OsmAnd-resources, and rename directory to "resources", place with OsmAnd Project directory.
Open Build Variant window: Build->Select Builder Variant
Set OsmAnd module's Build Variant with x86 or Fat. (Fat means include all cpu's library)
Run and execute on Genymotion. (or your android mobile phone)
I share the process on my blogger.
It's write down by chinese, but you can understand what I done by pictures also.
Good Luck!
Related
How to import facebook sdk 4.8.2 in eclipse. I am unable to import as facebook folder contains aar file when we directly download developer site. And from git , unable to get src files of facebook
Here you have an answer from Android Facebook SDK 4 in Eclipse
I also have faced this problem, so I will write a short guide, how to
install it in Eclipse.
Step 1. Import to Eclipse First of all, download the latest
version of SDK (on current moment it is 4.0). Unzip it to a
folder.
Open Eclipse, click the right mouse button in "PackageExplorer" and
choose "Import". After that, go to "Android" -> "Existing Android
Code Into Workspace".
Now click "Browse" and choose unzipped SDK folder, and deselect all
other found projects, except from the "facebook" (it is an SDK).
Other included projects are just samples, and you don't need them now.
You may select "copy project to workspace" checkbox, if you need this.
Step 2. Fixing errors After importing, we will see, that the
whole facebook SDK package are in errors:
But if we look closer, and open one of marked as error classes, we
will find, that SDK tried to importsupport.v4 library:
It required for properly compilation. You can find instructions how to
download it using Android SDK Managerhere.
After it downloading, you can find it in your Android sdk folder:
<sdk>/extras/android/support/v4. Then add it to the facebook SDK
project: right mouse click on SDK project -> "Properties" -> "Java
Build Path" -> "Libraries" -> "Add External JARs", and choose
android-support-v4.jar from it's folder.
After that a lot of errors will be gone:
But, there are other errors. So we are going to another class, and
found it error code piece. Move mouse pointer on it, and Eclipse will
show you the hint, of what kind of error you are facing. It says that
your compliance Java must be version 1.7. Allow Eclipse do it by
clicking "Change project ...", or do it manually by going to
"Properties" -> "Java Complier" -> "Compiler compilance level"
-> "1.7".
OR
Moving ahead. Now we are facing only one kind of error, that says that
the FB SDK can't find required Bolts Android library.
We are going to google, found it compiled jar in a repository.
Choose the latest version (for current moment it's 1.2.0, but SDK
gradle file is using 1.1.4, so you may choose that), and download the
jar. Now add it to the facebook SDK as external lib, as we do it
before.
Voila! Ther are no errors anymore!
Also don't forget to set in the facebook SDK project "Properties" ->
"Android", that it is a Library.
Just for ensurance, close/re-open the SDK project and clean it
("Eclipse menu" -> "Project" -> "Clean"), so all files can build
properly.
Step 3. Add it to the Android project Now you can try to add
it to your Android app. Go to your Android app project "Properties"
-> "Android" -> "Library" -> "Add", and choose facebook SDK.
Follow official tutorial, and set up your Android application
project (don't forget to add all required elements to Manifest.xml).
Than you can use this tutorial to add LoginButton to your
Activity. Try to build it. It should run without problem.
This also might be helpful, if you find any issue: Facebook SDK v.4 for Android: errors on Eclipse
Check also: Android Facebook SDK configuration on Eclipse
Hope it help
EDIT: As you would see in the comments below, this answer is not already corrected. The best way to deal with this problem is export project from Eclipse to Android Studio, which doesn't have this issue and becoming the first Android Developer tool, where Eclipse seems to be as was said on Android Dev Summit 2015 truly deprecated.
Thank you so much! I'm still procrastinating migrating from Eclipse to Android Studio. And I found that the last version that works with Eclipse would be Facebook Android SDK 4.5.1. Download link here: https://origincache.facebook.com/developers/resources/?id=facebook-android-sdk-4.5.1.zip
Following this instructions make it work!
i installed the following plugin to my cordova project to receive push-notifications (and followed the given steps):
github.com/phonegap/phonegap-plugin-push
I also installed all needed resources by the sdk manager (extras-> google play services, support repository+libraries etc.)
But unfortunately i get an error in eclipse:
The packages com.google.android.gms.gcm, com.google.android.gms.iid, android.support.v4.app are missing somehow.. (or cannot be resolved)
i don´t know what i´m doing wrong..
is there any step-by-step tutorial for implementing the push-plugin in a cordova 5 app?
or is there any solution to this?
thanks!!
Screenshots:
http://abload.de/img/unbenannt-11qbf4.jpg
and
http://abload.de/img/unbenannt-2i7ozz.jpg
May be it would help you.
It is asking to add v4 support.
Try this:
Right click on you project in eclipse
Then select "java build path"
Click on "libraries tab" then click on "Add external jar file"
now you will get this v4 jar file in C:\Users[username]\AppData\Local\Android\sdk\extras\android\support\v4
NOTE : if you cant find the AppData folder then make sure to change hidden
settings.
Recommended to start using IDE Andriod Studio for Phonegap to prevent further issues. Android SDK has changed to suit Andriod Studio. I have build a clean project and paste over the index.html in Andriod Studio. No errors at all and gradle will help build all the projects file with 1 click!
I have just downloaded a project from GitHub, but I don't know how to open it in Android Studio. I tried to use check out projects from version control, but it shows an error message:
cannot run program "get.exe":create process=2, the system cannot find
the file specified
I had this problem when I first started integrating GitHub with my Android Studio Projects. This solved my problem, please reference this stack answer
Android Studio Checkout Github Error “CreateProcess=2” (Windows)
You need to set the environment variable in Android Studio
C:\Users\Your_Username\AppData\Local\GitHub\PortableGit_ca477551eeb4aea0e4ae9fcd3358bd96720bb5c8\bin\git.exe
You can open the android studio and go to : Settings -> Version Control -> Git In text box next to "Path to Git Executable" you will see "git.exe" , just give it a full path
There are only 3-4 articles on how to use Android Studio with Phonegap.
The problem is that these are all written for lower versions from Android Studio (<0.8) and now you can't import Phonegap projects into Android Studio without having multiple errors.
Has anyone achieved it to import a Phonegap 3.5 project into Android Studio 0.8+ and will share his/her knowledge?
Edit:
Ok if you don't have errors then you can describe the way you do it!
My steps:
phonegap create projectname id projectname
change directory into projectname
phonegap build android
-- so far no problems
start Android Studio
"import project"
choose projectname folder
apply the rest steps with next and finish the import
Android Studio now has imported my project
try to test the new project by go to "Run -> Run..."
add a new "Android Application"
BUT THEN in the tab "General" you have to specify a "Module" otherwise you can't start the application
Ok and from here on I stuck.
I tried to do "Build -> Make Project" but this ends with multiple errors while Android Studio tries to compile the app.
I think the Gradle has conflicted with ant because they will generate same files. I delete the ant-build files then it works. Hope it be useful.
I have eclipse running and am trying to get opencv4android on it (http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/O4A_SDK.html)
Instructions say to go to project -> properties and their will be a C/C++ build to change the location of ndk-build. However, I do not see C/C++ build or general.
When I start eclipse and go to about:
Android Developer Tools
Build: v22.0.1-685705
This product includes Eclipse Platform, JDT, CDT, EMF, GEF and WTP,
all of which are Copyright (c) Eclipse contributors and others.
Visit http://eclipse.org/
Android Developer Tools are Copyright (c) The Android Open Source Project.
Visit http://developer.android.com
I had a similar problem, it looks like the "native support" part was not set up correctly in the project, or at least was not compatible with the eclipse / CDT / android sdk combination I have.
You can maybe try what I did (with eclipse 4.2.2, CDT 8.1.2, opencv4android 2.6.4, android sdk 4.3):
1) close all projects but the Opencv Library one (project explorer, select all projects but the first one, right click, "close project")
2) right click on the first project. Select "Android Tools", then "Add native support ...".
3) select a unique library name without spaces (default names don't work).
4) Go to project properties, the "c/c++ build" section should now be there. Change the build command to ${NDKROOT}/ndk-build, assuming NDKROOT was correctly set up before-hand.
5) right click again on that project. Select "Properties > Android", make sure an Android version is selected in the "Project Build Target" list.
6) build everything and make sure everything works at this point.
Then you can re-open one sample project (eg 15 puzzle), and repeat the operations above if needed.
Hopefully you should be able to build that sample project and launch it on your phone.
It looks like NDK setting become a global setting not a project setting (plug in improvement) and instruction from opencv.org is outdated.
To setup it select: Window/Preferences then Android/NDK and choose "NDK location".
From now following instruction from opencv.org should make it work (If not try steps 1-3 from #dcoz answer, I did it but I'm not sure it if is necessary).
I've had a similar problem on debian testing after an upgrade.
Reinstalling eclipse / cdt did not help.
I've had to rm -r "$HOME/.eclipse" to get it working again.