I can't understand why am I getting this error:
When another people don't get it and are able to create a new project with inner navigation like that. powered by compatability library:
PS: I have every single package of android SDK Tools installed on my computer, and they're all up to date
It is because the wizard doesn't take the compatibility library into consideration. Set your minimum to 14 and then go and change the manifest after you have created your project and include the compatibility library.
Related
This error appears when creating a new Android Application module in Android Studio using Fixed Tabs + Swipes for navigation.
It says:
The following dependencies were not resolvable. See your build.gradle
file for details. - com.android.support:appcompat-v7:18.0.0
I'm targeting Android 4.0+ devices. Why is the compatibility library involved? One workaround is to install this library using the Android SDK manager, but I'm concerned my app will actually use this compatibility library when there is no reason to. The ActionBar and fixed tab navigation should be built-in to the Android 4.0+ framework right?
This happened to me with IntelliJ Idea 13 Ultimate when creating new Gradle Module. I was working on the app that supports Froyo. I had to manually add support libraries to the SDK. After that I was able to build just fine. Here is the screenshot of Project Structure settings for SDK that I have:
As you can see, support for v4, v7 and v13 which were added manually. Those will be associated with Android API 19 Platform (in my case). When you create next new Gradle Module, you will still need to go to Project Structure to select the SDK under Project, but you will not need to add support libs again. Hope this helps.
I installed the compatibility library anyways. Something I didn't realize is that you can't create your first module by using File -> New Module. You have to use File -> Project Structure -> New Module for your first module. It's really unintuitive. After I did this, then everything worked.
I'm developing an android application and I'm trying to use a library Sliding Menu (github.com/jfeinstein10/SlidingMenu). However, I have a problem in using the library in a clean project. I get
java.lang.NoClassDefFoundError: com.slidingmenu.lib.R$styleable
when doing
SlidingMenu slidingMenu = new SlidingMenu();
Configurations tested:
JDK tested 1.6u43, 1.7(latest)
Project target api = tried both Android 4.2.2 and Google API 17
SDK versions tested 21, 21.0.1, 21.1
Windows 8 Pro x64, Intel Core i7 3610QM, Nvidia GT660M, Samsung Pro 840 256GB SSD
Integrated both with Actionbarsherlock and without it.
I import the library, by creating an Android Project from Existing Code, marking "Is Library" in the android properties, and then referrencing it in the original application android properties (not via .jar)
Below links to code snippets, full stacktrace and screenshots of current configurations
Code snippet:
http://pastebin.com/2yzRC5AJ
Full Stacktrace:
http://pastebin.com/D7RQwuQd
I've been stuck on this for 3 days now... :/
I had to add the dependency two ways before I eradicated my noclassdef errors
Add the library.jar from /bin as dependency to your build path, make sure to select the Order and Export tab and select the check box as well for the new dependency.
Add the library via right mouse click on your project, then properties, then android then add library
Voilla
I struggled with this as well, and from a vast number of google searches, managed to piece this together.
Hope it helps..
Simple solution :
If your project already contain support library then just delete support library from library(jfeinstein10 / SlidingMenu) and then every thing works fine.you can do it after import also.
1) Just add the library to the properties of your project (ANDROID);
2) And mark the same in Order & Export property of (JAVA BUILD PATH);
I had the same problem. Since you're building the app with IDE, you need to tell the IDE that this module is a Library, thus defining the library in .properties file would be useless. Try change the IDE build file, I'm not familiar with eclipse, but in android studio this lines would be enough:
module.iml
<configuration>
<option name="LIBRARY_PROJECT" value="true" />
</configuration>
Go to Manifast and change sdkversion to 11
Below code in onClickLinkToDropbox() method in HelloDropboxActivity class of "Hello Dropbox" example in Android Sync SDK show error as
The type android.app.Fragment cannot be resolved. It is indirectly referenced from required .class files.
How can I solve this ? I'm using Android 2.3.3.
mDbxAcctMgr.startLink(this,REQUEST_LINK_TO_DBX);
This seems to be the compiler being unreasonably picky during overload resolution. I see two possible solutions to this:
Build with a later SDK version (11 or later). You only need to change the SDK you use to build (set the target in Eclipse project properties dialog, or target=android-11 in project.properties). You can leave both minimum and target set to 10 in your AndroidManifest.xml, so your app will still be compatible with older versions. In general it should always be safe to build with the latest SDK. You'll get warnings if you use APIs which don't exist in your manifest-defined target.
Work around it by forcing the overload resolution like this:
mDbxAcctMgr.startLink((Activity)this, REQUEST_LINK_TO_DBX);
If you're not already using it, you will also need the Android Support library. In Eclipse, open the context menu on your project and select Android Tools → Add support library... and follow the prompts to add the library to your project.
https://www.dropbox.com/developers/sync/tutorial/android
I want use ActionBar for my application but i found it can't use for android < 3.0.
I found this https://github.com/johannilsson/android-actionbar to solved my problem but I get error at
import com.markupartist.android.widget.ActionBar;
import com.markupartist.android.widget.ActionBar.Action;
import com.markupartist.android.widget.ActionBar.IntentAction;
Give ActionBarSherlock a try. I use it for one of my projects and after some reading of the docs and the samples it just worked. The samples are easy and straight forward, you should be able to extract what you need from them.
To see what it's able of just download the sample app from the market: Sample App (requires at least Android 1.6)
You should add the code to a library, and add the library to your project.
To do this in Eclipse create a new project, using the same package name as the github project (so com.markupartist.android.widget). In the properties select the project to be a library under the Java Build Path tab. Then, in your project, go to its properties, and select the library.
I think your including files are missing (JAR libs) , Click on error icon and then select fix project setup.
I spent around 10 hours trying to fix this problem. All the above ans does not work. Actually what is missing is android support library. To fix this, right click on project, >Android Tool> Add Support Library. Hope this save alot of time for other who came across this. just add support library both on your ActionBar library and the current project.
In "Fragments for All", Xavier Ducrohet, Android SDK Tech Lead says Google releases an Android Compatibility Package by SDK Manager.
I've installed it, but, how can I use it now?
How can I integrate Android Compatibility Package in my project?
If you're using version 12 or later of the Eclipse Android support library, just right-click on your project, and choose Android Tools > Add Compatibility Library...
There is a .jar file called android-support-v4.jar in the directory {yoursdkpath}/extras/android/compatibility/v4/. Copy this into your libs folder in the root of your project and add the file to the build path in Eclipse.
Premier,
I followed the Fragments example on the Android Developers Blog to create a "backwards" compatible app using Fragments. In the article there is a brief mention of the Main activity that uses a layout with fragments.
The code for this activity is not interesting; it just calls setContentView() with the given layout:
What should be mentioned here is that this activity must derive from FragmentActivity and not Activity class. This threw me off for a while.
Good luck
Refer Using Fragment of Android Compatibility Package may help you
Check the "Step 2: Configuring the Build Path" Section here
This is easy with new Eclipse I downloaded. Provided you have all the paths for SDK etc setup correctly, Right click on Project -> Android tools-> and Hit "Add compatibility Library" it will add the JAR file