Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70765

Barcode scanner android build error: compileSdkVersion is not specified

$
0
0

@GuZzie wrote:

Hey All,

In my project I want to add the native barcode scanner plugin.
After adding the plugin my project android build stops working.

I am running this on macOS Sierra

It throws the following error when running: ionic cordova build android

java.lang.IllegalStateException: compileSdkVersion is not specified.

	at com.google.common.base.Preconditions.checkState(Preconditions.java:456)

	at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:590)
	at com.android.build.gradle.BasePlugin.lambda$null$3(BasePlugin.java:555)
	at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
	at com.android.build.gradle.BasePlugin.lambda$createTasks$4(BasePlugin.java:551)

The result of ionic info

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.6
    Cordova Platforms  : android 7.0.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    ios-deploy        : 1.9.2
    Node              : v6.11.4
    npm               : 3.10.10
    OS                : macOS Sierra
    Xcode             : Xcode 9.2 Build version 9C40b

Environment Variables:

    ANDROID_HOME : /Users/username/Library/Android/sdk

Misc:

    backend : pro

My JAVA_HOME is set to
/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home

In android studio I installed the following SDK

And tools

When removing the plugin, the project builds succesfully.

I tried to set the defaultCompileSdkVersion to 27 in file build.gradle and search throughout the platform folder to set the CompileSdkVersion.

I do not fully understand why this error is thrown.

Can you point me in the right direction to solve this problem.

Your help is greatly appreciated.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70765

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>