質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
XML

XMLは仕様の1つで、マークアップ言語群を構築するために使われています。

Android Studio

Android Studioは、 Google社によって開発された、 Androidのネイティブアプリケーション開発に特化した統合開発ツールです。

Q&A

解決済

1回答

1725閲覧

PercentFrameLayoutでの実行時エラーの解消法

DAEichan

総合スコア29

XML

XMLは仕様の1つで、マークアップ言語群を構築するために使われています。

Android Studio

Android Studioは、 Google社によって開発された、 Androidのネイティブアプリケーション開発に特化した統合開発ツールです。

0グッド

0クリップ

投稿2016/10/05 09:02

###何がしたいか。
TextViewを並べて描画したくてPercentFrameLayoutを使って画面サイズが変わってもちゃんと表示できるようにしたいのですが実行時エラーが解消できずに困っています。
解決方法やアドバイスよろしくおねがいします。

###発生している問題・エラーメッセージ

Information:Gradle tasks [:app:incrementalDebugSupportDex] :app:buildInfoDebugLoader :app:incrementalDebugJavaCompilationSafeguard UP-TO-DATE :app:mergeDebugResources :app:processDebugResources /Users/user.mini.33/pg-education/2048/2048_Android/app/src/main/res/layout/activity_naitive.xml Error:(7) No resource identifier found for attribute 'layout_widthPercent' in package 'com.a2048example.a2048' Error:(7) No resource identifier found for attribute 'layout_heightPercent' in package 'com.a2048example.a2048' Error:(7) No resource identifier found for attribute 'layout_marginTopPercent' in package 'com.a2048example.a2048' Error:(7) No resource identifier found for attribute 'layout_marginLeftPercent' in package 'com.a2048example.a2048' Error:Execution failed for task ':app:processDebugResources'. > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/user.mini.33/Library/Android/sdk/build-tools/23.0.3/aapt'' finished with non-zero exit value 1 Information:BUILD FAILED Information:Total time: 12.934 secs Information:5 errors Information:0 warnings Information:See complete output in console

###該当のソースコード

<android.support.percent.PercentFrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> <ImageView app:layout_widthPercent="50%" app:layout_heightPercent="50%" app:layout_marginTopPercent="25%" app:layout_marginLeftPercent="25%"/> </android.support.percent.PercentFrameLayout>

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

gradleに下記の記述はありますか?

Java

1compile 'com.android.support:percent:23.0.0'

投稿2016/10/05 10:50

yona

総合スコア18155

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

DAEichan

2016/10/05 11:04 編集

その記述をするとエラーになってしまいます。。。 Error:The number of method references in a .dex file cannot exceed 64K. Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2
yona

2016/10/05 11:07

設定しないのに動くわけがないですよ。 そのエラーは先日teratailで質問されていたのでそれを参考にしましょうね。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問