Could not find lvl License.apk - android

I am getting this error message when I try to run my app that has the lvl installed as a library.
I followed the steps outlined on the developer.android.com site for installing the lvl library:
I copied the "market_licensing" folder into my project folder,
I created a new library called "License" with "new", "android project using Motodev studio", "create project from existing source", "SDK Target" API-7.
I set the main project "project","properties", "android", "add library" to "License", and checked "IsLibrary".
Still, the lvl library doesn't seem to build with the main application, giving me this error.

I decided to give up on using the library concept to incorporate lvl after trying for 8 hours. The Eclipse/android environment is still too buggy to work with libraries.
The developer.android.com site provided an alternate (and much better) way to include the lvl code:
"As an alternative to adding the LVL as a library project, you can copy the library sources directly into your application. To do so, copy (or import) the LVL's library/src/com directory into your application's src/ directory."
I did this, and it works! Stay away from the use of libraries.

Eclipse IDE is buggy with this library paths.But I managed to get rid of it
First copy the LVL Library to the folder just at the same directory your project is located. This will make relative path simple e.g. '../library' instead of long path which make it buggy and Then try Import in eclipse
2.Add Library in the way described same in documentation
http://developer.android.com/google/play/licensing/setting-up.html
3.Remove Library Project from your Build Path. This library.apk not found error is just because you may have clicked on fix projected 'Add to Build Path' while removing error and adding library.

Related

Android Exclamatory red mark

I'm very new to Android. Whenever I create a new project using a new workspace, I get an exclamatory red mark in Eclipse in my project and an error at Appcompat. I searched here for an answer, but no answer was what I was looking for, so I just asked this. When I create a workspace at DDMS it displays this:
Sending Tracking request failed!
At Android, after I create a new project
WARNING: unable to write jarlist cache file here, src file, layout file not available.
I've searched a lot and found no solution.
OK, first thing first. Eclipse is no longer supported by Google. The only official IDE for Android Development is Android Studio Download Page.
Here is the announcement of Eclipse support ending
Over the past few years, our team has focused on improving the development experience for building Android apps with Android Studio. Since the launch of Android Studio, we have been impressed with the excitement and positive feedback. As the official Android IDE, Android Studio gives you access to a powerful and comprehensive suite of tools to evolve your app across Android platforms, whether it's on the phone, wrist, car or TV.
To that end and to focus all of our efforts on making Android Studio better and faster, we are ending development and official support for the Android Developer Tools (ADT) in Eclipse at the end of the year. This specifically includes the Eclipse ADT plugin and Android Ant build system.
Please note that the number of people using Eclipse to develop Android apps are going down. You will get less and less support even on Stackoverflow as time goes by. Overall, it is better to just make the switch while you are just starting.
Check on the first link, you will see some amazing documentation in the Android Studio IDE
If you 100% required to use Eclipse...
OK, so you have a job that requires Eclipse or there is some other reason, then check out this documentation by Eclipse.
Also, here is a list of all the different icons that can be displayed by Eclipse (credit for the icon list).
Build path problems are sometimes easy to miss among other problems in a project. The Package Explorer and Project Explorer views now show a new decorator on Java projects and working sets that contain build path errors:
The concrete errors can be seen in the Problems view, and if you open the view menu and select Group By > Java Problem Type, they all show up in the Build Path category:
Please refer this link too here
If you go to appcompat_v7/bin folder, you'll see that file "jarlist.cache" doesn´t appear or is unsynchronized. You need to
refresh the appcompat_v7 folder, only press F5 over that folder.
The appcompat_v7 folder is added because you use an action bar
component.
Aah. To avoid a new appcompat_v7_XX folder when you are creating a new
project, choose a LEVEL API 14 as Minimun Required SDK. After you must
modifier the AndroidManifest.xml and put the level that you need.
change it
android:targetSdkVersion="19" />
Delete all appcompat_v7_XX. It is a bug.
With appcompat_v7, You will see that Eclipse creates two XML files:
Activity_main.xml and fragment_main.xml. If you want to have an option
to create a project in the old way only with activity_main.xml, do
that:
Make a copy of the folder "BlanckActivity" located in this path:
\sdk\tools\templates\activities of an ADT previous version.
Rename the folder as “BlankActivityNoFragment”, then edit the field
name of the file "template.xml" with a notepad as
name=”BlankActivityNoFragment”
Copy the new folder in the same path of the new Eclipse
IDE:sdk/tools/templates/activities
Now you´ll see the new template when you go to create a new project.
Remember to choose as Minimum Required SDK an API 14
If you don't want the support of appcompat library then just remove it from your project by following steps :
Right click on project
Select properties
In dialog select android on left side
In dialog check library section
Remove appcompat library by selecting it and press remove
Extends your MainActivity.java with Activity
You can run your project successfully.
If you want the support of appcompat then follow this steps :
download the latest appcompat using Sdk Manager
import appcompat project in your eclipse
add it as a library project
extend your MainActivity with AppCompatActivity.
If you're getting any problem with app_compact library... This is the solution
Hopefully it will work....
According to the documentation
Decorates Java projects and working sets that contain build path
errors
There can be several reasons. Most of the times it may be some of the below reasons ,
You have deleted some of the .jar files from your /lib folder
You have added new .jar files
you have added new .jar files which may be conflict with others
So what to do is we have to resolve those missing / updating / newly_added jar files.
right click on the project and go to properties
Select Java Build Path
go to the Libraries tab
Remove the references of the jar files which you have removed already. There will be a red mark near them so you can identify them easily.
Add the references to the newly added .jar files by using Add JARs Refresh the project
This will solve the problem if it's because one of the above reasons.
Still Facing problem ??Try this:
Go to Windows -> Preferences -> Android -> Build and uncheck "Skip packaging and dexing until export or launch" then restart Eclipse.

I can't access Crouton library in Eclipse

I followed all the steps for using the crouton library with Eclipse, but I still have not been able to use it.
Here are the steps I followed:
Clone the Crouton library from GitHub.
Unzipped the file and copied out the library folder.
Open eclipse and import the library into the workspace (The name changes to 'main').
Right-click on 'main' and select Add Support Library in the android tools option.
Open project properties set build target to 4.4.2, and tick 'is library'.
In the project which I want to use crouton, I add it as a library from the property option.
After all these steps when I try to create a crouton. For example:
Crouton.showText(
this,
getString(R.string.crouton_message2),
Style.CONFIRM);
Eclipse says Crouton cannot be resolved to a variable. When I to try import it, I can't find it.
These are the same steps followed in all my research, here's what I found, a post from Grokking android and a YouTube video
This is not the first time I am using a library. I have been using the android appcompat library for a while now with out any problems. And the steps i used in setting it up are pretty much the same with is, except that in the appcompat library after all the above steps, I had to copy the jar file and put it in the lib. folder of the project that needs it.
I'm I missing anything?
Thank you for your help.
Crouton is being built using gradle.
This means that the source directories are different to the default Eclipse source paths.
I discourage building without a proper build system.
Nonetheless, using version 1.8.2 of Crouton within Eclipse is possible.
To do so, simply download the jar from maven central and put it in your libs folder.
Since the current version of Crouton does not rely on resources, adding it as a library is not necessary.

Where can I find android-v7 support library jar

I want to use the new ActionBarActivitiy class from the v7 support library but I cannot find the support JAR anywhere. I have a v7 folder in my extras directory but it contains 3 directories and not a jar
In Eclipse right click on on your Project -> Android Tools -> Add Support Library... and follow the instructions. As the result, required jar-file gets copied into your project's libs folder. Or you can add libraries manually how it is described in Android documentation.
Update 1: Android Tools team has made some changes to the way support library is integrated.
Android updates do this a bit different. There is still Android Tools -> Support Library option, but now it behaves a bit different. Once activated, Eclipse will silently create a new project called appcompat_v7 or similar. The name might change in the next versions of ADT. You must be able to find this project in your workspace. This project contains android-support-*.jar file. This is a new library project. In turn, your project receives a dependency on that library project.
You can stay with the updated configuration "as is" and start using compatibility API. Or alternatively, you can copy android-support-*.jar files into your project's lib folder and remove dependency on appcompat_v7 library project. Both options will work just fine.
Update 2: They change this behavior quite often. Try Project -> Android Tools -> Add Support Library... first. If it doesn't work, please check out official documentation for more recent information.
Update 3: It is really worth to migrate to Android Studio to avoid multiple issues with ATD nowadays.
ActionBarActivity is in an Android library project, not a JAR. There are instructions in the Android developer documentation for how to add an Android library project to your environment and attach it to your application project.
You have to update your Support Library through your SDK and then navigate to the folder where your SDK is located! Then go to : Extras->Google and you will find the Project and the jar included!

Eclipse will not recognize project as library (ActionBarSherlock/ViewPagerIndicator)

I'm trying to get ActionBarSherlock and the ViewPagerIndicator libraries set up for my projects, but I seem to be running into a few issues. I sent Jake Wharton (The developer) a few messages earlier about it, and got a few replies but couldn't get anywhere - and I think he got busy with a few other things.
What my issue is, For both VPI and ABS
Both libraries open up without any errors, and I'm using compiler version 1.6 for all as is required.
The funny thing is, if I load in the samples that are provided - they work fine and link to his library; but when I go to add the library to my project - the above happens.
Where to store the actual library project does not matter, as long as you use a relative link to reference it. Check out the Library Projects - Development considerations:
Library project storage location
There are no specific requirements on where you should store a library project, relative to a dependent application project, as long as the application project can reference the library project by a relative link. What is important is that the main project can reference the library project through a relative link.
You should always use the Eclipse ADT plugin to select and set up Library Project Reference, i.e. right-click project -> Properties -> Android -> Add, then in the opened Project Selection window, select the Library Project list here (of cause you should import them in the same Eclipse workspace as your Main Project). This will add a android.library.reference using relative path into project.properties as well as show relative path in the Android preference window:
android.library.reference.2=../../../../../Documents and Settings/yorkw/Desktop/JakeWharton-Android-ViewPagerIndicator-f09acb0/library
If you directly alter it using absolute path from project.properties as below:
android.library.reference.1=C:\\Documents and Settings\\yorkw\\Desktop\\JakeWharton-Android-ViewPagerIndicator-f09acb0\\library
Then after Eclipse refresh your project, you get the exact error described in your question, see my screenshot below:
Hope this helps.
While importing the libraries, make sure that you tick the "Copy projects int workspace" check box. The library projects need to be in the same workspace for them to work.
delete and import the project and lib again. build the lib project , add lib to project, still error shows.. rename the lib project. this worked for me ....

Android Eclipse NoClassDefFoundError for external .jar files

I have come across a strange error. I have an Android project that uses external libraries, in particular:
android-support-v4.jar (for Fragment support in Android 1.6)
GoogleAdMobAdsSdk-4.3.1.jar (for ads)
The project ran fine until I updated some aspects of the plugin (can't recall the specifics as I did not pay too much attention to it) and after that, whenever I try to use any class from the above .jar files (or any of its subclasses, even ones defined by me), I would get a java.lang.NoClassDefFoundError. I could not find the answer after much searching, so I am really stumped.
I believe this problem is related to how my IDE is set up and it has little to do with actual code, so I will not post any unless if it's absolutely necessary.
You need to read this - Dealing with dependencies in Android projects.
This link is also useful - ClassDefNotFoundError with ADT 17
Basically, create a folder called libs and place all of your jar files inside. The recent update will automatically take care of the rest for you. You don't need to edit your path anymore.
Android does not support Java1.7 up to now. Jars built with compliance level 1.7 cannot be used in Android Applications. Rebuild your Java project with compliance level 5.0 or 6.0 before exporting the jar file.
I found this post via google and answers above didn't solve my problem. Hope what I say will be helpful to others.
If you see NoClassDefFoundError after upgrading to ADT 22, try this in Eclipse:
Go to Project Properties → Java Build Path → Order and Export tab.
Check the Android Private Libraries option.
Also a warning to others who have updated to r17 with many dependencies. I had a another referenced project on my build path and it still did not work after following ALL the directions on this r17 issue on the internet.
Found out after an hour that my referenced project used an older version of an external Jar than my main project did. When trying to compile the main project, Eclipse would give up due to this jar version difference and I never noticed the warning message in Console.
Solution was to copy the newer version external jar file to the referenced project's libs directory.
Wow - such a productivity killer.....
I ran into this error today too, because of updating to the Android SDK, r17. What the links that #aneal pointed out do not discuss is how to handle external runtime libraries (such as those imported under their own heading - not an imported user library).
The easiest way to solve this problem is to change the build order in the build path. Simply right click on your project and select Properties. From here, select Java Build Path. At the top of the display, choose the tab order and export and move GoogleAdMobAdsSdk-4.3.1.jar above Android X (replacing x with the version you are using). Next, clean your project and run it. You should be good to go!
The way I solved it was by : Right clicking on the project and selecting build path. Select configure build path in the selections that appear. After that see if your libraries are there in the libraries folder and then select the order and export tab and over there select all your jar files. Then select ok and run your project.
If you're using Eclipse with Maven IDE (m2e) go to "Java Build Path" then "Order and Export" and finally check the item "Maven Dependencies" and pull it down to the BOTTOM of the list. You should do the same with project references in the same workspace.
Every time I setup the project in a new computer that happens.

Categories

Resources