I have an existing Eclipse android project that I would like to use the pre-alpha MapboxSDK with. I have tried using gradle to try to build the library into my project, but have been unsuccessful. Is there someone out there that would be able to detail a step by step procedure for importing and integrating the SDK into an existing project?
Best place to ask would be on the issue tracker for the project, and to share the specific error that you happen upon in trying to set the project up.
Related
I cloned this repository from github and opened it as a new project.
The project view shows no gradle and I cant run the provided samples.
How can I create or add a gradle to the project and run the samples?
The repository directory what you have mentioned is not an android project.
This is the URL for that wheel sample
Android-Wheel-Menu
and also it is developed in Eclipse. So better download it from browser. then load it from Android STUDIO.
What you cloned is not an Android application but a library for Android applications. Thus, it's not intended to be run standalone which is why you don't find a build.gradle. You need to create a new Android project and then follow the steps under "Usage" which explain how to integrate it in a project.
This library is marked as deprecated, so you might want consider using another one.
Simply trying to add fabric to existing Android project. Followed their instrustions for IntelliJ IDEA:
Registered
Downloaded and installed fabric plug-in
Logged in
Going to add android module, got this result
As you can see, actually there is android module at the project. How to fix this?
Was forced to install Android Studio and integrate the plugin there to resolve this. Later found guide for manual installation, which may be helpful.
I have a Crashlytics-enabled app (which is now part of Twitter's Fabric) and I need to add some JNI functionality using the Android NDK.
I've switched to experimental gradle as Android Studio prompted me that way:
http://tools.android.com/tech-docs/new-build-system/gradle-experimental
When I've applied the necessary changes and tried to sync, I've got the error:
Crashlytics was applied to a project without an Android plugin. Please make sure the Crashlytics plugin is applied after the appropriate Android plugin for your project.
I've googled the error and found out that it's a problem between Fabric and experimental gradle, and Fabric team doesn't really seem to care about fixing it any time soon: https://twittercommunity.com/t/gradle-experiental-support/53441.
I've stumbled upon Issue with experimental gradle: The android plugin must be applied to the project but I have no idea what to do there, and I'm not sure if it's the right way to go?
How can I use Android NDK and Fabric in my project?
So gradle-experimental and Fabric don't mix.
Solution:
1) update to latest Android Studio 2.3.1
2) follow this tutorial to drop gradle experimental: https://developer.android.com/studio/projects/add-native-code.html
What I did was create a new temporary project with C++ support enabled and added a blank activity.
Then I opened my current project and the temporary project and copied the necessary changes into my own project.
After I was done (about 1 hour of work) I was able to build my C code into a library, load the library into my project, and make the JNI calls.
I'm having an issue importing my PhoneGap project into Eclipse. I imported my project using the existed android code option but when I import, I am receiving hundreds of errors. My build will not run because of this. I believe it is trying to call in Cordova Library that isn't found but I have included it in my project. Can anyone assist me with this problem?
It seems like Eclipse doesn't even recognize your projet as an Android projet.
Check if your projet use Android SDK.
I had the some similar issues with Eclipse, then I moved to Intellij IDEA and that mostly solved all my problems.
How can I add the facebook sdk to my android project in IntelliJ? I'm familiar with how to add a library project to an existing project in Eclipse, but not in IntelliJ. Anyone know how?
The answer below is outdated, please refer to the actual solution.
If it's just a jar, you can add it to the module dependencies.
If you want to use Android Library with source code, you need to create a new Module in IDEA with Android Facet and specify in the facet settings that it's Android Library Project. Configure module content and source roots and then add this module as a dependency to your Android application module.
Here are the screenshots for the Facebook SDK Android Module configuration in IDEA:
Note that the root of the module is set to the facebook subdirectory from the GitHub repository and Is Library Project checkbox is enabled.
If you add this module as a dependency to your application, everything should build fine.
I've also uploaded a sample project that consists of simple sample provided with the SDK and this facebook API module as a dependency, you can download and use it for reference.
Remove if inappropriate - but this solution was much more relevant for the latest version of IDEA and the latest Facebook SDK: https://stackoverflow.com/a/14732898/1711200
Tested with IDEA 12.1.2 and Facebook SDK 3.0.1
My reason for posting this is because the directory structure for the latest Facebook SDK is different & makes this post outdated. I also kept getting directed to this thread, whereas the thread I've linked to is a better & more relevant solution.