Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
[ID: 558956]
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Build #AI-162.3934792, built on April 21, 2017
JRE: 1.8.0_112-release-b06 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Version of Gradle Plugin: 2.3.2
Version of Gradle: 3.3
OS: Ubuntu 16.10
Steps to Reproduce:
1. Create a new project from the new-project wizard, accepting all defaults except opting out of appcompat-v7
2. Update your app/build.gradle to use Android O:
android {
compileSdkVersion 'android-O'
buildToolsVersion "26.0.0-rc2"
defaultConfig {
applicationId "com.commonsware.myapplication"
minSdkVersion 'O'
targetSdkVersion 'O'
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
(notably, change the compileSdkVersion, buildToolsVersion, minSdkVersion, and targetSdkVersion as shown above)
3. Replace your MainActivity with this implementation:
import android.app.Activity;
import android.os.Bundle;
import android.service.autofill.AutofillService;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
AutofillService foo=getSystemService(AutofillService.class);
}
}
4. Notice that Android Studio complains that it cannot recognize android.service.autofill.AutofillService
5. Run the project on an ODP2-equipped environment, such as a Nexus 5X, and see that the app builds and runs just fine
Expected Results: Android Studio 2.3.2 should recognize the symbols in the platforms/android-O/android.jar file when the ODP2 SDK bits have been installed via the SDK Manager
Actual Results: While the builds uses the correct JAR (which is why the app builds and runs), Android Studio 2.3.2 complains about the missing classes, despite the fact that they are not missing. In this specific case, what ODP1 called AutoFillService (capital F) has changed to AutofillService (lowercase f) in ODP2.
FWIW, a buildToolsVersion of 25.0.3 yields the same result.