Update your Android app to the latest Android M

I would like to know how best to update an existing project to the latest Android version for testing. Is there a better way than my current approach?

Here is what I am doing based on this Preview SDK

  • Android Studio update.
  • Download SDK.
  • Update build.gradle to MNC.

So AS (android studio) told me that I need to upgrade java to 1.7 because of diamond operator is not supported in source 1.6

. Then some of my classes in the project reported Package xxx does not exist

. Does msg cause error on API updates? If so, this might give me a clue and I will find the appropriate API in android M to fix it.

for example, the following error only happened after updates.

Error:(43, 23) error: package org.apache.http does not exist

I know there is a document for API changes, but I want to ask you, is this the usual way to update an API to the latest version?

+3


source to share


1 answer


Does msg cause error on API updates?

If you mean:

Error:(43, 23) error: package org.apache.http does not exist

      

then yes, it was caused by an API update as the HttpClient APIs were removed in Android M after being deprecated in Android 5.1.



if this is the normal way to update the API to the latest version?

Ok, after reading the documentation before doing any of your above steps, it is a very good idea.

Developer preview is also different from regular OS releases as you don't have to submit apps compiled against preview.

Otherwise, what you are describing is definitely a starting point. What changes you want to make (for example, for a new permission system ) will depend on the nature of your application.

+4


source







All Articles