codelab-mlkit-android icon indicating copy to clipboard operation
codelab-mlkit-android copied to clipboard

Can't get the Vision final or starter code to build

Open IanRock542 opened this issue 1 year ago • 0 comments

Android Studio Version: Android Studio Giraffe | 2022.3.1 Patch 1 OS: Mac OS Ventura 13.5.1

I'm quite new to Android dev, so I genuinely don't know what's going on here.

I haven't changed anything after downloading the code and opening it in Android Studio, but I keep getting these errors in the starter code: Cannot resolve constructor 'ArrayAdapter(MainActivity, int, String[])' Cannot resolve method 'getApplicationContext' in 'MainActivity' Cannot resolve method 'getAssets' in 'MainActivity'

for lines 107 ArrayAdapter<String> adapter = new ArrayAdapter<>(this, simple_spinner_dropdown_item, items); 129 Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show(); 216 AssetManager assetManager = context.getAssets();

In the final code, I'm getting build errors for Gradle. > Task :app:checkDebugManifest FAILED > Task :app:createDebugCompatibleScreenManifests FAILED > Task :app:compileDebugShaders FAILED > Task :app:signingConfigWriterDebug FAILED > Task :app:transformNativeLibsWithMergeJniLibsForDebug FAILED

IanRock542 avatar Aug 31 '23 22:08 IanRock542