Twilioを使った音声テキスト化や読み上げのアプリが作りたく勉強しているものです。
リンク内容を参考に作りあとはAndroidStudioに実装するのですが、
クライアントアプリを実装するには「Twilio Client SDK for Android」が必要です。以下のURLにアクセスし、ダウンロードしましょう。
とあり、「Twilio Client SDK for Android」がダウンロードできないため、
リンク内容でやってるのですがうまくダウンロードできません。
また、
proguard-project.txt ファイルに以下の行を追加します。というのがあるのですが、proguard-project.txt ファイルがないのですがどこにあるのでしょうか?
↓
proguard-project.txt ファイルに以下の行を追加
# Twilio Client -keep class com.twilio.** { *; } # Apache HttpClient -dontwarn org.apache.http.**
リンク内容を見て実装している内容です。
build.gradle ファイル
apply plugin: 'com.android.application' android { compileSdkVersion 25 buildToolsVersion "25.0.0" defaultConfig { applicationId "*********.test" minSdkVersion 17 targetSdkVersion 25 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) compile 'com.android.support:appcompat-v7:25.0.0' compile 'com.android.support.constraint:constraint-layout:1.0.2' testCompile 'junit:junit:4.12' }
AndroidManifest.xml ファイル
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="*********.test"> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> <uses-permission android:name="android.permission.RECORD_AUDIO" /> ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.RECORD_AUDIO}, MIC_PERMISSION_REQUEST_CODE); } <service android:name="com.twilio.client.TwilioClientService" android:exported="false" android:stopWithTask="true" /> </manifest>
現時点でのエラーは、
エラー :(10, 0) Gradle DSL method not found: 'compile()'
Possible causes:<ul><li>The project 'Test' may be using a version of the Android Gradle plug-in that does not contain the method (e.g. 'testCompile' was added in 1.1.0).
<a href="fixGradleElements">Upgrade plugin to version 2.3.3 and sync project</a></li><li>The project 'Test' may be using a version of Gradle that does not contain the method.
<a href="open.wrapper.file">Open Gradle wrapper file</a></li><li>The build file may be missing a Gradle plugin.
<a href="apply.gradle.plugin">Apply Gradle plugin</a></li>
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。