Comments (10)
I noticed that too, I wondered why I had to download API 21 when the "targetSdkVersion 19" . I think the 21 is coming from compileSdkVersion = 'Google Inc.:Google APIs:21'. I let Android Studio build it that way, it works, but we shouldn't need that. International teams may not be able to use the ZTE Speed phones so their set up could be different, but I think it Android 4.4 is still recommended.
I think we'll want to set compileSdkVersion to 19 based on:
http://stackoverflow.com/questions/26694108/what-is-the-difference-between-compilesdkversion-and-targetsdkversion
I tried this and was able to get it to run. I changed compileSdkVersion = 'Google Inc.:Google APIs:19' and also set minSdkVersion 19.
File at: https://github.com/acharraggi/ftc_app/blob/master/FtcRobotController/build.gradle
Seems to work ok, I've got the driver and robot apps running on the ZTE phones (but with no other hardware yet).
from ftc_app.
Can you make a pull request so everyone gets an updated copy? Thanks!
from ftc_app.
@acharraggi While I agree with you on the topic of European users having differences in hardware, I disagree on your judgement that we should downgrade to API 19. The target SDK has no effect on the software or the phones that it runs on. All that is saying is that this is the API we tested it the most and where it is guaranteed to work. This is used in the Android app store to determine which phone cannot run the software / what version the app is optimized for.
By using the latest API we can get access to newer features only available in that version (ie Better multithreading). Android has automatic backwards compatibility so even if the phone is running API 19 it can still use the application.
Sources
- https://developer.android.com/training/basics/firstapp/creating-project.html
- I'm an Android developer
from ftc_app.
I have to agree with @agileconnor; leaving the compileSdkVersion at 21 will allow the app to build on devices running Lolipop (Android 5.0). I have built the app for Lolipop on my OnePlus and I didn't have any build errors. I might need to change the targetSdkVersion to do a true test of sdk21/Lolipop for this app (maybe?).
In addition, the .iml file here probably shouldn't have been included in the repository to begin with, since I believe that is a file regenerated at build.
from ftc_app.
If this was a general purpose Android app, then the highest API level possible would be best. And perhaps ftctech should leave it as is since this is an example we can all use and some will deploy to newer versions.
But once you copy this app, you are going to customize it for your robot and it's only going to run on your robot controller phone and that will have a specific API level. That app will not run on an earlier API or a later API, it's only running on one phone.
If you leave compileSdkVersion at 21 but you're phone's API is 19, you can possibly include calls to features not supported. eg. Sensor.TYPE_HEART_RATE requires API level 20, it's flagged as 'field requires API level 20 (current min is 19)' when the min is 19 and compileSdkVersion is 21. You're allowed to build it even though it won't do what you want. Change compileSdkVersion to 19 however and you get a 'cannot resolve symbol' error. Also, Android Studio helps with auto-complete based on the compileSdkVersion so you don't even see TYPE_HEART_RATE as an option to pick from.
Why not let the compiler flag newer stuff that won't work on your phone?
I'm not sure we need to change compileSdkVersion at source. But I do think each team should set compileSdkVersion to match their phones after they copy the software. I think now I would recommend "build instructions" in the README mention some recommendation or suggestions. And that may come as part of User manual that the README says is forthcoming.
from ftc_app.
@JacobAMason: I agree, FtcRobotController.iml could be removed from the repository.
I confirmed that FtcRobotController.iml will be rebuilt if you start with a clean directory and that IML deleted and then open that directory with "Open an existing Android Studio project".
The build process populates the API version in the IML file. If you also change build.gradle prior to the build to set compileSdkVersion to 19 you get Android 4.4.2 in the IML file, instead of the 5.0.1 reference.
from ftc_app.
The FtcRobotController.iml is an IntelliJ module file and should not be part of the repository
from ftc_app.
You closed the issue but you did not remove the FtcRobotController.iml
Do you feel is still necessary?
from ftc_app.
That seems like a different issue. I was originally only referring to FtcRobotController/build.gradle, although I agree removing FtcRobotController.iml is a good idea.
from ftc_app.
Yeah...I think the topic was hijacked :-)
On Sat, Aug 15, 2015 at 4:51 PM, Caleb Sander [email protected]
wrote:
That seems like a different issue. I was originally only referring to
FtcRobotController/build.gradle, although I agree removing
FtcRobotController.iml is a good idea.—
Reply to this email directly or view it on GitHub
#1 (comment).
from ftc_app.
Related Issues (20)
- Hardware remains powered on app restart HOT 6
- Incorrect motor configuration data HOT 6
- How to send data through i2c? trying to communicate with Pixy2 camera HOT 3
- OnBot SDK is different than Android Studio SDK HOT 13
- v5.0 SDK Available HOT 4
- no link to 5.0 HOT 1
- Robot Controller Does not See Rev Expansion Hub
- BUG: OnBot Java overwrites files HOT 19
- Robot Controller does not detect more than 1 device HOT 6
- Pairing and troubleshooting instructions absent HOT 1
- OnBotJava loses Intellisense HOT 1
- Error in code is pointing to non existent source files HOT 4
- Op mode stuck in the init (HELP) how do we get rid of this message HOT 1
- I can't press the Init Button HOT 8
- RC stuck in initialization w/ warning contains RUN_TO_POSITION HOT 3
- Robot Controller Will Not Connect To REV Expansion Hub HOT 8
- Webcam Consistently Crashing on Init HOT 11
- Wiki update: no instant run in AS v. 3.5 or higher HOT 2
- LynxModule retransmitting happens randomly in autonomous run, block TeamCode from execution half second to 2 seconds. HOT 4
- Driver for Grove AS5600 magnetic rotary position sensor HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ftc_app.