我最近更新了我的Android Studio到版本2.1以及我正在研究Gradle版本2.1.0的項目。 我評論在我的代碼線,無關與App索引代碼是自動生成的,而現在,每當我嘗試運行我的應用程序崩潰,並給了我以下錯誤:Android Studio - AppIndex URI
java.lang.RuntimeException: Unable to start activity ComponentInfo{lux.unisabana.sabanaviveenti/sabanaviveenti.unisabana.lux.unisabana.appsabana.MainActivity}: java.lang.IllegalArgumentException: AppIndex: The android-app URI host must match the package name and follow the format android-app://<package_name>/<scheme>/[host_path]. Provided URI: android-app://sabanaviveenti.unisabana.lux.unisabana.appsabana/http/host/path
我到處尋找並嘗試了很多東西,更新目標版本,所需的庫以及目前爲止沒有任何工作,任何人都可以幫助我嗎?
我使用編譯的SDK是版本23和我使用谷歌服務的依賴是8.4.0
你在你的URI主機中放了什麼以及你的包名是什麼? –
正如我所說的,代碼是自動生成的,但這裏是那裏的東西:'行動的viewAction = Action.newAction( \t \t \t \t Action.TYPE_VIEW, \t \t \t \t 「主頁」, \t \t \t \t// TODO:如果你有這個程序,活動的內容相匹配的網頁內容, \t \t \t \t //確保這個自動生成的網頁的URL是正確的 \t \t \t。//否則,將URL設置爲null。 \t \t \t \t Uri.parse( 「HTTP://主機/路徑」), \t \t \t \t // TODO:確保此自動生成的應用程序的URL是正確的。 \t \t \t \t Uri.parse( 「android-app://sabanaviveenti.unisabana.lux.unisabana.appsabana/http/host/path」) \t \t); \t \t AppIndex.AppIndexApi.start(client2,viewAction);' – Jpfcan