Android Things Project를 사용하여 Android App에서 GPIO 포트를 제어하려고합니다. 하지만 (안드로이드 스튜디오에) ADB를 통해이 응용 프로그램을 실행할 때, 다음과 같은 메시지가 발행됩니다 ..INSTALL_FAILED_MISSING_SHARED_LIBRARY를 Android Things Project에서 해결하는 방법
설치 메시지 INSTALL_FAILED_MISSING_SHARED_LIBRARY 실패했습니다. 이 문제는 인 경우 apk의 기존 버전을 제거한 다음 다시 설치하여 해결할 수 있습니다.
경고 : 제거하면 응용 프로그램 데이터가 제거됩니다!
기존 응용 프로그램을 제거 하시겠습니까?
이 문제를 어떻게 해결할 수 있습니까?
안드로이드 버전은 5.1.1 (API 22) 내 Android 앱 앱에 대한 build.gradle은 다음과 같다 안드로이드 것들 프로젝트 (https://developer.android.com/things/sdk/pio/gpio.html#managing_the_connection)
을 설명하는 웹 사이트에 따르면 코딩 안드로이드입니다.
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.3"
defaultConfig {
applicationId "kr.iges.wallpad.gpiotest"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.1.0'
provided 'com.google.android.things:androidthings:0.1-devpreview'
}
그리고 AndroidManifest.xml에이
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="kr.iges.wallpad.gpiotest">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<uses-library android:name="com.google.android.things"/>
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.IOT_LAUNCHER"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
</application>
</manifest>
입니다 그리고 자바 코드
package kr.iges.wallpad.gpiotest;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import com.google.android.things.pio.PeripheralManagerService;
import java.util.List;
public class MainActivity extends AppCompatActivity {
private static final String TAG = "GpioTest";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
PeripheralManagerService manager = new PeripheralManagerService();
List<String> portList = manager.getGpioList();
if (portList.isEmpty()) {
Log.i(TAG, "No GPIO port available on this device.");
} else {
Log.i(TAG, "List of available ports: " + portList);
}
setContentView(R.layout.activity_main);
}
}
당신이이 문제에 대한 해결책을 알아입니까?
읽어 주셔서 감사합니다.