我最近更新了我的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