From ab7163158b7268ec7eb40c0e3ee0942ca0e442f6 Mon Sep 17 00:00:00 2001 From: hubin <hubin@3mang.com> Date: Wed, 16 Jan 2019 23:01:56 +0800 Subject: [PATCH] compile ok with android studio --- build.gradle | 60 +++++++++++++++++++++++++++++++++++++++++++++++------------- src/main/AndroidManifest.xml | 7 +++++++ 2 files changed, 54 insertions(+), 13 deletions(-) diff --git a/build.gradle b/build.gradle index 5b8e731..ebbf7f0 100644 --- a/build.gradle +++ b/build.gradle @@ -1,16 +1,34 @@ -buildDir "${topobjdir}/gradle/build/mobile/android/geckoview_example" +buildscript { -apply plugin: 'com.android.application' + repositories { + google() + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:3.1.3' + + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + google() + jcenter() + } +} -apply from: "${topsrcdir}/mobile/android/gradle/product_flavors.gradle" +apply plugin: 'com.android.application' android { - compileSdkVersion project.ext.compileSdkVersion + compileSdkVersion 27 defaultConfig { - targetSdkVersion project.ext.targetSdkVersion - minSdkVersion project.ext.minSdkVersion - manifestPlaceholders = project.ext.manifestPlaceholders + targetSdkVersion 27 + minSdkVersion 21 + // manifestPlaceholders = project.ext.manifestPlaceholders applicationId "org.mozilla.geckoview_example" versionCode 1 @@ -29,13 +47,29 @@ android { } } - project.configureProductFlavors.delegate = it - project.configureProductFlavors() -} + flavorDimensions "abi" + productFlavors { + arm { dimension "abi" } + // aarch64 { dimension "abi" } + } +} +repositories { + maven { + url "https://maven.mozilla.org/maven2/" + } +} +ext { + geckoviewChannel = "nightly" + // geckoviewVersion = "64.0.20180927100037" + // geckoviewVersion = "66.0.20181231091417" + geckoviewVersion = "66.0.20190116093310" +} dependencies { - implementation "com.android.support:support-annotations:$support_library_version" - implementation "com.android.support:appcompat-v7:$support_library_version" + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation 'com.android.support:appcompat-v7:27.1.1' + implementation 'com.android.support.constraint:constraint-layout:1.1.3' - implementation project(path: ':geckoview') + armImplementation "org.mozilla.geckoview:geckoview-${geckoviewChannel}-armeabi-v7a:${geckoviewVersion}" + // aarch64Implementation "org.mozilla.geckoview:geckoview-${geckoviewChannel}-arm64-v8a:${geckoviewVersion}" } diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index 4b81582..bae9ea0 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -8,6 +8,13 @@ <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> <uses-permission android:name="android.permission.RECORD_AUDIO"/> <uses-permission android:name="android.permission.CAMERA"/> + <uses-permission android:name ="android.permission.MODIFY_AUDIO_SETTINGS"/> + <uses-feature android:name="android.hardware.camera" /> + <uses-feature android:name="android.hardware.camera.autofocus" /> + <uses-feature android:name="android.hardware.camera2.full" /> + <uses-feature android:name="android.hardware.camera2.autofocus" /> + <uses-permission android:name="android.permission.INTERNET" /> + <uses-permission android:name="android.webkit.PermissionRequest" /> <application android:allowBackup="true" -- libgit2 0.24.0