0
私はを使用しています。Androidスタジオ3安定。 後thisカスタムスタジオ配列がAndroidスタジオ3に見つかりません
チュートリアルでは、私はデモインスタントアプリを作成しました。すべてのステップを完了した後、問題なくエミュレータで実行されていました。 その後、私はカスタムフォントを使いたいと思っていました。レイアウトエディタからTextViewのカスタムフォントを設定しました。
のTextViewのXML:
`
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
android:fontFamily="@font/dancing_script"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
`
フォントXML:
<font-family xmlns:app="http://schemas.android.com/apk/res-auto"
app:fontProviderAuthority="com.google.android.gms.fonts"
app:fontProviderPackage="com.google.android.gms"
app:fontProviderQuery="Dancing Script"
app:fontProviderCerts="@array/com_google_android_gms_fonts_certs">
</font-family>
マニフェスト
manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myfirstinstantapp.feature">
<application>
<activity android:name=".MainActivity">
<intent-filter android:order="1">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="myfirstinstantapp.example.com"
android:pathPattern="/hello"
android:scheme="https" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="preloaded_fonts"
android:resource="@array/preloaded_fonts" />
</application>
</manifest>
しかし、私はエラー以下を取得構築しよう:
Error:(52) resource array/preloaded_fonts (aka com.example.myfirstinstantapp:array/preloaded_fonts) not found.
Error:(52) error: resource array/preloaded_fonts (aka com.example.myfirstinstantapp:array/preloaded_fonts) not found.
Error:failed processing manifest.
D:\Android\AndroidStudioProjects\MyFirstInstantApp\base\build\intermediates\manifests\full\feature\debug\AndroidManifest.xml
Error:java.util.co`enter code here`ncurrent.ExecutionException: java.util.concurre`enter code here`nt.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Execution failed for task ':base:processDebugFeatureResources'.
> Failed to execute aapt
Information:BUILD FAILED in 2s
Information:7 errors
私に何か不足していますか?