14 Commits

Author SHA1 Message Date
github-actions
cd1e573c09 Merge remote-tracking branch 'origin/main' 2022-07-13 13:42:38 +00:00
gfan
f1f712aef5 Doc fix for issue #845 2022-07-13 06:42:01 -07:00
github-actions
c01b3baace Merge remote-tracking branch 'origin/main' 2022-04-13 13:16:12 +00:00
Tony Guo
7a8ff4c552 Correct the matrix used in Display P3 XYZ <-> RGB conversion (#839)
Use P3 (D65) XYZ <-> RGB conversion matrix in display-p3
sample instead of the one currently being used, which is
for P3 (DCI) XYZ <-> RGB conversion.

BTW, all the matrices in display-p3 sample are updated to
high precision floats (rounded to 10 decimal digits).

 Author:    Tony Guo <tony.guo.peng@gmail.com>
 Date:      Mon Mar 21 12:39:34 2022 +0800
2022-04-13 06:15:48 -07:00
github-actions
3bc7eaebcf Merge remote-tracking branch 'origin/main' 2022-02-22 19:48:28 +00:00
冯裴添
82d1af2cc4 Workaround permission issue when loading NNAPI model from asset file. (#804) (#827)
Co-authored-by: Kottsone <xusongw@google.com>
Co-authored-by: github-actions <github-actions@github.com>
2022-02-22 11:48:04 -08:00
github-actions
24dd0ed20f Merge remote-tracking branch 'origin/main' 2022-01-21 07:01:53 +00:00
Dan Albert
f4574a3526 Use latest packages from ndkports. (#826) 2022-01-20 23:01:31 -08:00
github-actions
159af39c36 Merge remote-tracking branch 'origin/main' 2022-01-18 19:13:52 +00:00
Sheik Zayed
8f97b4f424 Update README.md (#820)
Typo in the readme file.
2022-01-18 11:13:27 -08:00
Kottsone
8a6c06f891 Workaround permission issue when loading NNAPI model from asset file. (#804) 2021-07-07 13:54:27 -07:00
Gerry
fa2ac546af Retire jcenter() in samples (#803) 2021-06-28 21:13:09 -07:00
markthompson
8eb1304845 removed soon to be deprecated jcenter() repo, replaced with mavenCentral() (#800) 2021-06-28 14:52:58 -07:00
Gerry
cc9ee538a8 adding screenshot for native-codec, native-media and native-plasma (#799) 2021-05-24 10:56:07 -07:00
100 changed files with 215 additions and 183 deletions

View File

@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId 'com.google.sample.echo'

View File

@@ -3,7 +3,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -16,6 +16,6 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig.with {
applicationId 'com.example.plasma'

View File

@@ -2,7 +2,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -12,6 +12,6 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -1,7 +1,8 @@
apply plugin: 'java'
repositories {
jcenter()
google()
mavenCentral()
}
dependencies {

View File

@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId 'com.sample.camera.basic'

View File

@@ -2,7 +2,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -12,6 +12,6 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId "com.sample.textureview"

View File

@@ -2,7 +2,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -12,7 +12,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId = 'com.example.widecolor'

View File

@@ -50,7 +50,7 @@ static void CreateGammaEncodeTable(float gamma, std::vector<uint8_t>& table) {
}
}
/*
* CreateGammaEncodeTable()
* CreateGammaDecodeTable()
* Retrieve linear RGB data
* Linear = sRGB / 12.92 0 <= sRGB < 0.04045
* pow((sRGB + 0.055)/1.055, gamma)
@@ -228,26 +228,26 @@ static mathfu::mat3 defaultNPMs[] = {
* Algorithms and Interfaces
* Charles Poynton
*/
mathfu::mat3(0.412453f, 0.212671f, 0.019334f,
0.357580f, 0.715160f, 0.119193f,
0.180423f, 0.072169f, 0.950227f),
mathfu::mat3(0.4123908281f, 0.2126390338f, 0.0193308201f,
0.3575843275f, 0.7151686549f, 0.1191947237f,
0.1804807931f, 0.0721923113f, 0.9505321383f),
// XYZ --> SRGB white reference point D65
mathfu::mat3( 3.240479f, -0.969256f, 0.055648f,
-1.537150f, 1.875992f, -0.204043f,
-0.498535f, 0.041556f, 1.057311f),
mathfu::mat3( 3.2409696579f, -0.9692436457f, 0.0556300320f,
-1.5373830795f, 1.8759675026f, -0.2039768547f,
-0.4986107349f, 0.0415550880f, 1.0569714308f),
/* P3 --> XYZ, white reference point D65
* SMTP EG 432-1:2010, p23
*/
mathfu::mat3(0.4551698156f, 0.2094916779f, 0.000000000f,
0.2771344092f, 0.7215952542f, 0.0470605601f,
0.1722826698f, 0.0689130679f, 0.9073553944f),
* SMTP EG 432-1:2010, p23
*/
mathfu::mat3(0.4865709245f, 0.2289745510f, 0.0000000000f,
0.2656676769f, 0.6917385459f, 0.0451133996f,
0.1982172877f, 0.0792869106f, 1.0439443588f),
/*
* CIE XYZ --> Display P3, white reference point D65. Source
* SMTP EG 432-1:2010, p24
*/
mathfu::mat3(2.7253940305f, -0.7951680258f, 0.0412418914f,
-1.0180030062f, 1.6897320548f, -0.0876390192f,
-0.4401631952f, 0.0226471906f, 1.1009293786f),
mathfu::mat3( 2.4934973717f, -0.8294889927f, 0.0358458459f,
-0.9313836098f, 1.7626641989f, -0.0761724263f,
-0.4027108550f, 0.0236246940f, 0.9568846226f),
};
const mathfu::mat3* GetTransformNPM(NPM_TYPE type) {
ASSERT(type < NPM_TYPE::TYPE_COUNT, "NPM_TYPE (%d) out of bounds", type);

View File

@@ -18,7 +18,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId 'com.google.sample.tunnel'

View File

@@ -2,7 +2,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -12,6 +12,6 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -6,7 +6,7 @@ def platformVersion = 24 // openGLES 3.2 min api level
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId 'com.android.gles3jni'

View File

@@ -2,7 +2,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -12,6 +12,6 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId 'com.android.gl2jni'

View File

@@ -2,7 +2,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -12,6 +12,6 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -7,7 +7,7 @@ For how to use Android Studio, refer to [Hello-CMake codelab](https://codelabs.d
Pre-requisites
--------------
- Android Studio 2.2+ with [NDK](https://developer.android.com/ndk/) bundle.
- Android Studio 4.2+ with [NDK](https://developer.android.com/ndk/) bundle.
Getting Started
---------------
@@ -16,7 +16,7 @@ Getting Started
1. Open the sample directory.
1. Open *File/Project Structure...*
- Click *Download* or *Select NDK location*.
1. Click *Tools/Android/Sync Project with Gradle Files*.
1. Click *File/Sync Project with Gradle Files*.
1. Click *Run/Run 'app'*.
Screenshots
@@ -35,7 +35,7 @@ submitting a pull request through GitHub. Please see [CONTRIBUTING.md](../CONTRI
License
-------
Copyright 2015 Google, Inc.
Copyright 2022 Google, Inc.
Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for

View File

@@ -4,7 +4,7 @@ apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId 'com.example.hellojni'

View File

@@ -4,7 +4,7 @@ buildscript {
ext.kotlin_version = '1.3.72'
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -18,7 +18,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -1,6 +1,6 @@
Hello JNI Callback
==================
This sample is an Aadd-on to Hello JNI sample to demonstrate calling back to Java from C code
This sample is an add-on to Hello JNI sample to demonstrate calling back to Java from C code
- create a java class instance from C code
- call java class static and non-static member functions

View File

@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId 'com.example.hellojnicallback'

View File

@@ -3,7 +3,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -16,7 +16,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId = 'com.example.hellolibs'

View File

@@ -3,7 +3,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -16,7 +16,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
minSdkVersion 14

View File

@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId "com.example.helloneon"

View File

@@ -3,7 +3,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -16,7 +16,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -6,7 +6,7 @@ apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId "com.google.example.hellooboe"

View File

@@ -4,7 +4,7 @@ buildscript {
ext.kotlin_version = '1.3.72'
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
@@ -18,7 +18,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId = 'com.example.native_activity'

View File

@@ -2,7 +2,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -12,7 +12,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId 'com.example.nativeaudio'

View File

@@ -2,7 +2,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -12,6 +12,6 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId 'com.example.nativecodec'

View File

@@ -2,7 +2,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -12,6 +12,6 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

BIN
native-codec/screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View File

@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId 'com.example.nativemedia'

View File

@@ -2,7 +2,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -12,6 +12,6 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

BIN
native-media/screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

View File

@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId "com.example.nativemidi"

View File

@@ -3,7 +3,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
@@ -17,7 +17,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId 'com.example.native_plasma'

View File

@@ -2,7 +2,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -12,6 +12,6 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 KiB

View File

@@ -5,7 +5,7 @@ apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 30
buildToolsVersion '30.0.0'
ndkVersion '21.3.6528147'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId "com.example.android.basic"

View File

@@ -44,15 +44,8 @@ Java_com_example_android_basic_MainActivity_initModel(
return 0;
}
env->ReleaseStringUTFChars(_assetName, assetName);
off_t offset, length;
int fd = AAsset_openFileDescriptor(asset, &offset, &length);
SimpleModel* nn_model = new SimpleModel(asset);
AAsset_close(asset);
if (fd < 0) {
__android_log_print(ANDROID_LOG_ERROR, LOG_TAG,
"Failed to open the model_data file descriptor.");
return 0;
}
SimpleModel* nn_model = new SimpleModel(length, PROT_READ, fd, offset);
if (!nn_model->CreateCompiledModel()) {
__android_log_print(ANDROID_LOG_ERROR, LOG_TAG,
"Failed to prepare the model.");

View File

@@ -15,44 +15,84 @@
*/
#include "simple_model.h"
#include <android/asset_manager_jni.h>
#include <android/log.h>
#include <android/sharedmem.h>
#include <sys/mman.h>
#include <string>
#include <unistd.h>
namespace {
// Create ANeuralNetworksMemory from an asset file.
//
// Note that, at API level 30 or earlier, the NNAPI drivers may not have the permission to
// access the asset file. To work around this issue, here we will:
// 1. Allocate a large-enough shared memory to hold the model data;
// 2. Copy the asset file to the shared memory;
// 3. Create the NNAPI memory with the file descriptor of the shared memory.
ANeuralNetworksMemory *createMemoryFromAsset(AAsset *asset) {
// Allocate a large-enough shared memory to hold the model data.
off_t length = AAsset_getLength(asset);
int fd = ASharedMemory_create("model_data", length);
if (fd < 0) {
__android_log_print(ANDROID_LOG_ERROR, LOG_TAG,
"ASharedMemory_create failed with size %d", length);
return nullptr;
}
// Copy the asset file to the shared memory.
void *data = mmap(nullptr, length, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
if (data == nullptr) {
__android_log_print(ANDROID_LOG_ERROR, LOG_TAG, "Failed to map a shared memory");
close(fd);
return nullptr;
}
AAsset_read(asset, data, length);
munmap(data, length);
// Create the NNAPI memory with the file descriptor of the shared memory.
ANeuralNetworksMemory *memory;
int status = ANeuralNetworksMemory_createFromFd(length, PROT_READ | PROT_WRITE, fd, 0,
&memory);
// It is safe to close the file descriptor here because ANeuralNetworksMemory_createFromFd
// will create a dup.
close(fd);
if (status != ANEURALNETWORKS_NO_ERROR) {
__android_log_print(ANDROID_LOG_ERROR, LOG_TAG,
"ANeuralNetworksMemory_createFromFd failed for trained weights");
return nullptr;
}
return memory;
}
} // namespace
/**
* SimpleModel Constructor.
*
* Initialize the member variables, including the shared memory objects.
*/
SimpleModel::SimpleModel(size_t size, int protect, int fd, size_t offset) :
SimpleModel::SimpleModel(AAsset *asset) :
model_(nullptr),
compilation_(nullptr),
dimLength_(TENSOR_SIZE),
offset_(offset),
modelDataFd_(fd) {
dimLength_(TENSOR_SIZE) {
tensorSize_ = dimLength_;
inputTensor1_.resize(tensorSize_);
// Create ANeuralNetworksMemory from a file containing the trained data.
int32_t status = ANeuralNetworksMemory_createFromFd(size + offset, protect, fd, 0,
&memoryModel_);
if (status != ANEURALNETWORKS_NO_ERROR) {
__android_log_print(ANDROID_LOG_ERROR, LOG_TAG,
"ANeuralNetworksMemory_createFromFd failed for trained weights");
return;
}
memoryModel_ = createMemoryFromAsset(asset);
// Create ASharedMemory to hold the data for the second input tensor and output output tensor.
inputTensor2Fd_ = ASharedMemory_create("input2", tensorSize_ * sizeof(float));
outputTensorFd_ = ASharedMemory_create("output", tensorSize_ * sizeof(float));
// Create ANeuralNetworksMemory objects from the corresponding ASharedMemory objects.
status = ANeuralNetworksMemory_createFromFd(tensorSize_ * sizeof(float),
PROT_READ,
inputTensor2Fd_, 0,
&memoryInput2_);
int status = ANeuralNetworksMemory_createFromFd(tensorSize_ * sizeof(float),
PROT_READ,
inputTensor2Fd_, 0,
&memoryInput2_);
if (status != ANEURALNETWORKS_NO_ERROR) {
__android_log_print(ANDROID_LOG_ERROR, LOG_TAG,
"ANeuralNetworksMemory_createFromFd failed for Input2");
@@ -179,7 +219,7 @@ bool SimpleModel::CreateCompiledModel() {
status = ANeuralNetworksModel_setOperandValueFromMemory(model_,
tensor0,
memoryModel_,
offset_,
0,
tensorSize_ * sizeof(float));
if (status != ANEURALNETWORKS_NO_ERROR) {
__android_log_print(ANDROID_LOG_ERROR, LOG_TAG,
@@ -210,7 +250,7 @@ bool SimpleModel::CreateCompiledModel() {
return false;
}
status = ANeuralNetworksModel_setOperandValueFromMemory(
model_, tensor2, memoryModel_, offset_ + tensorSize_ * sizeof(float),
model_, tensor2, memoryModel_, tensorSize_ * sizeof(float),
tensorSize_ * sizeof(float));
if (status != ANEURALNETWORKS_NO_ERROR) {
__android_log_print(ANDROID_LOG_ERROR, LOG_TAG,
@@ -504,5 +544,4 @@ SimpleModel::~SimpleModel() {
ANeuralNetworksMemory_free(memoryOutput_);
close(inputTensor2Fd_);
close(outputTensorFd_);
close(modelDataFd_);
}

View File

@@ -17,6 +17,7 @@
#ifndef NNAPI_SIMPLE_MODEL_H
#define NNAPI_SIMPLE_MODEL_H
#include <android/asset_manager_jni.h>
#include <android/NeuralNetworks.h>
#include <vector>
@@ -38,7 +39,7 @@
*/
class SimpleModel {
public:
explicit SimpleModel(size_t size, int protect, int fd, size_t offset);
explicit SimpleModel(AAsset* asset);
~SimpleModel();
bool CreateCompiledModel();
@@ -53,10 +54,8 @@ private:
uint32_t dimLength_;
uint32_t tensorSize_;
size_t offset_;
std::vector<float> inputTensor1_;
int modelDataFd_;
int inputTensor2Fd_;
int outputTensorFd_;
};

View File

@@ -4,7 +4,7 @@ buildscript {
ext.kotlin_version = '1.3.72'
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -18,7 +18,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -3,7 +3,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 30
buildToolsVersion '30.0.0'
ndkVersion '21.3.6528147'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId "com.example.android.sequence"

View File

@@ -6,7 +6,7 @@ def REMOTE_PROJ_ROOT = '../../../../' + rootProject.getName() + '/' +
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId "com.example.plasma"

View File

@@ -2,7 +2,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -12,6 +12,6 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -13,7 +13,7 @@ def REMOTE_SRC_ROOT = '../../../../' + rootProject.getName() + '/' +
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId 'com.android.gles3jni'

View File

@@ -2,7 +2,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -12,6 +12,6 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -5,7 +5,7 @@ def REMOTE_SRC_ROOT = '../../../../' + rootProject.getName() + '/' +
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId 'com.android.gl2jni'

View File

@@ -2,7 +2,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -12,6 +12,6 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -7,7 +7,7 @@ def REMOTE_PROJ_ROOT = '../../../../' + rootProject.getName() + '/' +
project.getName() + '/src/main'
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId "com.example.hellojni"

View File

@@ -3,7 +3,7 @@ buildscript {
ext.kotlin_version = '1.3.72'
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -14,7 +14,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -10,7 +10,7 @@ def REMOTE_SRC_ROOT = '../../../../' + rootProject.getName() + '/' +
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId = 'com.example.hellolibs'

View File

@@ -3,7 +3,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -16,7 +16,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -5,7 +5,7 @@ def REMOTE_SRC_ROOT = '../../../../' + rootProject.getName() + '/' +
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId "com.example.helloneon"

View File

@@ -2,7 +2,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -12,6 +12,6 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -6,7 +6,7 @@ def REMOTE_SRC_ROOT = '../../../../' + rootProject.getName() + '/' +
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId = 'com.example.native_activity'

View File

@@ -2,7 +2,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -12,6 +12,6 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -5,7 +5,7 @@ def REMOTE_SRC_ROOT = '../../../../' + rootProject.getName() + '/' +
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId 'com.example.nativeaudio'

View File

@@ -2,7 +2,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -12,6 +12,6 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -6,7 +6,7 @@ def REMOTE_SRC_ROOT = '../../../../' + rootProject.getName() + '/' +
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId 'com.example.nativecodec'

View File

@@ -2,7 +2,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -12,6 +12,6 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -5,7 +5,7 @@ def REMOTE_SRC_ROOT = '../../../../' + rootProject.getName() + '/' +
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId 'com.example.nativemedia'

View File

@@ -2,7 +2,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -12,6 +12,6 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -6,7 +6,7 @@ def REMOTE_SRC_ROOT = '../../../../' + rootProject.getName() + '/' +
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId 'com.example.native_plasma'

View File

@@ -2,7 +2,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -12,6 +12,6 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -8,7 +8,7 @@ def REMOTE_SRC_ROOT = '../../../../' + rootProject.getName() + '/' +
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId "com.example.android.basic"

View File

@@ -3,7 +3,7 @@ buildscript {
ext.kotlin_version = '1.3.72'
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -14,6 +14,6 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -11,7 +11,7 @@ ext.versionCodes = ['armeabi-v7a':1, 'arm64-v8a':2, 'x86':3]
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId 'com.example.SanAngeles'

View File

@@ -2,7 +2,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -12,6 +12,6 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -2,7 +2,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -12,6 +12,6 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -6,7 +6,7 @@ def REMOTE_SRC_ROOT = '../../../../' + rootProject.getName() + '/' +
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId "com.sample.teapot"

View File

@@ -6,7 +6,7 @@ def REMOTE_SRC_ROOT = '../../../../' + rootProject.getName() + '/' +
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId "com.sample.moreteapots"

View File

@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId "com.example.twolibs"

View File

@@ -2,7 +2,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -12,6 +12,6 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -22,7 +22,7 @@ plugins {
android {
compileSdkVersion 30
ndkVersion '21.3.6528147'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId "com.example.curlssl"
minSdkVersion 21
@@ -65,7 +65,7 @@ dependencies {
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:30.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation "com.android.ndk.thirdparty:curl:7.69.1-alpha-1"
implementation "com.android.ndk.thirdparty:jsoncpp:1.8.4-alpha-1"
implementation "com.android.ndk.thirdparty:openssl:1.1.1g-alpha-1"
implementation "com.android.ndk.thirdparty:curl:7.79.1-beta-1"
implementation "com.android.ndk.thirdparty:jsoncpp:1.9.5-beta-1"
implementation "com.android.ndk.thirdparty:openssl:1.1.1l-beta-1"
}

View File

@@ -18,7 +18,7 @@ buildscript {
ext.kotlin_version = '1.3.61'
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -29,7 +29,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -29,7 +29,7 @@ android {
applicationId "com.example.com.example.prefabdependency"
minSdkVersion 21
targetSdkVersion 30
ndkVersion "21.3.6528147"
ndkVersion '22.1.7171670'
versionCode 1
versionName "1.0"

View File

@@ -18,7 +18,7 @@ buildscript {
ext.kotlin_version = '1.3.61'
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -29,7 +29,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -17,7 +17,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -27,7 +27,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -20,7 +20,7 @@ plugins {
android {
compileSdkVersion 30
ndkVersion '21.3.6528147'
ndkVersion '22.1.7171670'
defaultConfig {
minSdkVersion 16

View File

@@ -7,7 +7,7 @@ ext.versionCodes = ['armeabi-v7a':1, 'arm64-v8a':2, 'mips':3, 'x86':4]
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId 'com.example.SanAngeles'

View File

@@ -2,7 +2,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -12,6 +12,6 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId 'com.android.accelerometergraph'

View File

@@ -2,7 +2,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -12,6 +12,6 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -2,7 +2,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -12,6 +12,6 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -3,7 +3,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 30
buildToolsVersion '30.0.0'
ndkVersion '21.3.6528147'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId 'com.sample.choreographer'

View File

@@ -3,7 +3,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 30
buildToolsVersion '30.0.0'
ndkVersion '21.3.6528147'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId = 'com.sample.teapot'

View File

@@ -3,7 +3,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 30
buildToolsVersion '30.0.0'
ndkVersion '21.3.6528147'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId = 'com.sample.imagedecoder'

View File

@@ -4,7 +4,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 30
buildToolsVersion '30.0.0'
ndkVersion '21.3.6528147'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId 'com.sample.moreteapots'

View File

@@ -3,7 +3,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 30
buildToolsVersion '30.0.0'
ndkVersion '21.3.6528147'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId = 'com.sample.texturedteapot'

View File

@@ -2,7 +2,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
@@ -12,6 +12,6 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 29
ndkVersion '21.2.6472646'
ndkVersion '22.1.7171670'
defaultConfig {
applicationId 'com.example.webp_view'