Removing android-support-v7-appcompat - android

I was using the Android developer guide to learn. On my first run, I ran into a number of problems setting up the v7 appcompat library which caused more errors for the next steps ahead of the guide. I had to restart coding the guide.
However, I am not sure how to remove the support library (I want to start over), which is currently on the same directory of my app folder. I am using Eclipse IDE. Can I just delete it from the Package Explorer? Will that wipe the library clean? If not, how should I remove the library to re-learn?

Related

Cant run simple android program using Eclipse

I am studying Android now and I am really a newbie in this.
I am using Eclipse with Android. I already installed all the files under Android 5.0.1 (API 21) and also all the Tools. Then I try to create my simple "hello world example" but I got a lot of errors.
Here are my errors:
Can you help me with this?
It seems you have some problems with styles, anyway i suggest to use Android Studio if you start from the beginning.
Make sure you've added AppCompat on below picture:
That problem comes from AppCompat as you can see, seems like that library has a problem and you should follow this tutorial:
Following are the steps:
Paste the android-support-v7-appcompat.jar that you have downloaded
in libs folder of your project.
Right click on your project, select Build Path -> Configure build
path. Select Library Tab then Add Jar option and browse your
recently added v7 jar and click OK.
That should fix the problem.
Android actionbar how to add supporting library v7 appcompat for Eclipse
And i suggest you to use AndroidStudio.

Unable to build android-support-v7

I've downloaded the Android SDK. I am trying to build the appcompat project. I've read that project is located here:
C:\Android\sdk\extras\android\support\v7\appcompat
I have imported the project into my workspace. It doesn't build.
I could go into great detail about which SDKs I have installed on my machine, etc. I could say that the values-v11, values-v14, and values-v21 folders all have errors, even though I have downloaded all three of these SDKs. But I am pretty sure if I import a project from the Android SDK website from the Android developer website, and I try to build that project, it should just work. I've followed the instructions here:
https://developer.android.com/tools/support-library/setup.html#libs-with-res
...and still not working.
So, why does this not work? I don't even care how to get it to work, I want to know why this does not work and why would I have to do any extra work or research to get it to build? Is this a problem with Eclipse? Should I be giving up on Eclipse and moving to Android Studio? This appears to be an incredibly simple thing to do and yet it does not work anymore.

Unable to find package com.google.cast

I recently updated ADT to point to Google APIs 18. The install went fine it seems and I'm able to point my Project Properties to Google APIs 18, however, Eclipse can't find the package com.google.cast. Anyone else having this problem?
That's because com.google.cast is not part of Android.
Near as I can tell, you will need to download a ZIP file containing their library project, import it into your IDE, mark it as actually being a library project, then attach that library project to your app.
Actually using those APIs appears to require a whitelisting, and it is in violation of their license to actually distribute an app (or, near as I can tell, source code) without express written permission of Google.
CommonsWare is correct, additionally, you'll need the v18 Android Support Libraries. v7/mediaRouter & v7/appCompat
I finally got this to work for me. Originally, I tried doing it like I used ActionBarSherlock (making it a library, went to Project -> Properties and told it to use that library, etc) but that didn't work. Finally, I got frustrated and simply moved the GoogleCastSdkAndroid-1.0.0.jar file from the lib folder of the library directly into the lib folder of the project.
So, again, I imported from existing code the SDK into my workspace, then took the jar file from its library and put it directly into my project's lib folder. Not sure if that's how it's supposed to be, but the sample TicTacToe game is now error free and runs on my Nexus 4.
It sounds like you're trying to run one of the Google Cast sample apps without having installed the Google Cast SDK. The instructions for installing the SDK and all necessary support libraries were just uploaded here on GitHub. I'm quoting below the relevant section for installing the Cast SDK itself:
http://developer.android.com/tools/support-library/setup.html#libs-with-res
You can either add the Cast SDK as a library project in your workspace, or add
the GoogleCastSdkAndroid-x.x.x.jar directly to the project you're building. The
former is recommended if you have multiple Cast-related projects in your
workspace.
As a library project: Follow the Support Library setup instructions linked
above for your downloaded and extracted SDK.
As an included library:
Copy the /libs folder from your downloaded SDK to your Cast-related project.
In the Package Explorer window, open (your Cast project)/libs and right
click on GoogleCastSdkAndroid-x.x.x.jar. Select Build Path->Add to Build
Path.

Android Library project organization

I have an Android Apps (A) project that depends on a Library project (B). The library project contains code as well as third-party jar files and some other jars that were exported from projects C and D. In Eclipse, I have project B specified as a library project.
However, when I connect my device and run project A (Run As -> Android Application), it crashes on the device and when I examine the LogCat output, there is a NoClassDefFoundError exception for one of the classes that exists in the jar files of project C.
When I unpack the B.jar file in Project B's bin folder, it does not contain anything else besides the META-INF/ folder with an empty MANIFEST.MF file. So this indicates that something seems to be going wrong someplace, but I'm unable to figure it out.
Could anybody help me with this issue?
Are you working with the latest ADT plugin and SDK revision? That is rev 22.x. If so there has been an important change to the dependency management.
Possible solution
For some reason the contents of the Order and Export tab has completely changed and you now have to export the Android Private Libraries from your library projects. See screenshot below:
More details
The tricky part of this change is that your project still compiles properly in Eclipse so you're not aware of any issues. Until you deploy the app on an emulator or device and you get the ClassDefNotFoundException on any call of a library project.
Not confirmed but I believe this is related to recent changes for maven support, also related to android studio preview
Similar change in the past
This reminds me of a similar change in the update to rev 17 where the lib folder suddenly changed to libs and all content from the original lib folder wasn't packaged so you wouldn't see any issues in eclipse. Only once installed on a device.
More information that 'issue' is available on this link. If you search on stackoverflow for "sdk 17" and "classdefnotfound' you'll also get enoug questions about that change.

Can't create Android App without Compatibility library?

I'm trying to create a small Android App, without the compatibility library for fragments and stuff. Just a simple app. When I get to the "install dependencies" step in Eclipse, the next and Finish are greyed out. How do I continue? Are all new apps really required to have compatibility library?
Anyway you can delete the compatibility library later in Eclipse from your project's libs folder and remove it from Build Path.
Why to do that though?

Categories

Resources