第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

ndk的build.gradle出錯(cuò)

老師,為什么最后在module/build.gradle中編譯了之后,native的sayhello方法還是報(bào)錯(cuò)沒(méi)有關(guān)聯(lián)頭文件,用的as3.0.0

正在回答

1 回答

在jni目錄下創(chuàng)建Android.mk文件,在module/build.gradle中關(guān)聯(lián)配置,如下

module/build.gradle的內(nèi)容

apply?plugin:?'com.android.application'

android?{
????compileSdkVersion?26
????defaultConfig?{
????????applicationId?"com.example.sun.jnidemo"
????????minSdkVersion?15
????????targetSdkVersion?26
????????versionCode?1
????????versionName?"1.0"
????????testInstrumentationRunner?"android.support.test.runner.AndroidJUnitRunner"

????????ndk{
????????????abiFilters?"armeabi","armeabi-v7a"
????????}
????}
????externalNativeBuild{
????????ndkBuild{
????????????path?"src/main/jni/Android.mk"
????????}
????}
????buildTypes?{
????????release?{
????????????minifyEnabled?false
????????????proguardFiles?getDefaultProguardFile('proguard-android.txt'),?'proguard-rules.pro'
????????}
????}
}

dependencies?{
????implementation?fileTree(dir:?'libs',?include:?['*.jar'])
????implementation?'com.android.support:appcompat-v7:26.1.0'
????implementation?'com.android.support.constraint:constraint-layout:1.0.2'
????testImplementation?'junit:junit:4.12'
????androidTestImplementation?'com.android.support.test:runner:1.0.1'
????androidTestImplementation?'com.android.support.test.espresso:espresso-core:3.0.1'
}

Android.mk文件的內(nèi)容

LOCAL_PATH?:=?$(call?my-dir)

include?$(CLEAR_VARS)

LOCAL_MODULE????:=?hello
LOCAL_SRC_FILES?:=?Hello.cpp

#?for?logging
LOCAL_LDLIBS????+=?-llog

include?$(BUILD_SHARED_LIBRARY)
0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

ndk的build.gradle出錯(cuò)

我要回答 關(guān)注問(wèn)題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)