Need Help fixing many errors in Android Studio - Android Studio

Hi
So I want to learn how to make Android apps in Android Atudio with Udacity's Android Fundamentals course. I have no knowledge or experience in app-development and very very veeeeerry basic programming knowledge. The problem is though that there are many error messages everywhere and I already searched on the internet a few times but have newer gotten a working answer to the problems I'm having. So I thought i could ask the people at the xda-forum for help
I am going to post the problems one after another (posting the next problem after the one before is fixed), because maybe with one answer multiple problems get fixed.
Also I completely reinstalled Android Studio just to be sure I didn't create any more problems myself.
The first problem is that there is an error message saying:
failed to find Build Tools revision and then the Version specified in the build.gradle
I know that I need to change the SDK versions in the build.gradle file but I cant find where you can look up the Build Tools Version currently installed. By the way I want to compile for android Marshmallow hoping that it also works for Android Lollipop if that helps in any way
I am thanking in advance to everyone trying to help me

Hey!
I'm also a new learner to android app development
Just wanted to know if the udacity tutorial videos are helpful?
Do they explain well?

ChahatGupta said:
Hey!
I'm also a new learner to android app development
Just wanted to know if the udacity tutorial videos are helpful?
Do they explain well?
Click to expand...
Click to collapse
I did't really come that Far in the Tutorial (because of obvios reasons) but I Can say they are really good. Easy to understand and straight forward.

DasMaennel said:
I did't really come that Far in the Tutorial (because of obvios reasons) but I Can say they are really good. Easy to understand and straight forward.
Click to expand...
Click to collapse
Thanks
I followed a lot tutorials but none of them worked out
Will try this one

Did you check on the Sdk manager whether you have the needed build tools installed?

I don't comprehend what the correct name is for s highlight this way, yet I will simply depict it.
I am utilizing android studio and I included some java classes from an alternate venture. Presently it says
"missing bundle articulation: whatever". Be that as it may, there is not alternative in the mistake popup to simply naturally include the missing bundle articulation. I know it appears to be lethargic to not sort it, but rather I get a kick out of the chance to do things rapidly.
At the point when there is a mistake this way, is there a route for android studio to naturally included the required lines of code like obscuration would?
For Windows/Linux, you can go to File -> Settings -> Editor -> General -> Auto Import -> Java and make the following changes:
change "Insert imports on paste" dropdown value to "All"
check "Add unambiguous imports on the fly" option
On a Mac, do the same thing in Android Studio -> Preferences
That way, as you type, or when you copy and paste, many imports will be added automatically. Those that aren't are ambiguous; put the cursor on the class, press alt+enter and select which version of the class you meant.

Related

**UPDATE**SuperG1-Computer 9/8/09 4:03am

Here is basic program for your windows computer that just does basic stuff.
It can reboot your phone to wherever you want like recovery, bootloader.
It will wipe your ext2/3 from recovery if you choose and it will repair your ext2/3.
This is still beta, so far everything that is on the app works. But when I say beta I mean I still to implement alot more features so just use it and then tell me what you guys want. I am working on implementing switchrom into it.
This is just about 3 hours of work so you will see alot more in the future.
Screenshots Below!
*(For those of you wondering it is writen in a mix of C++,vb.net,python,and MS-DOS)*
Twitter: http://twitter.com/kickfliprock13
** Oh I forgot to mention you need to have adb set up for this to work if you don't have it set up than it wont work. So if you want to set up just go here: http://punk-in.com/driver_vista.html
Continued
Changelog:
9/8/09: Added a link to tell you how to install usb drivers for your phone
Added links to our twitter's and plurk's
Fixed a few small bugs
Continued Again
This is for problems and things I am changing!
Problems:
Can't get it to put arguments into adb commands, for example adb shell sh /system/sd/switchrom -s (then the name they want to name it)
I suck with ShellExecute commands so I need to get better at those
Need to learn how to add .exe's and other files into a C++ file and then run it.
Changing:
I will probably be changing the layout in the next update
I will be learning ShellExecute commands hopefully. So then it can set up adb for you and do a switchrom.sh for you
looks good dling now btw how many programming languages do you know lol
Languages
I know a couple. This program is written in C++. I have only done C++ for about a week so I am still kind of a noob. But other than that I know: html, MS-DOS,Python, I am learning java, I know some C and C#.
I am taking some visual stuff right now, like blender and game development.
After that I want to learn CSS, and learn the reset of java and C++
do you think you can make it that the program can flash the new spl and radio so the phone won't brick. Anyway awesome program
It looks like it's just issuing the non-response ADB commands. Do you have anything there to capture the commandline output from ADB? I'm trying to get the push and pull confirmations for mine. It seems the stream is immedately written as blank and then changed to the confirmation but the change is not rewritten to the stream.
Also ADB does not have to be in a specific directory in order to work. Just change the working direcory of your process to the folder where you have them stored. I bundled the files with mine so I didn't have to worry about if someone didn't have them in the right place.
M..N said:
do you think you can make it that the program can flash the new spl and radio so the phone won't brick. Anyway awesome program
Click to expand...
Click to collapse
Yes, we are working on making that happen very soon. It is difficult but yeah, we already figured out a way to apply new radio,spl and get to hero in about a minute now we just need to implement that into the app but I just can't figure out exactly how to include multiple files in my C++ project but once I figure that out I will tell you.
Excellent thanks very much
Hi so how is this program coming along
Very well I almost have rooting figured out
Cool would this work on uk phones and when is the estimated release time

Android Market and AOSP

Hello, all,
I have recently taken an interest in developing Android 2.1 ROMs. So far, my work on 2.1 has been going well, except I cannot seem to get Android Market to install. I have tried re-signing the apk file, but the result is the same.
Can someone help me out on this? This has probably been answered before, but I cannot find anything truly relevant to this question. Any help is greatly appreciated.
someone needs to close this thread before this flame war gets any bigger
tekgek said:
Hello, all,
I have recently taken an interest in developing Android 2.1 ROMs. So far, my work on 2.1 has been going well, except I cannot seem to get Android Market to install. I have tried re-signing the apk file, but the result is the same.
Can someone help me out on this? This has probably been answered before, but I cannot find anything truly relevant to this question. Any help is greatly appreciated.
Click to expand...
Click to collapse
Have you tried just pushing with adb? By development do you mean cooking or compiling your own?
Please be respectful of others ...
I taken the time to cleanup this thread and move to Q&A where it should have been. If someone has an answer post a reply; plans to respond using trolling tactics are ill-advised.
If the thread goes OT again, a moderator will be forced to close it and likely remove it ... would be nice if it didn't have to come to that.
Regards,
I am building this directly from AOSP, from scratch. Thanks to the mod for cleaning up the flame war, by the way
Oh, from AOSP. How are you adding them in? AOSP does NOT include the Google Apps by default, I'm not expert in ROM building but I am sure there are some .libs needed (I know GTalk requires some) and possibly need the other Google Apps as well.
And this is why I love this place . What you said about libraries and what carz12 said about adb helped a lot.
Here is what I knew:
AOSP does not include the Google Apps, including the market. The market is somewhat difficult to install to an aosp build, and I think needs to be resigned with another RSA key.
What the forum helped me figure out:
The advice about trying the adb shell gave me some help. When I tried to push the market app to the phone, I got this:
./adb install alpha-1-signed/system/app/Vending.apk
898 KB/s (1274068 bytes in 1.384s)
pkg: /data/local/tmp/Vending.apk
Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY]
Click to expand...
Click to collapse
This tells me that I am missing some libraries. But I'm also missing some other stuff. I'll recompile from source, install the libraries, and report back after I flash this to the phone. Until then, if anyone thinks any of my conclusions are wrong, please tell me so I don't waste my time, or yours.
EDIT: For all of you who are currently viewing this thread, how many of you would like a very fast (possibly faster than OpenEclair), stable, no-frills Android 2.1 ROM? I would like your opinions, because this will give me a good idea of how many people would be interested in this kind of thing.
Tekgek
tekgek said:
And this is why I love this place . What you said about libraries and what carz12 said about adb helped a lot.
Here is what I knew:
AOSP does not include the Google Apps, including the market. The market is somewhat difficult to install to an aosp build, and I think needs to be resigned with another RSA key.
What the forum helped me figure out:
The advice about trying the adb shell gave me some help. When I tried to push the market app to the phone, I got this:
This tells me that I am missing some libraries. But I'm also missing some other stuff. I'll recompile from source, install the libraries, and report back after I flash this to the phone. Until then, if anyone thinks any of my conclusions are wrong, please tell me so I don't waste my time, or yours.
Tekgek
Click to expand...
Click to collapse
It's good to know that you are missing libraries
Your best bet is to compile your rom, and then compare it to a rom that already has the google apps included (WesGarner build, CSDI, etc...) and see what libs are missing from yours, add them in and then try again
I was having the same problem too. I am gonna try this too.
And ya besides the libraries, the aosp build doesn't include some of the framework files and permission files too, like the framework files relating to gtalk and google maps should be added as well to the system/framework folder and the permission files in system/etc/permissions relating to gtalk and maps should be added as well.
I tried with all the missing libraries but with no luck...there must be some other files tooo. Gonna continue on Thursday.
Did you try resigning the apk file?
Not really. I am gonna try that too. Got coll tomorrow so may be later tomorrow. By the way did you got the video working?? I tried pushing some libraries from supereclair. But not workin till date. it works in his build though.
College is more important than android, imho. whenever you get the chance .
I hope to get video working in the future, but not right now. My primary computer (the core i7 rig I use for all my computer work) needed an OS reinstall, so I have made no progress since my post on ADB. My fist priority is to get the basics working, then I'll work on the other issues, like video playback and the camera. However, as of right now, I am re-downloading the source, and hopefully building it in the very near future, expect an update tomorrow, and maybe even a finished product (keep in mind that this is ALPHA, so don't expect anything wonderful).
Alright, I got it... mostly. The market appears installed, now all I need to do is make it not crash. Whenever I select the market app, I get a white screen, and then the home screen. I'm also getting a force close on the gapps process. What am I doing wrong
How did you got market show up???
The gapps framework file is also missin in the /system/framework folder in AOSP build.
Did you tried pushing the missing file?
I downloaded openeclair, pulled all the apps that had the word google in them, resigned the the market with another key, integrated them into a rom package, flashed, and voila, the market appears. I also added in a couple framework files, but I think I'm still missing something. Do you know what the name of the file is? I'm not sure what or where it is.
tekgek said:
I downloaded openeclair, pulled all the apps that had the word google in them, resigned the the market with another key, integrated them into a rom package, flashed, and voila, the market appears. I also added in a couple framework files, but I think I'm still missing something. Do you know what the name of the file is? I'm not sure what or where it is.
Click to expand...
Click to collapse
ya its com.google.android.gtalkservice.jar
okay, added it in, still getting a force close on the gapps. Where to go now???
As i mentioned earlier there are some files missing in system/etc/permissions. Did u tried pushing those files.
All permission files are in place, all gapps are resigned. The framework is in place. The setup wizard i also resigned, which now crashes. If anyone has any suggestions please post them. I am at my wit's end here.

[Q] How to recover deleted SDK Manager > Extras items

Hi folks!
I'm very new to android studio and android programming. I'm still mostly setting up the workspace and reading some texts to help me get started.
In the process of upgrading the packages in SDK manager a number of items became flagged as 'corrupt' (or words to that effect).
I figured the best response would be to select them via the check box then 'delete packages' - which I did. I was hoping that the SDK manager would then automatically recognize that they were missing and reload new, clean versions... But I was wrong!
They are missing completely and I'm not even sure what they were nor how many. I'm sure one was "ARM EABI..." but I don't know much else...
How do I get back the complete original listing from which I can install afresh what was missing?
Thanks for looking and any help you can give! :good:
Google "android sdk manager adding sdk packages" and the first link should help you out. Apparently, you are missing 3rd party packages and the links you provided before are no longer valid.

Cannot build after upgrading from 1.0 to 3.3

I have upgraded from Android Studio 1.0 to 3.3.
I was building and rebuilding and flashing my software to phone very effectively on 1.0 and now after upgrade after nearly two days of work I can still not get the basics (build Android app as far as java compile errors) working.
I appologise if my questions are not perfectly formed, I am beginning to get really tired and confused and I would be so grateful of a little latitude and some help to get back to where I was.
When I installed 3.3 it recommended that it uninstall the current version, which I agreed to it doing. So fresh start I guess.
Amongst other things...
After the install, my app would not build and kept asking for a newer version of gradle. I set in settings local gradle 4.10.1 and I set the gradle plug-in to 3.3.0 in the top level gradle file. I tried setting "use default gradle wrapper" and then setting these versions in "project structure" but they kept changing back again, so I used the other method just described. It then complained it couldn't find that plugin so I added repositories google and jcentre to that file. It then began to build but complained that a version of build tools could not be installed because the license had not been accepted. I clicked on the link provided and accepted the license, but the build tools would not install, no reason.
I could not find "sdk manager" menu item anywhere in AS menu structure. Don't know why. It used to be there in 1.0.
Thinking it's a brand new install as it said I go to OS start->all programs->Android sdk tools and launch sdk manager as administrator. I install the offending build tools version accepting the license.
I rebuild, same error.
I look where that sdk manager exe was and there is no license folder in that folder nor the one above.
I root around the folder structure and find a different sdk manager under prog files (x86)\Android\android-studio\sdk and a license folder in the folder above. I run that sdk manager and install the offending build tools version accepting the license.
I go back to Android studio and click rebuild project, nothing I mean literally nothing happens, clean, nothing, make, nothing! Nothing at all! I close AS and restart it (as administrator), exact same issue. This new issue really gives me very little to work with as there is no feed back at all. I'm beginning to regret upgrading AS as it is holding me back from coding now.
I have two questions:
1) Can anyone see a possible way out of my immediate problem and how to get my project at least attempting to build again and get at least as far as just compile errors.
2) Am I right in thinking that current version of AS is far from an out of the box experience even for the common default activities (build Android java project) and has a variety of unexpected anomolies OR a lot of settings whose defaults may very likely not be useful and need manually resetting? IF SO... Is it therefore recommended I do a couple of days reading maybe about the structure of "specifically" AS and it's dependant components and how to set them up and use them effectively? IF SO... what documents would one recommend, so as to make the most efficient use of time.
Apologies if this is not well formed. Hoping for some help.
Thanks.
@hardya
I have AS installed on linux so I can't help you much with windows. I can tell you that AS 3.3 works great and is much better than 1.0. Mind you, I've been using AS since it was in beta.
Try to create a new project. If the new project is created and builds without error, then you know AS is working correctly.
If the above doesn't work then I recommend you do a full uninstall of AS and then do a fresh install as follows.
Follow this AS uninstall guide:
https://stackoverflow.com/a/39953746
Then follow this guide to install AS:
https://developer.android.com/studio/install
Then try a new project as mentioned above. If the new project goes well, then you can proceed to import the project you was working on originally.
Thank you. I think there are possibly issues with this upgrade path. It was supposed to have uninstalled completely (said it was doing so) and installed 3.3 afresh. However when you open "AS" itself it opens with the existing project in place. It is not until you close that project that it suddenly closes AS, reopens AS and enters the first startup wizard to complete the remainder of the installation / configuration.
I think I am a step further on since then.
Thanks

Help with Android Studio

Hi all.
I turn to you because I am really desperate.
A few years ago I decided to make a video game with the RPG Maker MV program. After finishing it, I decided to make a version for Android.
It should be noted that I am not a programmer nor do I want to publish my game, it was just for me and my friends to play.
The fact is that, after many attempts, in the end, based on trial and error, I managed to make the Android version with Android Studio.
From time to time, I have been correcting an error or bug that has appeared in my game and, to do so, I would redo the entire Android Studio thing. Once the apk was created, I downloaded it to my mobile phone, clicked on it and a message appeared saying "Do you want to install this update? No data will be lost". I gave him to accept, he settled in and everything went great.
However, yesterday, wanting to release a new update, I updated Android Studio. Initially there was no significant change. The apk was created without any problem, I downloaded it and when I clicked on it, it asked me the usual question. However, while the installation bar was filling up, a message appeared: “Application not installed. There is a conflict between the package and another package with the same name."
I've been reading somewhere that this is because I changed a signature of something, but as I said, I'm not a programmer. I have done this update as I did the others, exactly the same, so I don't know the reason. It's probably silly to change a word somewhere, but again, I'm not a programmer and would need someone to help me step by step.
If needed, I can describe step by step how I do the updated apk, if that helps.
Many thanks to all!

Categories

Resources