I was successfully using google maps in my application but then needed to change the Android SDK version from 1.5 to 2.0. Now the import for Google maps can't be resolved.
Make sure you have
<uses-library
android:name="com.google.android.maps" />
in your application manifest, and that you've downloaded not just the 2.0 SDK but the 2.0-with-google-APIs SDK. Then set your project's properties in Eclipse to check off the Google APIs version of the SDK you want. Then try to clean your build (Project-> Clean in eclipse; "ant clean" from the command line).
adding google-play-services.jar to my project's path solved my problem.
right click project->properties->java build path-> libraries tab -> add external jar
browse to android-sdk folder->extras\google\google-play-services\libproject\google-play-services_lib\libs\
If you don't have google-play-services folder then you need to close eclipse and open up the SDK manager separately and download google-play.
If you already downloaded google-play and still don't see your google-play-services folder, then you need to search for it....chances are that you have multiple android sdks installed....
1.Install all google API's using sdk manager.
2.In your manifest,under application element add
<uses-library android:name="com.google.android.maps" />
3.You have to include jar file for maps also..
Right click on your project and go to build path and then add external archives.
locate your sdk. android-sdk-windows\add-ons\addon_google_apis_google_inc_8\libs\maps
Doing right-click Properties->Android and selecting a Target Name Google APIs instead of Android x.x fixed the problem for me.
Add
compile 'com.google.maps.android:android-maps-utils:0.5+'
in dependency section of your build.gradle
You may also need to add google-play-services_lib to the project's list of libraries. Doing so resolved this issue for me.
Right-click project->properties->Android
Click the 'Add...' button found to the right of the Library Reference/Project table.
If you have downloaded the Google Play Services Library with the SDK Manager, you should see the library as a choice in the Project Selection box that pops up when you press the Add button.
If you have not downloaded Google Play Services follow the instructions here:
http://developer.android.com/google/play-services/setup.html
Related
I would like to develop an Android app using the Gluon Mobile framework.
I installed the Gluon plugin in my Netbeans IDE, created a sample project and built it successfully.
Now I would like to deploy the app to an Android device. I'm referring to the online documentation [1]: http://docs.gluonhq.com/charm/4.2.0/#_getting_started
As in [1], section "2.1.3. Android", I downloaded Android Studio 2.2.3 and installed the build-tools version 23.0.1 and the SDK Platform for API 21 from the Android SDK Manager.
However I can't see/install the "Android Support Library" from the Extras menu (Yes, I marked the "Obsolete" box).
Not surprisingly, I get the following error message, when I use "right click on my Netbeans-Project -> Tasks -> android -> android":
FAILURE: Build failed with an exception.
What went wrong:
Failed to capture snapshot of input files for task 'mergeClassesIntoJar' during up-to-date check.
java.io.FileNotFoundException: C:\Users...\AppData\Local\Android\sdk\extras\android\support\multidex\library\libs\android-support-multidex.jar (Das System kann den angegebenen Pfad nicht finden)
Indeed, the file "android-support-multidex.jar" is not available since the "Android Support Library" is not installed.
How can I install the "Android Support Library"?
Any help is very much appreciated!
It has been asked here and here, but since the answers are in different contexts, maybe it's worthy having a summary here.
Up until version 1.2.0, the jfxmobile plugin has been working with the obsolete Android Support Library.
Now this library is not only obsolete but not available any more for download.
The current version of the jfxmobile plugin is 1.3.2, and it includes the required changes to work without that library, and use the multidex-1.0.1.aar library instead.
To make it work, just follow these steps:
Open the Android SDK Manager and make sure you have installed Extras/Google Repository and Extras/Android Support Repository.
Make sure you have this library: ANDROID_HOME/extras/android/m2repository/com/android/support/multidex/1.0.1/multidex-1.0.1.aar.
Now on your project:
Update the build.gradle file of your project to use the jfxmobile plugin current 1.3.2 version
If you add to the android configuration the android SDK path, you should move it to a properties file. For that, just create a properties file under C:\Users\<user>\.gradle\gradle.properties, and add the ANDROID_HOME variable: ANDROID_HOME=C:/<path.to.Android>/sdk. And remove the androidSdk from the android block if it was added.
Save and reload your project so the new configuration takes place (On the projects tab, root of the project, right click, Reload Project).
EDIT
If you are on Windows, make sure that Android SDK is installed under a location where gradle will have enough permissions to create folders and extract the .aar file.
I'm trying to re-compile android app from sources using Eclipse STS. I added the sources to plain new project. I ended up with missing dependencies for classes from android.* package.
To solve this, I decided to locate android SDK on my disk drive and use the Project properties -> Java Build Path -> Source -> Link source. There I selected path to the android SDK.
But this would produce lots of build errors for missing types, such as
The import android.databinding.testapp.databinding cannot be resolved
I think what I did is not the correct way to include the SDK anyway.
What is the correct way to compile your Java code that uses Android SDK?
In case you would like to continue to use Eclipse/STS for Android development, you could give Andmore a try: https://projects.eclipse.org/projects/tools.andmore
Try to download it from kickass torrent. After that go to your project -> right button -> properties -> android, and select the path where you have saved the android sdk.
I have the Android SDK witch include eclipse. Its working for developing android apps, but now I want to make a tool app for pc and I need some of the java standard libraries that where not included with the Android sdk, for example javax.imageio.imageio.
Where can I get these libraries ?
I know there is a src.zip file with all the source code from java standard libraries in the Java directory, but Is there not a jar file or something like that so i can just include it as an external library ?
This worked for me !
Go to the Build Path settings in the project properties.
Remove the JRE System Library
Add it back; Select "Add Library" and select the JRE System Library.
Found this solution here.
You should edit your build.gradle file. There is a dependency section in there.
I'm a bit confused between 2 screen in eclipse:
I'm not sure how to import FB sd into my Android project properly.
What does "android" mean vs "Java build path" ?
As current configuration I get this error:
As the error says - there are 2 versions of a jar - android-support-v4.jar. Either make FB use your version of android-support-v4 or use FB's version of android-support-v4.jar in your project. The jar will be in project-name/libs folder.
First import it as a project into your eclipse and then give its reference to your project as you have shown in your first screen. If you have only jars file then add those jar to your libs folder and then follow steps of add to build path.
Delete the android-support-v4.jar from your project as there will be a jar mismatch.As you have added Facebook SDK as a library project, it is again not required to add that support jar file.Facebook SDK already contain that library.If android-support-v4.jar is a older one then you can update it.
You have 2 android support library with different keys.
Right click on your FacebokSDK and project ---> Android tools ---> Add support Library
I don't quite understand the problem, the picture is too small, also, Facebook has a great tutorial about how to do just that, also, make sure you're using Facebook's android support jar.
I've looked for an answer, no luck. Looked a lot.
I've downloaded an android example project from a friend, it's all in the correct layout, and the source files are there. Only I wish to open the whole project in eclipse, so that I can run it using the emulator I have installed. However, I cannot seem to be able to do this. I have all versions of android installed, and I have been advised that the files/project are for 2.3 so should be good. Have tried:
File --> New Android Project --> Using the existing file and build path
It suggested to do file --> Import instead, so went there and imported an android project from existing workspace.
It gave this error:
"Project has no default.properties file! Edit the project properties to set one".
Any help is much appreciated!
New version of ADT plugin uses project.properties while older version use default.properties.
Please upgrade ADT plugin. It will work
I had this problem when trying to open one of my projects on a different computer, you need to update the ADT. In Eclipse go to Help > Install New Software. Type in https://dl-ssl.google.com/android/eclipse/ and install the latest versions of everything. Also make sure everything to do with the SDK is up to date!
Try creating a new project from existing source.