Following the instructional video on how to download, add and create an Android project using the Sherlock Action Bar, I'm constantly failing to add the library to the new Android project.
I followed the instructions to the letter but in the Android project's properties, under "Android", when I add the reference to the action bar, the following happens:
All looks fine, there's a nice green "V" sign with library's
location under the "Reference"
After pressing OK and re-opening this same window, there's a red "X"
with the file location and the "Project" row shows "?" for the
project's name.
Again, I followed the instructions to the letter and I don't understand this issue.
If anybody has an idea... I'd appreciate the help.
Thanks.
did you delete the android-support-v4? cause I deleted my android-support-v4 in the libs folder then error free, and if not i think ur problem is your jdk its should be jdk1.6
i used slidingmenu + abs with my project.. took me 2 days to set up... lol
Related
I'm a student who concerned about this issue, I'd like to create a button and when the user taps the 'Start' button, the app opens the Unity program.
and I've done lots works for this in the past few weeks,I also found this question:
How to make Unity3D as an activity in Android Studio?
this is certainly what I want solve too. But Unfortunately, there is just 1 answer replied.
and I found this way in:
Unity3D and Android Studio Integration (the 2nd answer)
I'm so glad could find this way to try, but there are so many wrongs,May I please someone who can solve my bugs or teach me a better way to do? please!
I reference this answer and do it step by step, and I bullet all the problems which I met as follow:
1.In the step 1 "import new module",I just can choose a gradle file rather than a project folder, is that right?
2.In the step 5,Sorry for that I don't really understand what this means,[Integrate the new unity module's Manifest with your project’s Manifest by moving necessary tags to our project’s Manifest (e.g. :Activity, uses-feature etc.). But I only have 1 Manifest, I don't know how to integrate:
3.In the step 6,I add "compile project(path: ':yournewmodulename')" to dependencies, after that the problems appear.
4.In the last step, I don't know how to create a layout like that, do I have to create a new file before Step 1 ?
5.In the last step,I've try this script many times,but why this important [UnityPlayerNativeActivity] always become gray?
Please any master who can solve them!!! I would be vary very grateful! thanks a lot!!!
I have a trouble to add a package under one of the flavor folder in Android Studio: after I right click on the java folder and I could not see the 'Package' or 'Java Classes' options there!
I did exactly the same for another flavor and it was fine.. Now I am stuck here, without knowing if it is a bug in AS or I did anything there. Anyone help me please!
(I googled it and did not solve it with what I have found so far)
=======EDIT========
I close the project and create a brand new empty project, now even in the main folder I cannot find the 'Java Classes' or 'Package' when I right click on the java folder I added.
However, if I just create the folders of the package under java with a class there, and do a build, it will finally recognize that and make java blue color and then I am able to see the menus if I right click the blue java folder.
So it sounds like some bug in AS.
It might just be the build flavor you are currently selected correctly to enable that flavor.
If we have two build flavor let's say free and pro. If pro is selected is current build flavor. The flavor free will not be shown as java package in blue color as you mentioned, it will be shown as directory structure. Hence change the build variant and make it workable.
Not sure if you faced the same issue, but sharing it for reference of others who might face this issue as i faced now.
Package option is available only for selected flavor. switch to desired flavor and IDE will refer that source directory and will convert it to package and directories from other flavors will be listed as normal directories tree structure.
I found this Solution.
File > Project Structure > Select the lib folder > Click on Sources > Apply and Okay
Now you can see the new package option by right clicking the lib folder, the new package option will be shown.
Step1
Step2
Step3
Control click (mac), or right click the /java directory and select Mark Directory As -> Source Root. You should then be able to right click the /java directory and select -> New -> Package. Your java directory will also appear blue.
Solution. File- Project Structure- Modules- Right click on lib - Select Sources.
then the option "Package" will appear on your list.
I am unable to see the folders that are physically existing, this is the case.
But in actual fact I have other folders as welll
So what can I do?
Above your the file directory view in Android Studio is a drop down which currently is most likely set to Android. Change it to Project and you should be able to see all your files.
I tried the all the approaches mentioned above but can't fix rather than fix it by a hardcore approach -
Step 1. Close your Android studio.
Step 2. Delete .gradle and .idea folder from your project directory.
Step 3. Open your project and you will see the files again.
go to View menu then click tool window then after click on project
view->toolwindow->project
it worked for me
for me doing the following works:
from menu go to: View--->tool windows ---> Project
then click the little gears icon (settings) you will see an option to change the empty middle packages. it looks like this:
disable "Hide Empty Middle Packages" under the Project View settings dropdown and then it should make everything show up.
If anyone ever does what I did maybe this will help:
Android Studio does not like it when module names begin with a number. I was learning from some tutorials and named the first module "1-name" and the next one "2-name". Setup was fine and it ran, but only the "Gradle" Scripts entry would show in the navigation window in "Android" mode.
I have created a dummy Android project from within Android studio, and I can make it run, but the Editor itself fails to find the R class. In fact I can't find the gen folder. I thought that maybe that folder should be added as a source folder or a classes dependency, but I just can't find it.
Can anyone help?
#joe_deniable gave me the idea to look closer in the build folder, and I found a folder that had been excluded by intellij, where my R was happily having an ice cream. This was here:
build/source/aidl/debug
I had to remove this folder from the exclusion list and add it to the sources, and could finally start coding in this new IDE.
Thanks
The folder layout is different to eclipse. I don't think there's a "gen" folder. My "R" file is in the following location:
(module name)/build/source/r/debug/(package name)/R.java
I think this file is created when you create a new project using the wizard.
I had the same problem on linux. I've resolved it installing ia32libs and rebuilding the project. The R class is generated from android.
you can find it in the directory app/build/generated/source/r/debug/package name.
Another possibility is that the package you used has some issue - the target package is not the same with the defined one. In turn, R can not be found in the package.
Goto to Top right corner in Studio, click on search button enter R.java , you will get the file
thank you
Every time I try to delete my project, and create a new one under the previous name that i deleted, the icons and references are still there. I can't seem to fully delete it then start again with the same name. Any help is appreciated.
Using: Xcode 4
Close the project then delete it with Finder. Open Xcode's Organizer window (Cmd-Shift-2) and click the Projects tab. Find and delete the project from that list. Close the organizer than try creating your project again.
Also, file a bug report at http://bugreport.apple.com - this shouldn't be necessary but I have seen it before (in 4.0 betas).
A solution for Xcode 6:
(You can skip steps 2 and 4 if you just want Xcode to forget the project, but don't want to remove the actual project files.)
Go to Window ▸ Projects.
In the list on the left, secondary-click on the project you want to delete, and select "Reveal in Finder".
Go back to Xcode and secondary-click again on the project in the Projects sub-window, and this time select "Remove from Projects...". This will remove the project from Xcode, but won't delete the actual project files.
Go to the Finder window that opened in step 2 and move the project folder to trash.
Also, to get rid of the unwanted projects when you control-select on Xcode in docks:
1) Follow Joshua's instructions above
2) Quit xCode
3) Control-click on "show recents"
Now only the projects you have left will show up.
In Xcode 4.3, close the project, close Xcode, then use finder to delete the project folder. Next time you launch Xcode the project should be gone.