I'm trying to get the Android LVL (App Licensing) setup to work with my software... and I cannot get it to import into Eclipse at all. The documentation says, "add the library folder to your workspace"... but it won't let me. I have rev. 2 downloaded... but when I try to import the project (from /android-sdk-macosx/extras/google/play_licensing/library) it shows up greyed-out in the projects list and won't import. Can someone please help me out here?
Just drag the sources into your project. The intention of the LVL is that you build your own sources and make changes (to try to thwart people that modify your binary by looking for LVL-specific bits).
Related
I am trying to use the support library for testing in Android. However, when I try to import
import android.support.test.runner.AndroidJUnit4;
as it is described here it says
The import android.support.test can not be resolved
I want to use revision 22 as I want to use the new features presented for UiAutomator.
There is no support\test folder in sources
I was digging around the sdk folder and I've notice that even though the path sources\android-21\android\support\test exists, sources\android-22\android\support has no test folder (there is a tests one but only with GrantActivity.java inside).
Did I forget to import any jars? (I tried importing support-annotations, and support-v4 but it's the same result).
Am I doing something wrong? I hope so and that you guys can help me figure it out.
Thanks in advance!
Note: I have downloaded the Android Support Repository and Library, I have all the packages from API 22 and I have Tools, Platform-Tools and Build-Tools up to date.
(I don't think it matters but I'm using Eclipse Kepler in Windows 7)
This isn't really supported, but since you're using Eclipse, you'll need to import the jar manually. The Android Support Repository gets downloaded to <SDK_DIR>/extras/android/m2repository. The class you want is part of the testing-support-lib, which is in the repository under com/android/support/test/testing-support-lib/0.1
Android uses .aar files for libraries, and the testing-support-lib is published as an aar. This format isn't supported by Ant, but if you unzip the testing-support-lib-0.1.aar file, it contains a classes.jar file that you can import.
As mentioned in the comments, you really should make the switch to Android Studio and use Gradle going forward so that you don't have to jump through these hoops.
I need to share an android project with another pc and still be able to edit it on both sides.
For some reason I can't get this to work. I have tried a lot of different combinations to import it and still be able to edit and push changes.
When I try to import the project into my workspace, there is a lot of errors like this:
the type java.lang.object cannot be resolved. it is indirectly referenced from required .class files
Then I tried importing the JRE System library (JRE 7)
After doing this I still get errors. for example this:
Activity cannot be resolved
Then I imported the Android library to the project (API 18). But after doing this, there is a red cross on the project, but not in any classes, files or like..
Therefore I tried to clean the project, which removed the "R.java" and gave me a bunch more errors.
I don't know exactly what I am doing wrong here so I hope someone can help me out.
What is the "right" way to import eclipse projects and still be able to edit and push/pull?
(Btw. I am using BitBucket and SourceTree and trying to import it into my eclipse workspace. )
Found out what was wrong.
By navigating to "Window > Show view > Problems", I found out that the necessary API wasn't available at that eclipse version. So I downloaded it the software and it worked.
I am using android studio to import this project called https://github.com/Pixate/pixate-freestyle-android. However when I import it into android studio the folder under samples, freestyleshowcase doesnt seem to build. The other 2 samples buld correctly. There is a red circle around the java file with a J (error) but there is no error in the file itself. COuld someone please help me out?
You are obviously missing some libraries but it is going to be hard for anyone to tell you which since we do not know the libraries the project needs.You can try Build-->Rebuild Project or Build-->Clean Peoject if it still doesn't work, close and open Android Studio.
If that doesn't work also then you have to go the hard way of identifying the libraries need by the project samples you imported and see if you have them.
When in doubt, you can try the Library Dependency option (using Maven) as demonstrated here:
https://www.youtube.com/watch?v=6BUcx9gGQ3o
That way, you won't have to manually edit the build.gradle file.
I would like to compile the sample provided by Sony for his SmartWatch. I followed the instructions in this page. But when I added the the SmartExtensionUtils project I saw lot of errors like: com.sonyericsson.extras.liveware.aef cannot be resolved to a variable. Instead this import com.sonyericsson.extras.liveware has no problem.
Did someone find and solve this issue?
In order for the EightPuzzleGame to compile, you need to add the following library projects that are available in the SDK:
SmartExtensionAPI
SmartExtensionUtils
SmartExtensionInternalUtils
In your case, it is the API project that is probably missing. You can see what library projects that are missing by checking the project properties. Example:
What you need to do is go to the properties page of the SmartExtensionUtils library and in the library box add SmartExtensionAPI as a dependency
This is a link to my desktop screenshot. SmartExtensionAPI and utils are in the project list (left side) but the EightPuzzleExtension does not find them
You don't need SmartExtensionInternalUtils project. When you create project from existing source, check Import project into Workspace. In this way EightPuzzle, SEAPI and SEUtils will be in the same directory and you'll not have no errors :)
I had this problem too. What i did is to solve it, is to import from the Sony samples in the Sony add-on SDK 3.0 the SmartExtensionAPI first and than SmartExtensionUtils. If these samples are build correctly the other samples will build correctly as well.
Go to File|Import, choose SmartExtensionAPI as your root directory and click finish. Maybe you have to change the compiler compliance level to build it correctly. After this do the same for SmartExtensionUtils.
I'm a beginner of Android Application development need to practice by examples and samples given in the book "Beginning with Android" by Wei Meng Lee, but whenever I try to follow those steps I come across a few errors unable to clean them. The Error seems like this:
" setContentView(R.layout.activity_main);" Don't know what type of error is it. In my computer I've installed SDK API level 16 that is for Android 4.1 What to do? Please guide me through appropriate answer.
Remove import
import android.R;
Than clean build your project also check xml layout file name in
setContentView(R.layout.activity_main);
than it'swork fine.
You should get the latest version of eclipse. Its now Eclipse Juno.
And check your import.
Remove
import android.R;
Instead put
import android.packagename.R;